From 4cb8b1f0e891082ae1bed58f6448f3f8df21d35c Mon Sep 17 00:00:00 2001 From: Matan Kushner Date: Sun, 3 Jan 2021 03:56:07 -0500 Subject: [PATCH] docs(i18n): New Crowdin updates (#1941) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (French) * New translations README.md (Italian) * New translations README.md (Arabic) * New translations README.md (Korean) * New translations README.md (Turkish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Russian) * New translations README.md (Japanese) * New translations README.md (German) * New translations README.md (Spanish) * New translations README.md (Portuguese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Traditional) * New translations README.md (Spanish) * 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 (Korean) * New translations README.md (Arabic) * New translations README.md (Turkish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (French) * New translations README.md (Japanese) * New translations README.md (German) * New translations README.md (Spanish) * New translations README.md (Russian) * New translations README.md (Portuguese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Italian) * New translations README.md (Italian) * New translations README.md (Korean) * New translations README.md (Arabic) * New translations README.md (Turkish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (French) * New translations README.md (Japanese) * New translations README.md (German) * New translations README.md (Spanish) * New translations README.md (Russian) * New translations README.md (Portuguese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Italian) * New translations README.md (Korean) * New translations README.md (Arabic) * New translations README.md (Turkish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (French) * New translations README.md (Japanese) * New translations README.md (German) * New translations README.md (Spanish) * New translations README.md (Russian) * New translations README.md (Portuguese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Arabic) * New translations README.md (Italian) * New translations README.md (Korean) * New translations README.md (Dutch) * New translations README.md (Polish) * New translations README.md (French) * New translations README.md (Spanish) * New translations README.md (German) * New translations README.md (Japanese) * New translations README.md (Russian) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Traditional) * New translations README.md (Portuguese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Turkish) * New translations README.md (Russian) * New translations README.md (Russian) * New translations README.md (Russian) * New translations README.md (Italian) * New translations README.md (Korean) * New translations README.md (Arabic) * New translations README.md (Turkish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (French) * New translations README.md (Japanese) * New translations README.md (German) * New translations README.md (Spanish) * New translations README.md (Russian) * New translations README.md (Portuguese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (German) * New translations README.md (German) * New translations README.md (German) * New translations README.md (German) * New translations README.md (Italian) * New translations README.md (Korean) * New translations README.md (Arabic) * New translations README.md (Turkish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (French) * New translations README.md (Japanese) * New translations README.md (German) * New translations README.md (Spanish) * New translations README.md (Russian) * New translations README.md (Portuguese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Italian) * New translations README.md (French) * New translations README.md (Spanish) * New translations README.md (Arabic) * New translations README.md (German) * 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 (Chinese Traditional) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Italian) * New translations README.md (Korean) * New translations README.md (Arabic) * New translations README.md (Turkish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (French) * New translations README.md (Japanese) * New translations README.md (German) * New translations README.md (Spanish) * New translations README.md (Russian) * New translations README.md (Portuguese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (German) * New translations README.md (Japanese) * New translations README.md (Portuguese) * New translations README.md (Spanish) * New translations README.md (French) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Russian) * New translations README.md (Arabic) * New translations README.md (Italian) * New translations README.md (Turkish) * New translations README.md (Polish) * New translations README.md (Korean) * New translations README.md (Dutch) * New translations README.md (German) * New translations README.md (Japanese) * New translations README.md (Portuguese) * New translations README.md (Spanish) * New translations README.md (French) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Russian) * New translations README.md (Arabic) * New translations README.md (Italian) * New translations README.md (Turkish) * New translations README.md (Polish) * New translations README.md (Korean) * New translations README.md (Dutch) * New translations README.md (Italian) * New translations README.md (Italian) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Japanese) * New translations README.md (Portuguese) * New translations README.md (Spanish) * New translations README.md (French) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Russian) * New translations README.md (Arabic) * New translations README.md (Italian) * New translations README.md (Turkish) * New translations README.md (Polish) * New translations README.md (Korean) * New translations README.md (Dutch) * New translations README.md (Chinese Simplified) * New translations README.md (Russian) * New translations README.md (Russian) * New translations README.md (Portuguese) * New translations README.md (Portuguese) * New translations README.md (Japanese) * New translations README.md (Japanese) * New translations README.md (German) * New translations README.md (German) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Traditional) * New translations README.md (Spanish) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Chinese Traditional) * New translations README.md (Arabic) * New translations README.md (Korean) * New translations README.md (Italian) * New translations README.md (Italian) * New translations README.md (Korean) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Turkish) * New translations README.md (French) * New translations README.md (French) * New translations README.md (Turkish) * New translations README.md (Polish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Dutch) * New translations README.md (German) * New translations README.md (Japanese) * New translations README.md (Portuguese) * New translations README.md (Spanish) * New translations README.md (French) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Russian) * New translations README.md (Arabic) * New translations README.md (Italian) * New translations README.md (Turkish) * New translations README.md (Polish) * New translations README.md (Korean) * New translations README.md (Dutch) --- docs/ar-SA/README.md | 112 + docs/ar-SA/advanced-config/README.md | 93 + docs/ar-SA/config/README.md | 2503 ++++++++++++++++++++++ docs/ar-SA/faq/README.md | 92 + docs/ar-SA/guide/README.md | 272 +++ docs/ar-SA/migrating-to-0.45.0/README.md | 267 +++ docs/ar-SA/presets/README.md | 89 + docs/de-DE/README.md | 4 +- docs/de-DE/advanced-config/README.md | 2 +- docs/de-DE/config/README.md | 398 ++-- docs/de-DE/faq/README.md | 4 +- docs/de-DE/guide/README.md | 34 +- docs/de-DE/presets/README.md | 8 +- docs/es-ES/advanced-config/README.md | 2 +- docs/es-ES/config/README.md | 1436 +++++++------ docs/es-ES/faq/README.md | 4 +- docs/es-ES/guide/README.md | 18 +- docs/es-ES/presets/README.md | 8 +- docs/fr-FR/advanced-config/README.md | 2 +- docs/fr-FR/config/README.md | 512 +++-- docs/fr-FR/faq/README.md | 4 +- docs/fr-FR/guide/README.md | 14 +- docs/fr-FR/presets/README.md | 8 +- docs/it-IT/README.md | 112 + docs/it-IT/advanced-config/README.md | 93 + docs/it-IT/config/README.md | 2503 ++++++++++++++++++++++ docs/it-IT/faq/README.md | 92 + docs/it-IT/guide/README.md | 272 +++ docs/it-IT/migrating-to-0.45.0/README.md | 267 +++ docs/it-IT/presets/README.md | 89 + docs/ja-JP/advanced-config/README.md | 2 +- docs/ja-JP/config/README.md | 518 +++-- docs/ja-JP/faq/README.md | 4 +- docs/ja-JP/guide/README.md | 12 +- docs/ja-JP/presets/README.md | 8 +- docs/ko-KR/README.md | 112 + docs/ko-KR/advanced-config/README.md | 93 + docs/ko-KR/config/README.md | 2503 ++++++++++++++++++++++ docs/ko-KR/faq/README.md | 92 + docs/ko-KR/guide/README.md | 272 +++ docs/ko-KR/migrating-to-0.45.0/README.md | 267 +++ docs/ko-KR/presets/README.md | 89 + docs/nl-NL/README.md | 112 + docs/nl-NL/advanced-config/README.md | 93 + docs/nl-NL/config/README.md | 2503 ++++++++++++++++++++++ docs/nl-NL/faq/README.md | 92 + docs/nl-NL/guide/README.md | 272 +++ docs/nl-NL/migrating-to-0.45.0/README.md | 267 +++ docs/nl-NL/presets/README.md | 89 + docs/pl-PL/README.md | 112 + docs/pl-PL/advanced-config/README.md | 93 + docs/pl-PL/config/README.md | 2503 ++++++++++++++++++++++ docs/pl-PL/faq/README.md | 92 + docs/pl-PL/guide/README.md | 272 +++ docs/pl-PL/migrating-to-0.45.0/README.md | 267 +++ docs/pl-PL/presets/README.md | 89 + docs/pt-BR/advanced-config/README.md | 2 +- docs/pt-BR/config/README.md | 232 +- docs/pt-BR/faq/README.md | 4 +- docs/pt-BR/guide/README.md | 12 +- docs/pt-BR/presets/README.md | 8 +- docs/pt-PT/advanced-config/README.md | 2 +- docs/pt-PT/config/README.md | 226 +- docs/pt-PT/faq/README.md | 4 +- docs/pt-PT/guide/README.md | 12 +- docs/pt-PT/presets/README.md | 8 +- docs/ru-RU/advanced-config/README.md | 2 +- docs/ru-RU/config/README.md | 812 +++---- docs/ru-RU/faq/README.md | 4 +- docs/ru-RU/guide/README.md | 14 +- docs/ru-RU/presets/README.md | 8 +- docs/tr-TR/README.md | 112 + docs/tr-TR/advanced-config/README.md | 93 + docs/tr-TR/config/README.md | 2503 ++++++++++++++++++++++ docs/tr-TR/faq/README.md | 92 + docs/tr-TR/guide/README.md | 272 +++ docs/tr-TR/migrating-to-0.45.0/README.md | 267 +++ docs/tr-TR/presets/README.md | 89 + docs/zh-CN/README.md | 2 +- docs/zh-CN/advanced-config/README.md | 2 +- docs/zh-CN/config/README.md | 424 ++-- docs/zh-CN/faq/README.md | 4 +- docs/zh-CN/guide/README.md | 12 +- docs/zh-CN/presets/README.md | 8 +- docs/zh-TW/advanced-config/README.md | 2 +- docs/zh-TW/config/README.md | 418 ++-- docs/zh-TW/faq/README.md | 4 +- docs/zh-TW/guide/README.md | 12 +- docs/zh-TW/presets/README.md | 8 +- 89 files changed, 23453 insertions(+), 2363 deletions(-) create mode 100644 docs/ar-SA/README.md create mode 100644 docs/ar-SA/advanced-config/README.md create mode 100644 docs/ar-SA/config/README.md create mode 100644 docs/ar-SA/faq/README.md create mode 100644 docs/ar-SA/guide/README.md create mode 100644 docs/ar-SA/migrating-to-0.45.0/README.md create mode 100644 docs/ar-SA/presets/README.md create mode 100644 docs/it-IT/README.md create mode 100644 docs/it-IT/advanced-config/README.md create mode 100644 docs/it-IT/config/README.md create mode 100644 docs/it-IT/faq/README.md create mode 100644 docs/it-IT/guide/README.md create mode 100644 docs/it-IT/migrating-to-0.45.0/README.md create mode 100644 docs/it-IT/presets/README.md create mode 100644 docs/ko-KR/README.md create mode 100644 docs/ko-KR/advanced-config/README.md create mode 100644 docs/ko-KR/config/README.md create mode 100644 docs/ko-KR/faq/README.md create mode 100644 docs/ko-KR/guide/README.md create mode 100644 docs/ko-KR/migrating-to-0.45.0/README.md create mode 100644 docs/ko-KR/presets/README.md create mode 100644 docs/nl-NL/README.md create mode 100644 docs/nl-NL/advanced-config/README.md create mode 100644 docs/nl-NL/config/README.md create mode 100644 docs/nl-NL/faq/README.md create mode 100644 docs/nl-NL/guide/README.md create mode 100644 docs/nl-NL/migrating-to-0.45.0/README.md create mode 100644 docs/nl-NL/presets/README.md create mode 100644 docs/pl-PL/README.md create mode 100644 docs/pl-PL/advanced-config/README.md create mode 100644 docs/pl-PL/config/README.md create mode 100644 docs/pl-PL/faq/README.md create mode 100644 docs/pl-PL/guide/README.md create mode 100644 docs/pl-PL/migrating-to-0.45.0/README.md create mode 100644 docs/pl-PL/presets/README.md create mode 100644 docs/tr-TR/README.md create mode 100644 docs/tr-TR/advanced-config/README.md create mode 100644 docs/tr-TR/config/README.md create mode 100644 docs/tr-TR/faq/README.md create mode 100644 docs/tr-TR/guide/README.md create mode 100644 docs/tr-TR/migrating-to-0.45.0/README.md create mode 100644 docs/tr-TR/presets/README.md diff --git a/docs/ar-SA/README.md b/docs/ar-SA/README.md new file mode 100644 index 000000000..4767ca0b1 --- /dev/null +++ b/docs/ar-SA/README.md @@ -0,0 +1,112 @@ +--- +home: true +heroImage: /logo.svg +heroText: +tagline: The minimal, blazing-fast, and infinitely customizable prompt for any shell! +actionText: Get Started → +actionLink: ./guide/ +features: + - + title: Compatibility First + details: Works on the most common shells on the most common operating systems. Use it everywhere! + - + title: Rust-Powered + details: Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible. + - + title: Customizable + details: Every little detail is customizable to your liking, to make this prompt as minimal or feature-rich as you'd like it to be. +footer: ISC Licensed | Copyright © 2019-present Starship Contributors +#Used for the description meta tag, for SEO +metaTitle: "Starship: Cross-Shell Prompt" +description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and PowerShell. +--- + +
+ +
+ +### Quick Install + +1. Install the **starship** binary: + + + #### Install Latest Version + + With Shell: + + ```sh + curl -fsSL https://starship.rs/install.sh | bash + ``` + + + #### Install via Package Manager + + With [Homebrew](https://brew.sh/): + + ```sh + brew install starship + ``` + + With [Scoop](https://scoop.sh): + + ```powershell + scoop install starship + ``` + +1. Add the init script to your shell's config file: + + + #### Bash + + Add the following to the end of `~/.bashrc`: + + ```sh + # ~/.bashrc + + eval "$(starship init bash)" + ``` + + + #### Fish + + Add the following to the end of `~/.config/fish/config.fish`: + + ```sh + # ~/.config/fish/config.fish + + starship init fish | source + ``` + + + #### Zsh + + Add the following to the end of `~/.zshrc`: + + ```sh + # ~/.zshrc + + eval "$(starship init zsh)" + ``` + + + #### Powershell + + Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. + + ```sh + Invoke-Expression (&starship init powershell) + ``` + + + #### Ion + + Add the following to the end of `~/.config/ion/initrc`: + + ```sh + # ~/.config/ion/initrc + + eval $(starship init ion) + ``` diff --git a/docs/ar-SA/advanced-config/README.md b/docs/ar-SA/advanced-config/README.md new file mode 100644 index 000000000..1cf6ebb78 --- /dev/null +++ b/docs/ar-SA/advanced-config/README.md @@ -0,0 +1,93 @@ +# Advanced Configuration + +While Starship is a versatile shell, sometimes you need to do more than edit `starship.toml` to get it to do certain things. This page details some of the more advanced configuration techniques used in starship. + +::: warning + +The configurations in this section are subject to change in future releases of Starship. + +::: + +## Custom pre-prompt and pre-execution Commands in Bash + +Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure: + +- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do + +```bash +function blastoff(){ + echo "🚀" +} +starship_precmd_user_func="blastoff" +``` + +- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. + +```bash +function blastoff(){ + echo "🚀" +} +trap blastoff DEBUG # Trap DEBUG *before* running starship +eval $(starship init bash) +``` + +## Change Window Title + +Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`. + +First, define a window title change function (identical in bash and zsh): + +```bash +function set_win_title(){ + echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007" +} +``` + +You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). + +In `bash`, set this function to be the precmd starship function: + +```bash +starship_precmd_user_func="set_win_title" +``` + +In `zsh`, add this to the `precmd_functions` array: + +```bash +precmd_functions+=(set_win_title) +``` + +If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. + +For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`: + +```bash +function set_win_title(){ + echo -ne "\033]0; $(basename $PWD) \007" +} +starship_precmd_user_func="set_win_title" +``` + +## Style Strings + +Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: + + - `bold` + - `underline` + - `dimmed` + - `bg:` + - `fg:` + - `` + - `none` + +where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing , though this may change in the future. The order of words in the string does not matter. + +The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. + +A color specifier can be one of the following: + + - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). + - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). + - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). + +If multiple colors are specified for foreground/background, the last one in the string will take priority. diff --git a/docs/ar-SA/config/README.md b/docs/ar-SA/config/README.md new file mode 100644 index 000000000..286375e20 --- /dev/null +++ b/docs/ar-SA/config/README.md @@ -0,0 +1,2503 @@ +# Configuration + +To get started configuring starship, create the following 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: + +```toml +# Don't print a new line at the start of the prompt +add_newline = false + +# 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" + +# Disable the package module, hiding it from the prompt completely +[package] +disabled = true +``` + +You can change default `starship.toml` file location with `STARSHIP_CONFIG` environment variable: + +```sh +export STARSHIP_CONFIG=~/.starship +``` + +Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: + +```ps1 +$ENV:STARSHIP_CONFIG = "$HOME\.starship" +``` + +### 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: + +```sh +export STARSHIP_CACHE=~/.starship/cache +``` + +Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: + +```ps1 +$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" +``` + +### Terminology + +**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of NodeJS that is currently installed on your computer, if your current directory is a NodeJS project. + +**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 NodeJS. + +By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. + +### Format Strings + +Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. + +#### Variable + +A variable contains a `$` symbol followed by the name of the variable. The name of a variable only contains letters, numbers and `_`. + +For example: + +- `$version` is a format string with a variable named `version`. +- `$git_branch$git_commit` is a format string with two variables named `git_branch` and `git_commit`. +- `$git_branch $git_commit` has the two variables separated with a space. + +#### Text Group + +A text group is made up of two different parts. + +The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it. + +In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used style the first part. + +For example: + +- `[on](red bold)` will print a string `on` with bold text colored red. +- `[⬢ $version](bold green)` will print a symbol `⬢` followed by the content of variable `version`, with bold text colored green. +- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green. + +#### Style Strings + +Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). + +- `"fg:green bg:blue"` sets green text on a blue background +- `"bg:blue fg:bright-green"` sets bright green text on a blue background +- `"bold fg:27"` sets bold text with [ANSI color](https://i.stack.imgur.com/KTSQa.png) 27 +- `"underline bg:#bf5700"` sets underlined text on a burnt orange background +- `"bold italic fg:purple"` sets bold italic purple text +- `""` explicitly disables all styling + +Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics. + +#### Conditional Format Strings + +A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. + +For example: + +- `(@$region)` will show nothing if the variable `region` is `None`, otherwise `@` followed by the value of region. +- `(some text)` will always show nothing since there are no variables wrapped in the braces. +- When `$all` is a shortcut for `\[$a$b\]`, `($all)` will show nothing only if `$a` and `$b` are both `None`. This works the same as `(\[$a$b\] )`. + +#### Escapable characters + +The following symbols have special usage in a format string. If you want to print the following symbols, you have to escape them with a backslash (`\`). + +- \$ +- \\ +- [ +- ] +- ( +- ) + +Note that `toml` has [its own escape syntax](https://github.com/toml-lang/toml#user-content-string). It is recommended to use a literal string (`''`) in your config. If you want to use a basic string (`""`), pay attention to escape the backslash `\`. + +For example, when you want to print a `$` symbol on a new line, the following configs for `format` are equivalent: + +```toml +# with basic string +format = "\n\\$" + +# with multiline basic string +format = """ + +\\$""" + +# with literal string +format = ''' + +\$''' +``` + +## Prompt + +This is the list of prompt-wide configuration options. + +### Options + +| Option | Default | Description | +| -------------- | ------------------------------ | ----------------------------------------------------- | +| `format` | [link](#default-prompt-format) | Configure the format of the prompt. | +| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | +| `add_newline` | `true` | Add a new line before the start of the prompt. | + +### Example + +```toml +# ~/.config/starship.toml + +# Use custom format +format = """ +[┌───────────────────>](bold green) +[│](bold green)$directory$rust$package +[└─>](bold green) """ + +# Wait 10 milliseconds for starship to check files under the current directory. +scan_timeout = 10 + +# Disable the newline at the start of the prompt +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. The default is as shown: + +```toml +format = "$all" + +# Which is equivalent to +format = """ +$username\ +$hostname\ +$shlvl\ +$kubernetes\ +$directory\ +$git_branch\ +$git_commit\ +$git_state\ +$git_status\ +$hg_branch\ +$docker_context\ +$package\ +$cmake\ +$dart\ +$dotnet\ +$elixir\ +$elm\ +$erlang\ +$golang\ +$helm\ +$java\ +$julia\ +$kotlin\ +$nim\ +$nodejs\ +$ocaml\ +$perl\ +$php\ +$purescript\ +$python\ +$ruby\ +$rust\ +$swift\ +$terraform\ +$zig\ +$nix_shell\ +$conda\ +$memory_usage\ +$aws\ +$gcloud\ +$openstack\ +$env_var\ +$crystal\ +$custom\ +$cmd_duration\ +$line_break\ +$lua\ +$jobs\ +$battery\ +$time\ +$status\ +$character""" +``` + +## AWS + +The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. + +When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var. + +### Options + +| Option | Default | Description | +| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | +| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | +| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `AWS` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------------- | ------------------------------------ | +| region | `ap-northeast-1` | The current AWS region | +| profile | `astronauts` | The current AWS profile | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Examples + +#### Display everything + +```toml +# ~/.config/starship.toml + +[aws] +format = 'on [$symbol$profile(\($region\))]($style) ' +style = "bold blue" +symbol = "🅰 " +[aws.region_aliases] +ap-southeast-2 = "au" +us-east-1 = "va" +``` + +#### Display region + +```toml +# ~/.config/starship.toml + +[aws] +format = "on [$symbol$region]($style) " +style = "bold blue" +symbol = "🅰 " +[aws.region_aliases] +ap-southeast-2 = "au" +us-east-1 = "va" +``` + +#### Display profile + +```toml +# ~/.config/starship.toml + +[aws] +format = "on [$symbol$profile]($style) " +style = "bold blue" +symbol = "🅰 " +``` + +## Battery + +The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. + +### Options + +| Option | Default | Description | +| -------------------- | --------------------------------- | --------------------------------------------------- | +| `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. | +| `display` | [link](#battery-display) | Display threshold and style for the module. | +| `disabled` | `false` | Disables the `battery` module. | + + +### Example + +```toml +# ~/.config/starship.toml + +[battery] +full_symbol = "🔋" +charging_symbol = "⚡️" +discharging_symbol = "💀" +``` + +### Battery Display + +The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. The default is as shown: + +```toml +[[battery.display]] +threshold = 10 +style = "bold red" +``` + +#### Options + +The `display` option is an array of the following table. + +| Option | Description | +| ----------- | ----------------------------------------------- | +| `threshold` | The upper bound for the display option. | +| `style` | The style used if the display option is in use. | + +#### Example + +```toml +[[battery.display]] # "bold red" style when capacity is between 0% and 10% +threshold = 10 +style = "bold red" + +[[battery.display]] # "bold yellow" style when capacity is between 10% and 30% +threshold = 30 +style = "bold yellow" + +# when capacity is over 30%, the battery indicator will not be displayed + +``` + +## Character + +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. + +The character will tell you whether the last command was successful or not. It can do this in two ways: + +- changing color (`red`/`green`) +- changing shape (`❯`/`✖`) + +By default it only changes color. If you also want to change it's shape take a look at [this example](#with-custom-error-shape). + +### Options + +| Option | Default | Description | +| ---------------- | ------------------- | -------------------------------------------------------------------------------- | +| `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. | +| `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. | +| `vicmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | +| `disabled` | `false` | Disables the `character` module. | + +### Variables + +| Variable | Example | Description | +| -------- | ------- | --------------------------------------------------------------------- | +| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` | + +### Examples + +#### With custom error shape + +```toml +# ~/.config/starship.toml + +[character] +success_symbol = "[➜](bold green) " +error_symbol = "[✗](bold red) " +``` + +#### Without custom error shape + +```toml +# ~/.config/starship.toml + +[character] +success_symbol = "[➜](bold green) " +error_symbol = "[➜](bold red) " +``` + +#### With custom vim shape + +```toml +# ~/.config/starship.toml + +[character] +vicmd_symbol = "[V](bold green) " +``` + +## CMake + +The `cmake` module shows the currently installed version of CMake if any of the following conditions are met: + +- The current directory contains a `CMakeLists.txt` file +- The current directory contains a `CMakeCache.txt` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | -------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `cmake` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v3.17.3` | The version of cmake | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +## Command Duration + +The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. + +::: warning Do not hook the DEBUG trap in Bash + +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. + +::: + +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. + +### Options + +| Option | Default | Description | +| -------------------- | ----------------------------- | ---------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `show_notifications` | `false` | Show desktop notifications when command completes. | +| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | + +::: tip + +Showing desktop notifications requires starship to be built with `rust-notify` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. + +::: + +### Variables + +| Variable | Example | Description | +| --------- | -------- | --------------------------------------- | +| duration | `16m40s` | The time it took to execute the command | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[cmd_duration] +min_time = 500 +format = "underwent [$duration](bold yellow)" +``` + +## Conda + +The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set. + +::: tip + +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. + +::: + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. | +| `symbol` | `"🅒 "` | The symbol used before the environment name. | +| `style` | `"bold green"` | The style for the module. | +| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `disabled` | `false` | Disables the `conda` module. | + +### Variables + +| Variable | Example | Description | +| ----------- | ------------ | ------------------------------------ | +| environment | `astronauts` | The current conda environment | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[conda] +format = "[$symbol$environment](dimmed green) " +``` + +## Crystal + +The `crystal` module shows the currently installed version of Crystal. The module will be shown if any of the following conditions are met: + +- The current directory contains a `shard.yml` file +- The current directory contains a `.cr` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | The style for the module. | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `disabled` | `false` | Disables the `crystal` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.32.1` | The version of `crystal` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[crystal] +format = "via [✨ $version](bold blue) " +``` + +## Dart + +The `dart` module shows the currently installed version of Dart. The module will be shown if any of the following conditions are met: + +- The current directory contains a file with `.dart` extension +- The current directory contains a `.dart_tool` directory +- The current directory contains a `pubspec.yaml` or `pubspec.lock` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dart` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v2.8.4` | The version of `dart` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[dart] +format = "via [🔰 $version](bold red) " +``` + +## Directory + +The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. + +When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option. + +For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | +| `style` | `"bold cyan"` | The style for the module. | +| `disabled` | `false` | Disables the `directory` module. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | + +
+This module has a few advanced configuration options that control how the directory is displayed. + +| Advanced Option | Default | Description | +| --------------------------- | ------- | ---------------------------------------------------------------------------------------- | +| `substitutions` | | A table of substitutions to be made to the path. | +| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. | +| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. | + +`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD. + +```toml +[directory.substitutions] +"/Volumes/network/path" = "/net" +"src/com/long/java/path" = "mypath" +``` + +`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`. + +
+ +### Variables + +| Variable | Example | Description | +| --------- | --------------------- | ----------------------------------- | +| path | `"D:/Projects"` | The current directory path | +| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[directory] +truncation_length = 8 +truncation_symbol = "…/" +``` + +## Docker Context + +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default`. + +### Options + +| Option | Default | Description | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | The format for the module. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | The style for the module. | +| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | +| `disabled` | `true` | Disables the `docker_context` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------------- | ------------------------------------ | +| context | `test_context` | The current docker context | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[docker_context] +format = "via [🐋 $context](blue bold)" +``` + +## Dotnet + +The `dotnet` module shows the relevant version of the .NET Core SDK for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK. + +This module will only be shown in your prompt when one or more of the following files are present in the current directory: + +- `global.json` +- `project.json` +- `Directory.Build.props` +- `Directory.Build.targets` +- `Packages.props` +- `*.sln` +- `*.csproj` +- `*.fsproj` +- `*.xproj` + +You'll also need the .NET Core SDK installed in order to use it correctly. + +Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options. + +The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. + +### Options + +| Option | Default | Description | +| ----------- | --------------------------------------- | -------------------------------------------------------- | +| `format` | `"[$symbol$version( 🎯 $tfm)]($style) "` | The format for the module. | +| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. | +| `heuristic` | `true` | Use faster version detection to keep starship snappy. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dotnet` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------------- | ------------------------------------------------------------------ | +| version | `v3.1.201` | The version of `dotnet` sdk | +| tfm | `netstandard2.0` | The Target Framework Moniker that the current project is targeting | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[dotnet] +symbol = "🥅 " +style = "green" +heuristic = false +``` + +## Elixir + +The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. The module will be shown if any of the following conditions are met: + +- The current directory contains a `mix.exs` file. + +### Options + +| Option | Default | Description | +| ---------- | --------------------------------------------------------- | --------------------------------------------------------------- | +| `symbol` | `"💧 "` | The symbol used before displaying the version of Elixir/Erlang. | +| `style` | `"bold purple"` | The style for the module. | +| `format` | `'via [$symbol$version \(OTP $otp_version\)]($style) '` | The format for the module elixir. | +| `disabled` | `false` | Disables the `elixir` module. | + +### Variables + +| Variable | Example | Description | +| ----------- | ------- | ------------------------------------ | +| version | `v1.10` | The version of `elixir` | +| otp_version | | The otp version of `elixir` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[elixir] +symbol = "🔮 " +``` + +## Elm + +The `elm` module shows the currently installed version of Elm. The module will be shown if any of the following conditions are met: + +- The current directory contains a `elm.json` file +- The current directory contains a `elm-package.json` file +- The current directory contains a `.elm-version` file +- The current directory contains a `elm-stuff` folder +- The current directory contains a `*.elm` files + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🌳 "` | A format string representing the symbol of Elm. | +| `style` | `"cyan bold"` | The style for the module. | +| `disabled` | `false` | Disables the `elm` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.19.1` | The version of `elm` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[elm] +format = "via [ $version](cyan bold) " +``` + +## Environment Variable + +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: + +- The `variable` configuration option matches an existing environment variable +- The `variable` configuration option is not defined, but the `default` configuration option is + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------ | ---------------------------------------------------------------------------- | +| `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. | +| `disabled` | `false` | Disables the `env_var` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------------------------------------- | ------------------------------------------ | +| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | `black bold dimmed` | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[env_var] +variable = "SHELL" +default = "unknown shell" +``` + +## Erlang + +The `erlang` module shows the currently installed version of Erlang/OTP. The module will be shown if any of the following conditions are met: + +- The current directory contains a `rebar.config` file. +- The current directory contains a `erlang.mk` file. + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | -------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before displaying the version of erlang. | +| `style` | `"bold red"` | The style for the module. | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `disabled` | `false` | Disables the `erlang` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v22.1.3` | The version of `erlang` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[erlang] +format = "via [e $version](bold red) " +``` + +## Gcloud + +The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. + +### Options + +| Option | Default | Description | +| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | +| `format` | `'on [$symbol$account(\($region\))]($style) '` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. | +| `region_aliases` | | Table of region aliases to display in addition to the GCP name. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `gcloud` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ----------------- | ------------------------------------------------------------------ | +| region | `us-central1` | The current GCP region | +| account | `foo@example.com` | The current GCP profile | +| project | | The current GCP project | +| active | `default` | The active config name written in `~/.config/gcloud/active_config` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Examples + +#### Display account and project + +```toml +# ~/.config/starship.toml + +[gcloud] +format = 'on [$symbol$account(\($project\))]($style) ' +``` + +#### Display active config name only + +```toml +# ~/.config/starship.toml + +[gcloud] +format = "[$symbol$active]($style) " +style = "bold yellow" +``` + +#### Display account and aliased region + +```toml +# ~/.config/starship.toml + +[gcloud] +symbol = "️🇬️ " +[gcloud.region_aliases] +us-central1 = "uc1" +asia-northeast1 = "an1" +``` + +## Git Branch + +The `git_branch` module shows the active branch of the repo in your current directory. + +### Options + +| Option | Default | Description | +| -------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- | +| `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. | +| `symbol` | `" "` | A format string representing the symbol of git branch. | +| `style` | `"bold purple"` | The style for the module. | +| `truncation_length` | `2^63 - 1` | Truncates a git branch to X graphemes. | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use `""` for no symbol. | +| `only_attached` | `false` | Only show the branch name when not in a detached HEAD state. | +| `disabled` | `false` | Disables the `git_branch` module. | + +### Variables + +| Variable | Example | Description | +| ------------- | -------- | ---------------------------------------------------------------------------------------------------- | +| branch | `master` | The current branch name, falls back to `HEAD` if there's no current branch (e.g. git detached HEAD). | +| remote_name | `origin` | The remote name. | +| remote_branch | `master` | The name of the branch tracked on `remote_name`. | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_branch] +symbol = "🌱 " +truncation_length = 4 +truncation_symbol = "" +``` + +## Git Commit + +The `git_commit` module shows the current commit hash and also the tag (if any) of the repo in your current directory. + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------ | ----------------------------------------------------- | +| `commit_hash_length` | `7` | The length of the displayed git commit hash. | +| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | The format for the module. | +| `style` | `"bold green"` | The style for the module. | +| `only_detached` | `true` | Only show git commit hash when in detached HEAD state | +| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. | +| `tag_symbol` | `"🏷 "` | Tag symbol prefixing the info shown | +| `disabled` | `false` | Disables the `git_commit` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ----------------------------------- | +| hash | `b703eb3` | The current git commit hash | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_commit] +commit_hash_length = 4 +tag_symbol = "🔖 " +``` + +## Git State + +The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too. + +### Options + +| Option | Default | Description | +| -------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `rebase` | `"REBASING"` | A format string displayed when a `rebase` is in progress. | +| `merge` | `"MERGING"` | A format string displayed when a `merge` is in progress. | +| `revert` | `"REVERTING"` | A format string displayed when a `revert` is in progress. | +| `cherry_pick` | `"CHERRY-PICKING"` | A format string displayed when a `cherry-pick` is in progress. | +| `bisect` | `"BISECTING"` | A format string displayed when a `bisect` is in progress. | +| `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"` | The style for the module. | +| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | The format for the module. | +| `disabled` | `false` | Disables the `git_state` module. | + +### Variables + +| Variable | Example | Description | +| ---------------- | ---------- | ----------------------------------- | +| state | `REBASING` | The current state of the repo | +| progress_current | `1` | The current operation progress | +| progress_total | `2` | The total operation progress | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_state] +format = '[\($state( $progress_current of $progress_total)\)]($style) ' +cherry_pick = "[🍒 PICKING](bold red)" +``` + +## Git Status + +The `git_status` module shows symbols representing the state of the repo in your current directory. + +### Options + +| Option | Default | Description | +| ------------ | ----------------------------------------------- | ----------------------------------- | +| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` | +| `conflicted` | `"="` | This branch has merge conflicts. | +| `ahead` | `"⇡"` | The format of `ahead` | +| `behind` | `"⇣"` | The format of `behind` | +| `diverged` | `"⇕"` | The format of `diverged` | +| `untracked` | `"?"` | The format of `untracked` | +| `stashed` | `"$"` | The format of `stashed` | +| `modified` | `"!"` | The format of `modified` | +| `staged` | `"+"` | The format of `staged` | +| `renamed` | `"»"` | The format of `renamed` | +| `deleted` | `"✘"` | The format of `deleted` | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `git_status` module. | + +### Variables + +The following variables can be used in `format`: + +| Variable | Description | +| -------------- | --------------------------------------------------------------------------------------------- | +| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` | +| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo | +| `conflicted` | Displays `conflicted` when this branch has merge conflicts. | +| `untracked` | Displays `untracked` when there are untracked files in the working directory. | +| `stashed` | Displays `stashed` when a stash exists for the local repository. | +| `modified` | Displays `modified` when there are file modifications in the working directory. | +| `staged` | Displays `staged` when a new file has been added to the staging area. | +| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | +| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| style\* | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +The following variables can be used in `diverged`: + +| Variable | Description | +| -------------- | ---------------------------------------------- | +| `ahead_count` | Number of commits ahead of the tracking branch | +| `behind_count` | Number of commits behind the tracking branch | + +The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`: + +| Variable | Description | +| -------- | ------------------------ | +| `count` | Show the number of files | + +### Example + +```toml +# ~/.config/starship.toml + +[git_status] +conflicted = "🏳" +ahead = "🏎💨" +behind = "😰" +diverged = "😵" +untracked = "🤷‍" +stashed = "📦" +modified = "📝" +staged = '[++\($count\)](green)' +renamed = "👅" +deleted = "🗑" +``` + +Show ahead/behind count of the branch being tracked + +```toml +# ~/.config/starship.toml + +[git_status] +ahead = "⇡${count}" +diverged = "⇕⇡${ahead_count}⇣${behind_count}" +behind = "⇣${count}" +``` + +## Golang + +The `golang` module shows the currently installed version of Golang. The module will be shown if any of the following conditions are met: + +- The current directory contains a `go.mod` file +- The current directory contains a `go.sum` file +- The current directory contains a `glide.yaml` file +- The current directory contains a `Gopkg.yml` file +- The current directory contains a `Gopkg.lock` file +- The current directory contains a `.go-version` file +- The current directory contains a `Godeps` directory +- The current directory contains a file with the `.go` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ---------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🐹 "` | A format string representing the symbol of Go. | +| `style` | `"bold cyan"` | The style for the module. | +| `disabled` | `false` | Disables the `golang` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v1.12.1` | The version of `go` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[golang] +format = "via [🏎💨 $version](bold cyan) " +``` + +## Helm + +The `helm` module shows the currently installed version of Helm. The module will be shown if any of the following conditions are met: + +- The current directory contains a `helmfile.yaml` file +- The current directory contains a `Chart.yaml` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"⎈ "` | A format string representing the symbol of Helm. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `helm` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v3.1.1` | The version of `helm` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[helm] +format = "via [⎈ $version](bold white) " +``` + +## Hostname + +The `hostname` module shows the system hostname. + +### Options + +| Option | Default | Description | +| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `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. | +| `style` | `"bold dimmed green"` | The style for the module. | +| `disabled` | `false` | Disables the `hostname` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +format = "on [$hostname](bold red) " +trim_at = ".companyname.com" +disabled = false +``` + +## Java + +The `java` module shows the currently installed version of Java. The module will be shown if any of the following conditions are met: + +- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file +- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension + +### Options + +| Option | Default | Description | +| ---------- | -------------------------------------- | ----------------------------------------------- | +| `format` | `"via [${symbol}${version}]($style) "` | The format for the module. | +| `symbol` | `"☕ "` | A format string representing the symbol of Java | +| `style` | `"red dimmed"` | The style for the module. | +| `disabled` | `false` | Disables the `java` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| version | `v14` | The version of `java` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[java] +symbol = "🌟 " +``` + +## Jobs + +The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. + +### Options + +| Option | Default | Description | +| ----------- | ----------------------------- | ------------------------------------------------ | +| `threshold` | `1` | Show number of jobs if exceeded. | +| `format` | `"[$symbol$number]($style) "` | The format for the module. | +| `symbol` | `"✦"` | A format string representing the number of jobs. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `jobs` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| number | `1` | The number of jobs | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[jobs] +symbol = "+ " +threshold = 4 +``` + +## Julia + +The `julia` module shows the currently installed version of Julia. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Project.toml` file +- The current directory contains a `Manifest.toml` file +- The current directory contains a file with the `.jl` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"ஃ "` | A format string representing the symbol of Julia. | +| `style` | `"bold purple"` | The style for the module. | +| `disabled` | `false` | Disables the `julia` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.4.0` | The version of `julia` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[julia] +symbol = "∴ " +``` + +## Kotlin + +The `kotlin` module shows the currently installed version of Kotlin. The module will be shown if any of the following conditions are met: + +- The current directory contains a `.kt` or a `.kts` file + +### Options + +| Option | Default | Description | +| --------------- | ---------------------------------- | ----------------------------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🅺 "` | A format string representing the symbol of Kotlin. | +| `style` | `"bold blue"` | The style for the module. | +| `kotlin_binary` | `"kotlin"` | Configures the kotlin binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `kotlin` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v1.4.21` | The version of `kotlin` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[kotlin] +symbol = "🅺 " +``` + +```toml +# ~/.config/starship.toml + +[kotlin] +# Uses the Kotlin Compiler binary to get the installed version +kotlin_binary = "kotlinc" +``` + +## Kubernetes + +Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | +| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. | +| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. | +| `style` | `"cyan bold"` | The style for the module. | +| `context_aliases` | | Table of context aliases to display. | +| `disabled` | `true` | Disables the `kubernetes` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------------------- | ---------------------------------------- | +| context | `starship-cluster` | The current kubernetes context | +| namespace | `starship-namespace` | If set, the current kubernetes namespace | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[kubernetes] +format = 'on [⛵ $context \($namespace\)](dimmed green) ' +disabled = false +[kubernetes.context_aliases] +"dev.local.cluster.k8s" = "dev" +``` + +## Line Break + +The `line_break` module separates the prompt into two lines. + +### Options + +| Option | Default | Description | +| ---------- | ------- | ------------------------------------------------------------------ | +| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | + +### Example + +```toml +# ~/.config/starship.toml + +[line_break] +disabled = true +``` + +## Lua + +The `lua` module shows the currently installed version of Lua. The module will be shown if any of the following conditions are met: + +- The current directory contains a `.lua-version` file +- The current directory contains a `lua` directory +- The current directory contains a file with the `.lua` extension + +### Options + +| Option | Default | Description | +| ------------ | ---------------------------------- | -------------------------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | +| `style` | `"bold blue"` | The style for the module. | +| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `lua` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v5.4.0` | The version of `lua` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[lua] +format = "via [🌕 $version](bold blue) " +``` + +## Memory Usage + +The `memory_usage` module shows current system memory and swap usage. + +By default the swap usage is displayed if the total system swap is non-zero. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------- | --------------------------------------------- | -------------------------------------------------------- | +| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | +| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | The format for the module. | +| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | +| `style` | `"bold dimmed white"` | The style for the module. | +| `disabled` | `true` | Disables the `memory_usage` module. | + +### Variables + +| Variable | Example | Description | +| ---------------- | ------------- | ------------------------------------------------------------------ | +| ram | `31GiB/65GiB` | The usage/total RAM of the current system memory. | +| ram_pct | `48%` | The percentage of the current system memory. | +| swap\*\* | `1GiB/4GiB` | The swap memory size of the current system swap memory file. | +| swap_pct\*\* | `77%` | The swap memory percentage of the current system swap memory file. | +| symbol | `🐏` | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string \*\*: The SWAP file information is only displayed if detected on the current system + +### Example + +```toml +# ~/.config/starship.toml + +[memory_usage] +disabled = false +threshold = -1 +symbol = " " +style = "bold dimmed green" +``` + +## Mercurial Branch + +The `hg_branch` module shows the active branch of the repo in your current directory. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `style` | `"bold purple"` | The style for the module. | +| `format` | `"on [$symbol$branch]($style) "` | The format for the module. | +| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `disabled` | `true` | Disables the `hg_branch` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| branch | `master` | The active mercurial branch | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[hg_branch] +format = "on [🌱 $branch](bold purple)" +truncation_length = 4 +truncation_symbol = "" +``` + +## Nim + +The `nim` module shows the currently installed version of Nim. The module will be shown if any of the following conditions are met: + +- The current directory contains a `nim.cfg` file +- The current directory contains a file with the `.nim` extension +- The current directory contains a file with the `.nims` extension +- The current directory contains a file with the `.nimble` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module | +| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `nim` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.2.0` | The version of `nimc` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nim] +style = "yellow" +symbol = "🎣 " +``` + +## Nix-shell + +The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment. + +### Options + +| Option | Default | Description | +| ------------ | ---------------------------------------------- | ----------------------------------------------------- | +| `format` | `'via [$symbol$state( \($name\))]($style) '` | The format for the module. | +| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | +| `style` | `"bold blue"` | The style for the module. | +| `impure_msg` | `"impure"` | A format string shown when the shell is impure. | +| `pure_msg` | `"pure"` | A format string shown when the shell is pure. | +| `disabled` | `false` | Disables the `nix_shell` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| state | `pure` | The state of the nix-shell | +| name | `lorri` | The name of the nix-shell | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nix_shell] +disabled = true +impure_msg = "[impure shell](bold red)" +pure_msg = "[pure shell](bold green)" +format = 'via [☃️ $state( \($name\))](bold blue) ' +``` + +## NodeJS + +The `nodejs` module shows the currently installed version of NodeJS. The module will be shown if any of the following conditions are met: + +- The current directory contains a `package.json` file +- The current directory contains a `.node-version` file +- The current directory contains a `node_modules` directory +- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension +- The current directory contains a file with the `.ts` extension + +### Options + +| Option | Default | Description | +| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. | +| `style` | `"bold green"` | The style for the module. | +| `disabled` | `false` | Disables the `nodejs` module. | +| `not_capable_style` | `bold red` | The style for the module when an engines property in Packages.json does not match the NodeJS version. | + +###  Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v13.12.0` | The version of `node` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nodejs] +format = "via [🤖 $version](bold green) " +``` + +## OCaml + +The `ocaml` module shows the currently installed version of OCaml. The module will be shown if any of the following conditions are met: + +- The current directory contains a file with `.opam` extension or `_opam` directory +- The current directory contains a `esy.lock` directory +- The current directory contains a `dune` or `dune-project` file +- The current directory contains a `jbuild` or `jbuild-ignore` file +- The current directory contains a `.merlin` file +- The current directory contains a file with `.ml`, `.mli`, `.re` or `.rei` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format string for the module. | +| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `ocaml` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v4.10.0` | The version of `ocaml` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[ocaml] +format = "via [🐪 $version]($style) " +``` + +## OpenStack + +The `openstack` module shows the current OpenStack cloud and project. The module only active when the `OS_CLOUD` env var is set, in which case it will read `clouds.yaml` file from any of the [default locations](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files). to fetch the current project in use. + +### Options + +| Option | Default | Description | +| ---------- | --------------------------------------------------- | -------------------------------------------------------------- | +| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `OpenStack` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| cloud | `corp` | The current OpenStack cloud | +| project | `dev` | The current OpenStack project | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[openstack] +format = "on [$symbol$cloud(\\($project\\))]($style) " +style = "bold yellow" +symbol = "☁️ " +``` + +## Package Version + +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages. + +- **npm** – The `npm` package version is extracted from the `package.json` present in the current directory +- **cargo** – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory +- **poetry** – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory +- **composer** – The `composer` package version is extracted from the `composer.json` present in the current directory +- **gradle** – The `gradle` package version is extracted from the `build.gradle` present +- **julia** - The package version is extracted from the `Project.toml` present +- **mix** - The `mix` package version is extracted from the `mix.exs` present +- **helm** - The `helm` chart version is extracted from the `Chart.yaml` present +- **maven** - The `maven` package version is extracted from the `pom.xml` present +- **meson** - The `meson` package version is extracted from the `meson.build` present + +> ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. + +### Options + +| Option | Default | Description | +| ----------------- | ---------------------------------- | ---------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | +| `style` | `"bold 208"` | The style for the module. | +| `display_private` | `false` | Enable displaying version for packages marked as private. | +| `disabled` | `false` | Disables the `package` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.0.0` | The version of your package | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[package] +format = "via [🎁 $version](208 bold) " +``` + +## Perl + +The `perl` module shows the currently installed version of Perl. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Makefile.PL` or `Build.PL` file +- The current directory contains a `cpanfile` or `cpanfile.snapshot` file +- The current directory contains a `META.json` file or `META.yml` file +- The current directory contains a `.perl-version` file +- The current directory contains a `.pl`, `.pm` or `.pod` + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format string for the module. | +| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | +| `style` | `"bold 149"` | The style for the module. | +| `disabled` | `false` | Disables the `perl` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v5.26.1` | The version of `perl` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +### Example + +```toml +# ~/.config/starship.toml + +[perl] +format = "via [🦪 $version]($style) " +``` + +## PHP + +The `php` module shows the currently installed version of PHP. The module will be shown if any of the following conditions are met: + +- The current directory contains a `composer.json` file +- The current directory contains a `.php-version` file +- The current directory contains a `.php` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | +| `style` | `"147 bold"` | The style for the module. | +| `disabled` | `false` | Disables the `php` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v7.3.8` | The version of `php` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[php] +format = "via [🔹 $version](147 bold) " +``` + +## PureScript + +The `purescript` module shows the currently installed version of PureScript version. The module will be shown if any of the following conditions are met: + +- The current directory contains a `spago.dhall` file +- The current directory contains a \*.purs files + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `purescript` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `0.13.5` | The version of `purescript` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[purescript] +format = "via [$symbol$version](bold white)" +``` + +## Python + +The `python` module shows the currently installed version of Python and the current Python virtual environment if one is activated. + +If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`. + +The module will be shown if any of the following conditions are met: + +- The current directory contains a `.python-version` file +- The current directory contains a `requirements.txt` file +- The current directory contains a `pyproject.toml` file +- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true) +- The current directory contains a `Pipfile` file +- The current directory contains a `tox.ini` file +- The current directory contains a `setup.py` file +- The current directory contains a `__init__.py` file +- A virtual environment is currently activated + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | The style for the module. | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | + +::: tip + +The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used. + +The default values and order for `python_binary` was chosen to first identify the Python version in a virtualenv/conda environments (which currently still add a `python`, no matter if it points to `python3` or `python2`). This has the side effect that if you still have a system Python 2 installed, it may be picked up before any Python 3 (at least on Linux Distros that always symlink `/usr/bin/python` to Python 2). If you do not work with Python 2 anymore but cannot remove the system Python 2, changing this to `"python3"` will hide any Python version 2, see example below. + +::: + +### Variables + +| Variable | Example | Description | +| ------------ | --------------- | ------------------------------------------ | +| version | `"v3.8.1"` | The version of `python` | +| symbol | `"🐍 "` | Mirrors the value of option `symbol` | +| style | `"yellow bold"` | Mirrors the value of option `style` | +| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | +| virtualenv | `"venv"` | The current `virtualenv` name | + + +### Example + +```toml +# ~/.config/starship.toml + +[python] +symbol = "👾 " +pyenv_version_name = true +``` + +```toml +# ~/.config/starship.toml + +[python] +# Only use the `python3` binary to get the version. +python_binary = "python3" +``` + +## Ruby + +The `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Gemfile` file +- The current directory contains a `.ruby-version` file +- The current directory contains a `.rb` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `ruby` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v2.5.1` | The version of `ruby` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[ruby] +symbol = "🔺 " +``` + +## Rust + +The `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Cargo.toml` file +- The current directory contains a file with the `.rs` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `rust` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ----------------- | ------------------------------------ | +| version | `v1.43.0-nightly` | The version of `rustc` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[rust] +format = "via [⚙️ $version](red bold)" +``` + +## SHLVL + +The `shlvl` module shows the current SHLVL ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. + +### Options + +| Option | Default | Description | +| ----------- | ---------------------------- | ----------------------------------------------------------- | +| `threshold` | `2` | Display threshold. | +| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. | +| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | +| `repeat` | `false` | Causes `symbol` to be repeated by the current SHLVL amount. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `true` | Disables the `shlvl` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| shlvl | `3` | The current value of SHLVL | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[shlvl] +disabled = false +format = "$shlvl level(s) down" +threshold = 3 +``` + +## Singularity + +The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set. + +### Options + +| Option | Default | Description | +| ---------- | -------------------------------- | ------------------------------------------------ | +| `format` | `'[$symbol\[$env\]]($style) '` | The format for the module. | +| `symbol` | `""` | A format string displayed before the image name. | +| `style` | `"bold dimmed blue"` | The style for the module. | +| `disabled` | `false` | Disables the `singularity` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------ | ------------------------------------ | +| env | `centos.img` | The current singularity image | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[singularity] +format = '[📦 \[$env\]]($style) ' +``` + +## Status + +The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: + +### Options + +| Option | Default | Description | +| ----------------------- | -------------------------- | ---------------------------------------------------- | +| `format` | `[$symbol$status]($style)` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | +| `style` | `"bold red"` | The style for the module. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | + +### Variables + +| Variable | Example | Description | +| -------------- | ------- | -------------------------------------------------------------------- | +| status | `127` | The exit code of the last command | +| int | `127` | The exit code of the last command | +| common_meaning | `ERROR` | Meaning of the code if not a signal | +| signal_number | `9` | Signal number corresponding to the exit code, only if signalled | +| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled | +| maybe_int | `7` | Contains the exit code number when no meaning has been found | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml + +# ~/.config/starship.toml + +[status] +style = "bg:blue" +symbol = "🔴" +format = '[\[$symbol $status_common_meaning$status_signal_name$status_maybe_int\]]($style) ' +map_symbol = true +disabled = false + +``` + +## Swift + +The `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Package.swift` file +- The current directory contains a file with the `.swift` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | The style for the module. | +| `disabled` | `false` | Disables the `swift` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v5.2.4` | The version of `swift` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[swift] +format = "via [🏎 $version](red bold)" +``` + +## Terraform + +The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). The module will be shown if any of the following conditions are met: + +- The current directory contains a `.terraform` folder +- Current directory contains a file with the `.tf` or `.hcl` extensions + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | +| `symbol` | `"💠 "` | A format string shown before the terraform workspace. | +| `style` | `"bold 105"` | The style for the module. | +| `disabled` | `false` | Disables the `terraform` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `terraform` | +| workspace | `default` | The current terraform workspace | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +#### With Version + +```toml +# ~/.config/starship.toml + +[terraform] +format = "[🏎💨 $version$workspace]($style) " +``` + +#### Without version + +```toml +# ~/.config/starship.toml + +[terraform] +format = "[🏎💨 $workspace]($style) " +``` + +## Time + +The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `format` | `"at [$time]($style) "` | The format string for the module. | +| `use_12hr` | `false` | Enables 12 hour formatting | +| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. | +| `style` | `"bold yellow"` | The style for the module time | +| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. | +| `disabled` | `true` | Disables the `time` module. | +| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | + +If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ----------------------------------- | +| time | `13:08:10` | The current time. | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[time] +disabled = false +format = '🕙[\[ $time \]]($style) ' +time_format = "%T" +utc_time_offset = "-5" +time_range = "10:00:00-14:00:00" +``` + +## Username + +The `username` module shows active user's username. The module will be shown if any of the following conditions are met: + +- The current user is root +- The current user isn't the same as the one that is logged in +- The user is currently connected as an SSH session +- The variable `show_always` is set to true + +::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. ::: + +### Options + +| Option | Default | Description | +| ------------- | ----------------------- | ------------------------------------- | +| `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. | +| `show_always` | `false` | Always shows the `username` module. | +| `disabled` | `false` | Disables the `username` module. | + +### Variables + +| Variable | Example | Description | +| -------- | ------------ | ------------------------------------------------------------------------------------------- | +| `style` | `"red bold"` | Mirrors the value of option `style_root` when root is logged in and `style_user` otherwise. | +| `user` | `"matchai"` | The currently logged-in user ID. | + +### Example + +```toml +# ~/.config/starship.toml + +[username] +style_user = "white bold" +style_root = "black bold" +format = "user: [$user]($style) " +disabled = false +show_always = true +``` + +## Zig + +The `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met: + +- The current directory contains a `.zig` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | The style for the module. | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `disabled` | `false` | Disables the `zig` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v0.6.0` | The version of `zig` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[zig] +symbol = "⚡️ " +``` + +## Custom commands + +The `custom` modules show the output of some arbitrary commands. + +These modules will be shown if any of the following conditions are met: + +- 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 + +::: tip + +Multiple custom modules can be defined by using a `.`. + +::: + +::: tip + +The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined. + +::: + +::: tip + +[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! + +::: + +### 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` | `""` | 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. | + +### Variables + +| Variable | Description | +| --------- | -------------------------------------- | +| output | The output of shell command in `shell` | +| symbol | Mirrors the value of option `symbol` | +| style\* | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +#### Custom command shell + +`shell` accepts a non-empty list of strings, where: + +- The first string is the path to the shell to use to execute the command. +- Other following arguments are passed to the shell. + +If unset, it will fallback to STARSHIP_SHELL and then to "sh" on Linux, and "cmd /C" on Windows. + +The `command` will be passed in on 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. + +```toml +shell = ["pwsh", "-Command", "-"] +``` + +::: warning Make sure your custom shell configuration exits gracefully + +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). + +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. + +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. + +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. + +::: + +### Example + +```toml +# ~/.config/starship.toml + +[custom.foo] +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters +when = """ test "$HOME" == "$PWD" """ +format = " transcending [$output]($style)" + +[custom.time] +command = "time /T" +files = ["*.pst"] +shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +``` diff --git a/docs/ar-SA/faq/README.md b/docs/ar-SA/faq/README.md new file mode 100644 index 000000000..9bb23bf93 --- /dev/null +++ b/docs/ar-SA/faq/README.md @@ -0,0 +1,92 @@ +# 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) +- **Shell**: [Fish Shell](https://fishshell.com/) + - **Configuration**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish) + - **Prompt**: [Starship](https://starship.rs/) + +## How do I get command completion as shown in the demo GIF? + +Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions). + +## Do top level `format` and `.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, `.disabled` is the preferred way to do so for these reasons: + +- Disabling modules is more explicit than omitting them from the top level `format` +- Newly created modules will be added to the prompt as Starship is updated + +## The docs say Starship is cross-shell. Why isn't my preferred shell supported? + +The way Starship is built, it should be possible to add support for virtually any shell. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used. + +Here's a small example getting Starship working with bash: + +```sh +# Get the status code from the last command executed +STATUS=$? + +# Get the number of jobs running. +NUM_JOBS=$(jobs -p | wc -l) + +# Set the prompt to the output of `starship prompt` +PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)" +``` + +The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#Command-Duration) and to ensure that Starship is compatible with pre-installed Bash configurations. + +For a list of all flags accepted by `starship prompt`, use the following command: + +```sh +starship prompt --help +``` + +The prompt will use as much context as is provided, but no flags are "required". + +## How do I run Starship on Linux distributions with older versions of glibc? + +If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`: + +```sh +curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl +``` + +## Why don't I see a glyph symbol in my prompt? + +The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that: + +- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/). +- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice. +- You are using a [Nerd Font](https://www.nerdfonts.com/). + +To test your system, run the following commands in a terminal: + +```sh +echo -e "\xf0\x9f\x90\x8d" +echo -e "\xee\x82\xa0" +``` + +The first line should produce a [snake emoji](https://emojipedia.org/snake/), while the second should produce a [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs). + +If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose) + +## How do I uninstall Starship? + +Starship is just as easy to uninstall as it is to install in the first place. + +1. Remove any lines in your shell config (e.g. `~/.bashrc`) used to initialize Starship. +1. Delete the Starship binary. + +If Starship was installed using a package manager, please refer to their docs for uninstallation instructions. + +If Starship was installed using the `curl | bash` script, the following command will delete the binary: + +```sh +# Locate and delete the starship binary +rm "$(which starship)" +``` diff --git a/docs/ar-SA/guide/README.md b/docs/ar-SA/guide/README.md new file mode 100644 index 000000000..74b5b1e69 --- /dev/null +++ b/docs/ar-SA/guide/README.md @@ -0,0 +1,272 @@ +

+ Starship – Cross-shell prompt +

+ +

+ GitHub Actions workflow status + Crates.io version + Packaging status
+ Chat on Discord + Follow @StarshipPrompt on Twitter +

+ +

+ Website + · + Installation + · + Configuration +

+ +

+ English +   + 日本語 +   + 繁體中文 +   + Русский +   + Deutsch +   + 简体中文 +   + Español +   + Français +

+ +

+ +Starship with iTerm2 and the Snazzy theme + +**The minimal, blazing-fast, and infinitely customizable prompt for any shell!** + +- **Fast:** it's fast – _really really_ fast! 🚀 +- **Customizable:** configure every aspect of your prompt. +- **Universal:** works on any shell, on any operating system. +- **Intelligent:** shows relevant information at a glance. +- **Feature rich:** support for all your favorite tools. +- **Easy:** quick to install – start using it in minutes. + +

+Explore the Starship docs  ▶ +

+ + + +## 🚀 Installation + +### Prerequisites + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). + +### Getting Started + +1. Install the **starship** binary: + + + #### Install Latest Version + + + ##### From prebuilt binary, with Shell: + + ```sh + curl -fsSL https://starship.rs/install.sh | bash + ``` + + + ##### From source on [crates.io](https://crates.io/): + + ```sh + cargo install starship + ``` + + + #### Install via Package Manager + + + ##### With [Homebrew](https://brew.sh/): + + ```sh + brew install starship + ``` + + + ##### With [Scoop](https://scoop.sh): + + ```powershell + scoop install starship + ``` + +1. Add the init script to your shell's config file: + + + #### Bash + + Add the following to the end of `~/.bashrc`: + + ```sh + # ~/.bashrc + + eval "$(starship init bash)" + ``` + + + #### Fish + + Add the following to the end of `~/.config/fish/config.fish`: + + ```sh + # ~/.config/fish/config.fish + + starship init fish | source + ``` + + + #### Zsh + + Add the following to the end of `~/.zshrc`: + + ```sh + # ~/.zshrc + + eval "$(starship init zsh)" + ``` + + + #### PowerShell + + Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. + + ```sh + Invoke-Expression (&starship init powershell) + ``` + + + #### Ion + + Add the following to the end of `~/.config/ion/initrc`: + + ```sh + # ~/.config/ion/initrc + + eval $(starship init ion) + ``` + +## 🤝 Contributing + +We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). + +If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/). + +If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋 + +### Code Contributors + +This project exists thanks to all the people who contribute. [[Contribute](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]. + + +### Financial Contributors + +Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)] + +#### Individuals + + + +#### Organizations + +Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)] + + + + + + + + + + + + +## 💭 Inspired By + +Please check out these previous works that helped inspire the creation of starship. 🙏 + +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts. + +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript. + +- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons. + +

+
+ Starship rocket icon +

+ +## 📝 License + +Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).
This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed. diff --git a/docs/ar-SA/migrating-to-0.45.0/README.md b/docs/ar-SA/migrating-to-0.45.0/README.md new file mode 100644 index 000000000..95a847bf2 --- /dev/null +++ b/docs/ar-SA/migrating-to-0.45.0/README.md @@ -0,0 +1,267 @@ +# Migrating to v0.45.0 + +Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization. + +This guide is intended to walk you through the breaking changes. + +## `prompt_order` has been replaced by a root-level `format` + +Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship. + +Starship v0.45.0 instead accepts a `format` value, allowing for customization of the prompt outside of the modules themselves. + +**Example pre-v0.45.0 configuration** + +```toml +prompt_order = [ + "username", + "hostname", + "directory", + "git_branch", + "git_commit", + "git_state", + "git_status", + "cmd_duration", + "custom", + "line_break", + "jobs", + "battery", + "time", + "character", +] +``` + +**Example v0.45.0 configuration** + +```toml +format = """\ + $username\ + $hostname\ + $directory\ + $git_branch\ + $git_commit\ + $git_state\ + $git_status\ + $cmd_duration\ + $custom\ + $line_break\ + $jobs\ + $battery\ + $time\ + $character\ + """ +``` + +## Module `prefix` and `suffix` have been replaced by `format` + +Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered. + +Starship v0.45.0 instead accepts a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output. + +**Example pre-v0.45.0 configuration** + +```toml +[cmd_duration] +prefix = "took " +``` + +**Example v0.45.0 configuration** + +```toml +[cmd_duration] +# $duration – The command duration (e.g. "15s") +# $style – The default style of the module (e.g. "bold yellow") +format = "took [$duration]($style) " +``` + +### Affected Modules + +#### Character + +| Removed Property | Replacement | +| ----------------------- | ---------------- | +| `symbol` | `success_symbol` | +| `use_symbol_for_status` | `error_symbol` | +| `style_success` | `success_symbol` | +| `style_failure` | `error_symbol` | + +**Changes to the Default Configuration** + +```diff +[character] +-- symbol = "❯" +-- error_symbol = "✖" +-- use_symbol_for_status = true +-- vicmd_symbol = "❮" +++ success_symbol = "[❯](bold green)" +++ error_symbol = "[❯](bold red)" +++ vicmd_symbol = "[❮](bold green)" +``` + +Previously, the `use_symbol_for_status` property was used to configure the prompt to show the `error_symbol` when the last command resulted in a non-zero status code. + +With the release of v0.45.0, we now always use `error_symbol` after non-zero status codes, unifying `use_symbol_for_status` and `error_symbol` properties. + +To configure the prompt to use the older `use_symbol_for_status = true` configuration, add the following to your config file: + +```toml +[character] +error_symbol = "[✖](bold red)" +``` + +*Note:* The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples. + +#### Command Duration + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | + +**Changes to the Default Configuration** + +```diff +[cmd_duration] +-- prefix = "took " +++ format = "took [$duration]($style) " +``` + +#### Directory + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | + +**Changes to the Default Configuration** + +```diff +[directory] +-- prefix = "in " +++ format = "[$path]($style)[$read_only]($read_only_style) " +``` + +#### Environment Variable + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[env_var] +-- prefix = "" +-- suffix = "" +++ format = "with [$env_value]($style) " +``` + +#### Git Commit + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[git_commit] +-- prefix = "(" +-- suffix = ")" +++ format = '[\($hash\)]($style) ' +``` + +#### Git Status + +| Removed Property | Replacement | +| ----------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | +| `show_sync_count` | `format` | + +**Changes to the Default Configuration** + +```diff +[git_status] +-- prefix = "[" +-- suffix = "]" +-- show_sync_count = false +++ format = '([\[$all_status$ahead_behind\]]($style) )' +``` + +Previously, the `show_sync_count` property was used to configure the prompt to show the number of commits the branch was ahead or behind the remote branch. + +With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`. + +To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file: + +```toml +[git_status] +ahead = "⇡${count}" +diverged = "⇕⇡${ahead_count}⇣${behind_count}" +behind = "⇣${count}" +``` + +#### Hostname + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[hostname] +-- prefix = "" +-- suffix = "" +++ format = "[$hostname]($style) in " +``` + +#### Singularity + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `label` | `format` | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[singularity] +-- prefix = "" +-- suffix = "" +++ format = '[$symbol\[$env\]]($style) ' +``` + +#### Time + +| Removed Property | Replacement | +| ---------------- | ------------- | +| `format` | `time_format` | + +**Changes to the Default Configuration** + +```diff +[time] +-- format = "🕙[ %T ]" +++ time_format = "%T" +++ format = "at 🕙[$time]($style) " +``` + +#### Custom Commands + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[custom.example] +-- prefix = "" +-- suffix = "" +++ format = "[$symbol$output]($style) " +``` diff --git a/docs/ar-SA/presets/README.md b/docs/ar-SA/presets/README.md new file mode 100644 index 000000000..746364fa2 --- /dev/null +++ b/docs/ar-SA/presets/README.md @@ -0,0 +1,89 @@ +# Presets + +Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊 + +## Nerd Font Symbols + +This preset doesn't change anything except for the symbols used for each module. If emojis aren't your thing, this might catch your eye! + +![Screenshot of Nerd Font Symbols preset](/presets/nerd-font-symbols.png) + +### Prerequisites + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font) + +### Configuration + +```toml +[aws] +symbol = " " + +[conda] +symbol = " " + +[dart] +symbol = " " + +[directory] +read_only = " " + +[docker] +symbol = " " + +[elixir] +symbol = " " + +[elm] +symbol = " " + +[git_branch] +symbol = " " + +[golang] +symbol = " " + +[haskell] +symbol = " " + +[hg_branch] +symbol = " " + +[java] +symbol = " " + +[julia] +symbol = " " + +[memory_usage] +symbol = " " + +[nim] +symbol = " " + +[nix_shell] +symbol = " " + +[nodejs] +symbol = " " + +[package] +symbol = " " + +[perl] +symbol = " " + +[php] +symbol = " " + +[python] +symbol = " " + +[ruby] +symbol = " " + +[rust] +symbol = " " + +[swift] +symbol = "ﯣ " +``` diff --git a/docs/de-DE/README.md b/docs/de-DE/README.md index e98d28513..b26599aba 100644 --- a/docs/de-DE/README.md +++ b/docs/de-DE/README.md @@ -2,7 +2,7 @@ home: true heroImage: /logo.svg heroText: -tagline: The minimal, blazing-fast, and infinitely customizable prompt for any shell! +tagline: Minimale, super schnelle und unendlich anpassbare Prompt für jede Shell! actionText: Loslegen → actionLink: ./guide/ features: @@ -18,7 +18,7 @@ features: footer: ICS lizenziert | Copyright © 2019-heute Starship-Mitwirkende #Used for the description meta tag, for SEO metaTitle: "Starship: Cross-Shell Prompt" -description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and PowerShell. +description: Starship ist eine minimale, super schnelle, und extrem anpassbare Prompt für jede Shell! Shows the information you need, while staying sleek and minimal. Schnellinstallation verfügbar für Bash, Fish, ZSH, Ion und PowerShell. ---
diff --git a/docs/de-DE/advanced-config/README.md b/docs/de-DE/advanced-config/README.md index 4c09f9434..f699bf554 100644 --- a/docs/de-DE/advanced-config/README.md +++ b/docs/de-DE/advanced-config/README.md @@ -82,7 +82,7 @@ Style-String sind Wortlisten, getrennt durch Leerzeichen. Die Wörter haben kein wobei `` eine Farbspezifikation ist (siehe unten). `fg:` und `` tun derzeit dasselbe , das kann sich in Zukunft aber ändern. Die Reihenfolge der Wörter in der Liste spielt keine Rolle. -`None` überschreibt alle anderen Tokens in einem String, so dass z.B. der string `fg:red none fg:blue` kein Styling anzeigen wird. In der Zukunft könnte die Unterstützung von `none` in Verbindung mit anderen Tokens fallen gelassen werden. +The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. Eine Farbspezifikation kann wie folgt aussehen: diff --git a/docs/de-DE/config/README.md b/docs/de-DE/config/README.md index 046d7aaba..460dfe774 100644 --- a/docs/de-DE/config/README.md +++ b/docs/de-DE/config/README.md @@ -51,7 +51,7 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" **Module**: Eine Komponente in der Konsole, die auf kontextualisierte Informationen des OS basiert. Zum Beispiel zeigt das Modul "nodejs" die Version von NodeJS, die derzeit auf Ihrem Computer installiert ist, wenn Ihr aktuelles Verzeichnis ein NodeJS-Projekt ist. -**Variable**: Smaller sub-components that contains information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of NodeJS. +**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 NodeJS. By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. @@ -197,6 +197,7 @@ $golang\ $helm\ $java\ $julia\ +$kotlin\ $nim\ $nodejs\ $ocaml\ @@ -217,8 +218,8 @@ $gcloud\ $openstack\ $env_var\ $crystal\ -$cmd_duration\ $custom\ +$cmd_duration\ $line_break\ $lua\ $jobs\ @@ -302,26 +303,17 @@ Das `battery` Modul zeigt, wie hoch der Akku des Geräts geladen ist und den akt ### Optionen -| Option | Standartwert | Beschreibung | -| -------------------- | --------------------------------- | ----------------------------------------------------------------------------------- | -| `full_symbol` | `"•"` | Das Symbol das angezeigt wird wenn der Akku voll geladen ist. | -| `charging_symbol` | `"⇡"` | Das Symbol das angezeigt wird wenn der Akku aufgeladen wird. | -| `discharging_symbol` | `"⇣"` | Das Symbol, das angezeigt wird, wenn die Batterie entladen wird. | -| `format` | `"[$symbol$percentage]($style) "` | The format for the module. | -| `display` | [link](#battery-display) | Stellt den Grenzwert ein ab dem der Ladezustand (das battery-Modul) angezeigt wird. | -| `disabled` | `false` | Wenn der Wert auf `true` steht, wird das Akkustand-Modul deaktiviert. | +| Option | Standartwert | Beschreibung | +| -------------------- | --------------------------------- | ---------------------------------------------------------------- | +| `full_symbol` | `""` | Das Symbol das angezeigt wird wenn der Akku voll geladen ist. | +| `charging_symbol` | `""` | Das Symbol das angezeigt wird wenn der Akku aufgeladen wird. | +| `discharging_symbol` | `""` | Das Symbol, das angezeigt wird, wenn die Batterie entladen wird. | +| `unknown_symbol` | `""` | The symbol shown when the battery state is unknown. | +| `empty_symbol` | `""` | The symbol shown when the battery state is empty. | +| `format` | `"[$symbol$percentage]($style) "` | The format for the module. | +| `display` | [link](#battery-display) | Display threshold and style for the module. | +| `disabled` | `false` | Disables the `battery` module. | -
-Das Batterie-Modul unterstützt auch einige untypische Zustände. - -| Variable | Beschreibung | -| ---------------- | --------------------------------------------------- | -| `unknown_symbol` | The symbol shown when the battery state is unknown. | -| `empty_symbol` | The symbol shown when the battery state is empty. | - -Note: Battery indicator will be hidden if the status is `unknown` or `empty` unless you specify the option in the config. - -
### Beispiel @@ -336,7 +328,7 @@ discharging_symbol = "💀" ### Anzeige des Akkustandes -Die `display` Konfiguration "threshold" stellt ein ab wann die Akkuanzeige eingeblendet wird. Mit "style" wird das Erscheinungsbild festgelegt. Wenn `display` nicht angegeben ist. Die Standardwerte sind folgende: +The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. Die Standardwerte sind folgende: ```toml [[battery.display]] @@ -346,12 +338,12 @@ style = "bold red" #### Optionen -Die `display`-Option beinhaltet ein Array mit den folgenden Werten. +The `display` option is an array of the following table. -| Option | Beschreibung | -| ----------- | ------------------------------------------------------- | -| `threshold` | Der Schwellenwert zur Anzeige dieser Option. | -| `style` | Der Stil, der zur Anzeige dieser Option verwendet wird. | +| Option | Beschreibung | +| ----------- | ----------------------------------------------- | +| `threshold` | The upper bound for the display option. | +| `style` | The style used if the display option is in use. | #### Beispiel @@ -370,9 +362,9 @@ style = "bold yellow" ## Zeichen -Das `character` Modul zeigt ein Zeichen ( meistens einen Pfeil "❯") vor der Texteingabe an. +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. -Das Zeichen zeigt an ob der letzte Befehl erfolgreich war, oder einen Fehler erzeugt hat. It can do this in two ways: +The character will tell you whether the last command was successful or not. It can do this in two ways: - changing color (`red`/`green`) - changing shape (`❯`/`✖`) @@ -387,7 +379,7 @@ By default it only changes color. If you also want to change it's shape take a l | `success_symbol` | `"[❯](bold green)"` | The format string used before the text input if the previous command succeeded. | | `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. | | `vicmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | -| `disabled` | `false` | Deaktiviert das `character`-Modul. | +| `disabled` | `false` | Disables the `character` module. | ### Variables @@ -454,27 +446,27 @@ The `cmake` module shows the currently installed version of CMake if any of the ## 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. +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. -::: warning Nicht die DEBUG-trap in der Bash hooken +::: warning Do not hook the DEBUG trap in Bash -Ist `bash` die Konsole der Wahl, dann nicht die `DEBUG`-trap nach der Ausführung von `eval $(starship init $0)` hooken, andernfalls **wird** dieses Modul unweigerlich untergehen. +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. ::: -Bash Nutzer, die eine "preexec" ähnliche Funktion benötigen, können [rcaloras bash_preexec Framework](https://github.com/rcaloras/bash-preexec) verwenden. Definieren Sie einfach die Arrays `preexec_functions` und `precmd_functions` bevor sie `eval $(starship init $0)` ausführen, und fahren Sie dann wie gewohnt fort. +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. ### Optionen -| Option | Standardwert | Beschreibung | -| -------------------- | ----------------------------- | ------------------------------------------------------------------ | -| `min_time` | `2_000` | Schwellwert für kleinste anzuzeigende Laufzeit (in Millisekunden). | -| `show_milliseconds` | `false` | Zeige Millisekunden zusätzlich zu Sekunden. | -| `format` | `"took [$duration]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | Stil für dieses Modul. | -| `disabled` | `false` | Deaktiviert das `cmd_duration`-Modul. | -| `show_notifications` | `false` | Show desktop notifications when command completes. | -| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | +| Option | Standardwert | Beschreibung | +| -------------------- | ----------------------------- | ---------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | Stil für dieses Modul. | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `show_notifications` | `false` | Show desktop notifications when command completes. | +| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | ::: Tipp @@ -513,14 +505,14 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c ### Optionen -| Option | Standardwert | Beschreibung | -| ------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `truncation_length` | `1` | Die Anzahl der Verzeichnisse, auf die der Verzeichnisspfad abgeschnitten werden soll, wenn die Umgebung über `conda erstellt wurde -p [path]`. `0` bedeutet keine Kürzung. Beachte auch die Beschreibung für das [`directory`](#directory) Modul. | -| `symbol` | `"🅒 "` | Symbol das vor dem Umgebungsnamen angezeigt wird. | -| `style` | `"bold green"` | Stil für dieses Modul. | -| `format` | `"[$symbol$environment]($style) "` | The format for the module. | -| `ignore_base` | `true` | Ignores `base` environment when activated. | -| `disabled` | `false` | Deaktiviert das `conda`-Modul. | +| Option | Standardwert | Beschreibung | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. | +| `symbol` | `"🅒 "` | The symbol used before the environment name. | +| `style` | `"bold green"` | Stil für dieses Modul. | +| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `disabled` | `false` | Disables the `conda` module. | ### Variables @@ -543,7 +535,7 @@ format = "[$symbol$environment](dimmed green) " ## Crystal -The `crystal` module shows the currently installed version of Crystal. The module will be shown if any of the following conditions are met: +The `crystal` module shows the currently installed version of Crystal. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: - Das aktuelle Verzeichnis enthält eine `shard.yml`-Datei - The current directory contains a `.cr` file @@ -578,7 +570,7 @@ format = "via [✨ $version](bold blue) " ## Dart -The `dart` module shows the currently installed version of Dart. The module will be shown if any of the following conditions are met: +The `dart` module shows the currently installed version of Dart. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: - The current directory contains a file with `.dart` extension - The current directory contains a `.dart_tool` directory @@ -586,7 +578,7 @@ The `dart` module shows the currently installed version of Dart. The module will ### Optionen -| Option | Standartwert | Beschreibung | +| Option | Standardwert | Beschreibung | | ---------- | ---------------------------------- | ----------------------------------------------- | | `format` | `"via [$symbol$version]($style) "` | The format for the module. | | `symbol` | `"🎯 "` | A format string representing the symbol of Dart | @@ -624,11 +616,11 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | Option | Standardwert | Beschreibung | | ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | -| `truncation_length` | `3` | Die Anzahl der übergeordneten Ordner, die angezeigt werden. | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | | `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | | `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | | `style` | `"bold cyan"` | Stil für dieses Modul. | -| `disabled` | `false` | Deaktiviert das `directory`-Modul. | +| `disabled` | `false` | Disables the `directory` module. | | `read_only` | `"🔒"` | The symbol indicating current directory is read only. | | `read_only_style` | `"red"` | The style for the read only symbol. | | `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | @@ -730,13 +722,13 @@ The module will also show the Target Framework Moniker ( ⚠️ Die angezeigte Version ist die des Pakets, dessen Quellcode im Verzeichnis liegt, nicht die des Paketmanagers. @@ -1795,7 +1833,7 @@ format = "via [🎁 $version](208 bold) " ## Perl -The `perl` module shows the currently installed version of Perl. The module will be shown if any of the following conditions are met: +The `perl` module shows the currently installed version of Perl. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: - The current directory contains a `Makefile.PL` or `Build.PL` file - The current directory contains a `cpanfile` or `cpanfile.snapshot` file @@ -1831,7 +1869,7 @@ format = "via [🦪 $version]($style) " ## PHP -The `php` module shows the currently installed version of PHP. The module will be shown if any of the following conditions are met: +The `php` module shows the currently installed version of PHP. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: - The current directory contains a `composer.json` file - The current directory contains a `.php-version` file @@ -1867,7 +1905,7 @@ format = "via [🔹 $version](147 bold) " ## PureScript -The `purescript` module shows the currently installed version of PureScript version. The module will be shown if any of the following conditions are met: +The `purescript` module shows the currently installed version of PureScript version. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: - The current directory contains a `spago.dhall` file - The current directory contains a \*.purs files @@ -1906,7 +1944,7 @@ The `python` module shows the currently installed version of Python and the curr If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`. -The module will be shown if any of the following conditions are met: +Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: - The current directory contains a `.python-version` file - The current directory contains a `requirements.txt` file @@ -1920,16 +1958,24 @@ The module will be shown if any of the following conditions are met: ### Optionen -| Option | Standardwert | Beschreibung | -| -------------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | Stil für dieses Modul. | -| `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | -| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | -| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. | -| `disabled` | `false` | Disables the `python` module. | +| Option | Standardwert | Beschreibung | +| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | Stil für dieses Modul. | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | + +::: Tipp + +The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used. + +The default values and order for `python_binary` was chosen to first identify the Python version in a virtualenv/conda environments (which currently still add a `python`, no matter if it points to `python3` or `python2`). This has the side effect that if you still have a system Python 2 installed, it may be picked up before any Python 3 (at least on Linux Distros that always symlink `/usr/bin/python` to Python 2). If you do not work with Python 2 anymore but cannot remove the system Python 2, changing this to `"python3"` will hide any Python version 2, see example below. + +::: ### Variables @@ -1952,20 +1998,17 @@ symbol = "👾 " pyenv_version_name = true ``` -Using the `python3` binary to get the version. - -Note - The `python_binary` variable changes the binary that Starship executes to get the version of Python, it doesn't change the arguments that are used. - ```toml # ~/.config/starship.toml [python] +# Only use the `python3` binary to get the version. python_binary = "python3" ``` ## Ruby -The `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met: +The `ruby` module shows the currently installed version of Ruby. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: - The current directory contains a `Gemfile` file - The current directory contains a `.ruby-version` file @@ -2001,7 +2044,7 @@ symbol = "🔺 " ## Rust -The `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met: +The `rust` module shows the currently installed version of Rust. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: - The current directory contains a `Cargo.toml` file - The current directory contains a file with the `.rs` extension @@ -2040,13 +2083,14 @@ The `shlvl` module shows the current SHLVL ("shell level") environment variable, ### Optionen -| Option | Standardwert | Beschreibung | -| ----------- | ---------------------------- | --------------------------------------- | -| `threshold` | `2` | Display threshold. | -| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. | -| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | -| `style` | `"bold yellow"` | Stil für dieses Modul. | -| `disabled` | `true` | Disables the `shlvl` module. | +| Option | Standardwert | Beschreibung | +| ----------- | ---------------------------- | ----------------------------------------------------------- | +| `threshold` | `2` | Display threshold. | +| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. | +| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | +| `repeat` | `false` | Causes `symbol` to be repeated by the current SHLVL amount. | +| `style` | `"bold yellow"` | Stil für dieses Modul. | +| `disabled` | `true` | Disables the `shlvl` module. | ### Variables @@ -2111,20 +2155,31 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Optionen -| Option | Standardwert | Beschreibung | -| ---------- | -------------------------- | ------------------------------------------------------ | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | A format string representing the symbol for the status | -| `style` | `"bold red"` | Stil für dieses Modul. | -| `disabled` | `true` | Disables the `status` module. | +| Option | Standardwert | Beschreibung | +| ----------------------- | -------------------------- | ---------------------------------------------------- | +| `format` | `[$symbol$status]($style)` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | +| `style` | `"bold red"` | Stil für dieses Modul. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### Variables -| Variable | Beispiel | Beschreibung | -| --------- | -------- | ------------------------------------ | -| status | `127` | The exit code of the last command | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Beispiel | Beschreibung | +| -------------- | -------- | -------------------------------------------------------------------- | +| status | `127` | The exit code of the last command | +| int | `127` | The exit code of the last command | +| common_meaning | `ERROR` | Meaning of the code if not a signal | +| signal_number | `9` | Signal number corresponding to the exit code, only if signalled | +| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled | +| maybe_int | `7` | Contains the exit code number when no meaning has been found | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | \*: This variable can only be used as a part of a style string @@ -2136,15 +2191,16 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y [status] style = "bg:blue" -symbol = "💣 " -format = '[\[$symbol$status\]]($style) ' +symbol = "🔴" +format = '[\[$symbol $status_common_meaning$status_signal_name$status_maybe_int\]]($style) ' +map_symbol = true disabled = false ``` ## Swift -The `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met: +The `swift` module shows the currently installed version of Swift. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: - The current directory contains a `Package.swift` file - The current directory contains a file with the `.swift` extension @@ -2179,7 +2235,7 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). The module will be shown if any of the following conditions are met: +The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: - The current directory contains a `.terraform` folder - Current directory contains a file with the `.tf` or `.hcl` extensions @@ -2272,13 +2328,15 @@ time_range = "10:00:00-14:00:00" ## Username -The `username` module shows active user's username. The module will be shown if any of the following conditions are met: +The `username` module shows active user's username. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: - The current user is root - The current user isn't the same as the one that is logged in - The user is currently connected as an SSH session - The variable `show_always` is set to true +::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. ::: + ### Optionen | Option | Standardwert | Beschreibung | @@ -2311,7 +2369,7 @@ show_always = true ## Zig -The `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met: +The `zig` module shows the currently installed version of Zig. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: - The current directory contains a `.zig` file diff --git a/docs/de-DE/faq/README.md b/docs/de-DE/faq/README.md index 72d17001c..b6f8654d2 100644 --- a/docs/de-DE/faq/README.md +++ b/docs/de-DE/faq/README.md @@ -12,7 +12,7 @@ ## How do I get command completion as shown in the demo GIF? -Completion support 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). +Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions). ## Do top level `format` and `.disabled` do the same thing? @@ -21,7 +21,7 @@ Ja, beide können benutzt werden, um Module in der Prompt zu deaktivieren. Wenn - Disabling modules is more explicit than omitting them from the top level `format` - Mit der Aktualisierung von Starship werden neu erstellte Module an die Eingabezeile angefügt -## Laut Dokumentation ist Starship cross-shell, aber es läuft nicht auf shell X. Warum? +## The docs say Starship is cross-shell. Why isn't my preferred shell supported? Starship ist auf so eine Weise gebaut, das die Unterstützung so gut wie jeder Shell möglch sein sollte. Die Starship Binärdatei läuft völlig unabhängig von der Shell, und sollte auf jeder benutzt werden können, die eine Anpassung des Stils erlaubt. diff --git a/docs/de-DE/guide/README.md b/docs/de-DE/guide/README.md index f9f5e2dd8..40ad9c69e 100644 --- a/docs/de-DE/guide/README.md +++ b/docs/de-DE/guide/README.md @@ -26,7 +26,7 @@ Follow @StarshipPrompt on Twitter + alt="Folge @StarshipPrompt auf Twitter" />

@@ -79,13 +79,15 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png" alt="简体中文" />   - Español   - - **The minimal, blazing-fast, and infinitely customizable prompt for any shell!** - - **Fast:** it's fast – _really really_ fast! 🚀 - **Customizable:** configure every aspect of your prompt. - **Universal:** works on any shell, on any operating system. @@ -121,24 +121,24 @@ ### Voraussetzungen -- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). +- Eine [Nerd Schriftart](https://www.nerdfonts.com/) installiert und im Terminal aktiviert (zum Beispiel [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). ### Erste Schritte -1. Installiere die Binärversion von **starship**: +1. Installiere **starship**: #### Neueste Version installieren - ##### Neuster GitHub Release mit Shell: + ##### Neuster GitHub Release über die Shell: ```sh curl -fsSL https://starship.rs/install.sh | bash ``` - ##### Von Quellcode auf [crates.io](https://crates.io/): + ##### Per Quellcode über [crates.io](https://crates.io/): ```sh cargo install starship @@ -199,7 +199,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. + Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. ```sh Invoke-Expression (&starship init powershell) @@ -220,14 +220,16 @@ Wir laden Leute **aller Erfahrungsstufen** herzlich ein mitzumachen! Falls du dich mit dem Projekt vertaut machen willst, versuche ein [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). -Falls du an Starship mitwirken willst, wirf bitte einen Blick auf den [Leitfaden zum Mitwirken](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Schau auch gerne auf unserem [Discord-Server](https://discord.gg/8Jzqu3T) vorbei. 👋 +Wenn du eine andere Sprache flüssig sprichts, würden wir uns sehr freuen wenn du helfen würdest die Dokumentation in anderen Sprachen auf dem aktuellsten Stand zu halten. Hier kannst du bei der Übersetzung helfen [Starship Crowdin](https://translate.starship.rs/). -### Code Contributors +Falls du an Starship mitwirken willst, wirf bitte einen Blick auf den [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Schau auch gerne auf unserem [Discord server](https://discord.gg/8Jzqu3T) vorbei. 👋 -This project exists thanks to all the people who contribute. [[Contribute](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]. +### Mitwirkenden + +Das Projekt existiert dank aller der, die Mitwirken. [[Mitmachen](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]. -### Financial Contributors +### Finanzielle Unterstützung Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)] @@ -235,7 +237,7 @@ Become a financial contributor and help us sustain our community. [[Contribute]( -#### Organizations +#### Organisationen Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)] @@ -252,7 +254,7 @@ Support this project with your organization. Your logo will show up here with a ## 💭 Inspiriert durch -Checkt bitte diese älteren Projekte, die das Entstehen von Starhip inspiriert haben. 🙏 +Schaut euch bitte auch die Projekte an, die die Entstehung von Starship inspiriert haben. 🙏 - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Ein ZSH-Prompt für Astronauten. diff --git a/docs/de-DE/presets/README.md b/docs/de-DE/presets/README.md index 660d396ab..5fc218662 100644 --- a/docs/de-DE/presets/README.md +++ b/docs/de-DE/presets/README.md @@ -18,17 +18,15 @@ This preset doesn't change anything except for the symbols used for each module. [aws] symbol = " " -[battery] -full_symbol = "" -charging_symbol = "" -discharging_symbol = "" - [conda] symbol = " " [dart] symbol = " " +[directory] +read_only = " " + [docker] symbol = " " diff --git a/docs/es-ES/advanced-config/README.md b/docs/es-ES/advanced-config/README.md index e6ee2e85d..bc0e41f72 100644 --- a/docs/es-ES/advanced-config/README.md +++ b/docs/es-ES/advanced-config/README.md @@ -82,7 +82,7 @@ Las cadenas de estilo son una lista de palabras, separadas por espacios en blanc donde `` es un especificador de color (discutido a continuación). `fg:` y `` hacen actualmente lo mismo, aunque esto puede cambiar en el futuro. El orden de las palabras en la cadena no importa. -El token `none` anula todas las otras fichas en una cadena, por lo que, por ejemplo, `fg:red none fg:blue` creará una cadena sin ningún tipo de estilo. Puede convertirse en un error usar `none` junto con otros estilos en el futuro. +El token `none` anula todos los demás tokens en una cadena si no es parte de un especificador `bg:`, de modo que por ejemplo `fg:red none fg:blue` creará una cadena sin ningún estilo. `bg:none` establece el fondo al color predeterminado, así que `fg:red bg:none` es equivalente a `red` o `fg:red` y `bg:green fg:red bg:none` también es equivalente a `fg:red` o `red`. Puede convertirse en un error usar `none` junto con otros tokens en el futuro. Un especificador de color puede ser uno de los siguientes: diff --git a/docs/es-ES/config/README.md b/docs/es-ES/config/README.md index 4b262cd4f..df1b2e75d 100644 --- a/docs/es-ES/config/README.md +++ b/docs/es-ES/config/README.md @@ -52,7 +52,7 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" **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. Por ejemplo, la variable "version" en el módulo "nodejs" contiene la versión actual de NodeJS. +**Variable**: Smaller sub-components that contain information provided by the module. 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 predeterminado de la terminal (por ejemplo, `vía` en "nodejs") y un espacio vacío como sufijo. @@ -174,7 +174,7 @@ La varieble `format` por defecto se utiliza para definir el formato del prompt, ```toml format = "$all" -# Que es equivalente a +# Which is equivalent to format = """ $username\ $hostname\ @@ -198,6 +198,7 @@ $golang\ $helm\ $java\ $julia\ +$kotlin\ $nim\ $nodejs\ $ocaml\ @@ -218,8 +219,8 @@ $gcloud\ $openstack\ $env_var\ $crystal\ -$cmd_duration\ $custom\ +$cmd_duration\ $line_break\ $lua\ $jobs\ @@ -303,26 +304,17 @@ El módulo `battery` muestra la cantidad de batería y si se está cargando o no ### Opciones -| Opción | Por defecto | Descripción | -| -------------------- | --------------------------------- | ------------------------------------------------- | -| `full_symbol` | `"•"` | Se muestra cuando la batería está cargada. | -| `charging_symbol` | `"⇡"` | Se muestra cuando la batería se está cargando. | -| `discharging_symbol` | `"⇣"` | Se muestra cuando la batería se está descargando. | -| `format` | `"[$symbol$percentage]($style) "` | El formato del módulo. | -| `display` | [ver aquí](#battery-display) | Define cuándo mostrar el indicador y el estilo. | -| `disabled` | `false` | Desactiva el módulo `battery`. | +| Opción | Por defecto | Descripción | +| -------------------- | --------------------------------- | --------------------------------------------------- | +| `full_symbol` | `""` | Se muestra cuando la batería está cargada. | +| `charging_symbol` | `""` | Se muestra cuando la batería se está cargando. | +| `discharging_symbol` | `""` | Se muestra cuando la batería se está descargando. | +| `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) "` | El formato del módulo. | +| `display` | [ver aquí](#battery-display) | Display threshold and style for the module. | +| `disabled` | `false` | Disables the `battery` module. | -

-Hay otras opciones para algunos estados de la batería menos comunes. - -| Variable | Descripción | -| ---------------- | ------------------------------------------------------------------------ | -| `unknown_symbol` | El símbolo que se muestra cuando el estado de la batería es desconocido. | -| `empty_symbol` | El símbolo que se muestra cuando el estado de la batería está vacío. | - -Nota: El indicador de batería se ocultará si el estado es `desconocido` o `vacío` a menos que se especifique la opción en la configuración. - -
### Ejemplo @@ -337,7 +329,7 @@ discharging_symbol = "💀" ### Indicador de batería -La configuración de la opción `display` es usada para definir cuándo se debe mostrar el indicador de batería y cómo debe mostrarse. Si no se provee ningún valor para `display`, el valor por defecto es el siguiente: +The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. El valor por defecto es el siguiente: ```toml [[battery.display]] @@ -347,12 +339,12 @@ style = "bold red" #### Opciones -La opción `display` es un array de la siguiente tabla. +The `display` option is an array of the following table. -| Opción | Descripción | -| ----------- | --------------------------------------------------------------- | -| `threshold` | El umbral para la opción de visualización. | -| `style` | El estilo usado cuando si la opción <0>display está activa. | +| Opción | Descripción | +| ----------- | ----------------------------------------------- | +| `threshold` | The upper bound for the display option. | +| `style` | The style used if the display option is in use. | #### Ejemplo @@ -371,30 +363,30 @@ style = "bold yellow" ## Character -El módulo `character` muestra un carácter (normalmente una flecha) tras el texto que introduces en el terminal. +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. -El carácter te dirá si el último comando funcionó o no. Se puede hacer de dos maneras: +The character will tell you whether the last command was successful or not. It can do this in two ways: - Cambiando el color (`red`/`green`) - Cambiando la forma (`.`/`✖`) -Por defecto sólo cambia el color. Si también se quiere cambiar su forma, ver [este ejemplo](#with-custom-error-shape). +By default it only changes color. If you also want to change it's shape take a look at [this example](#with-custom-error-shape). ### Opciones -| Opción | Por defecto | Descripción | -| ---------------- | ------------------- | ------------------------------------------------------------------------------------------------------- | -| `format` | `"$symbol "` | La cadena de formato usada antes de la entrada de texto. | -| `success_symbol` | `"[❯](bold green)"` | La cadena de formato usada antes de la entrada de texto si el comando anterior tuvo éxito. | -| `error_symbol` | `"[❯](bold red)"` | La cadena de formato usada antes de la entrada de texto si el comando anterior falló. | -| `vicmd_symbol` | `"[❮](bold green)"` | El cadena de formato antes de la entrada de texto si el intérprete de comandos está en modo vim normal. | -| `disabled` | `false` | Desactiva el módulo `character`. | +| Opción | Por defecto | Descripción | +| ---------------- | ------------------- | -------------------------------------------------------------------------------- | +| `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. | +| `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. | +| `vicmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | +| `disabled` | `false` | Disables the `character` module. | ### Variables -| Variable | Ejemplo | Descripción | -| -------- | ------- | -------------------------------------------------------------- | -| symbol | | Un espejo de `success_symbol`, `error_symbol` o `vicmd_symbol` | +| Variable | Ejemplo | Descripción | +| -------- | ------- | --------------------------------------------------------------------- | +| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` | ### Ejemplos @@ -429,25 +421,25 @@ vicmd_symbol = "[V](bold green) " ## CMake -El módulo `cmake` muestra la versión instalada de CMake si se cumple alguna de las siguientes condiciones: +The `cmake` module shows the currently installed version of CMake if any of the following conditions are met: - El directorio actual contiene un archivo `CMakeLists.txt` - El directorio actual contiene un archivo `CMakeCache.txt` ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ---------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"喝 "` | El símbolo usado antes de la versión de cmake. | -| `style` | `"bold blue"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `cmake`. | +| Opción | Por defecto | Descripción | +| ---------- | ---------------------------------- | -------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `cmake` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | --------- | -------------------------------------- | -| version | `v3.17.3` | La versión de cmake | +| version | `v3.17.3` | The version of cmake | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -455,40 +447,40 @@ El módulo `cmake` muestra la versión instalada de CMake si se cumple alguna de ## 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. +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. -::: aviso No utilizar DEBUG en Bash +::: warning Do not hook the DEBUG trap in Bash -Si estás usando Starship con `Bash`, no uses `DEBUG` después de ejecutar `eval $(starship init $0)`, o el módulo **se romperá**. +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. ::: -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. +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. ### Opciones -| Opción | Por defecto | Descripción | -| -------------------- | ----------------------------- | --------------------------------------------------------------------- | -| `min_time` | `2_000` | Duración mínima para mostrar el tiempo de ejecución (en milisegundos) | -| `show_milliseconds` | `false` | Muestra la duración con precisión en milisegundos. | -| `format` | `"took [$duration]($style) "` | El formato del módulo. | -| `style` | `"bold yellow"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `cmd_duration`. | -| `show_notifications` | `false` | Muestra notificaciones de escritorio cuando se complete el comando. | -| `min_time_to_notify` | `45_000` | Duración más corta para la notificación (en milisegundos). | +| Opción | Por defecto | Descripción | +| -------------------- | ----------------------------- | ---------------------------------------------------------- | +| `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) "` | El formato del módulo. | +| `style` | `"bold yellow"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `show_notifications` | `false` | Show desktop notifications when command completes. | +| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | ::: tip -Mostrar notificaciones de escritorio requiere que se construya starship con soporte de `rust-notify`. Comprueba si tu Starship soporta notificaciones ejecutando `STARSHIP_LOG=debug starship module cmd_duration -d 60000` cuando `show_notifications` está establecido en `true`. +Showing desktop notifications requires starship to be built with `rust-notify` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. ::: ### Variables -| Variable | Ejemplo | Descripción | -| --------- | -------- | ------------------------------------------ | -| duration | `16m40s` | El tiempo que tardó en ejecutar el comando | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| --------- | -------- | --------------------------------------- | +| duration | `16m40s` | The time it took to execute the command | +| style\* | | Refleja el valor de la opción `style` | \*: Esta variable sólo puede ser usada como parte de una cadena de estilo @@ -504,30 +496,30 @@ format = "underwent [$duration](bold yellow)" ## Conda -El módulo `conda` muestra el entorno conda actual, si `$CONDA_DEFAULT_ENV` está configurado. +The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set. ::: tip -Esto no modifica el propio prompt de conda. En caso de querer suprimirlo, ejecuta `conda config --set changeps1 False`. +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. ::: ### Opciones -| Opción | Por defecto | Descripción | -| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `truncation_length` | `1` | El número de directorios a los que se debe truncar la variable de entorno, si el entorno fue creado usando `conda create -p [path]`. `0` significa sin truncamiento. Mirar también el módulo [`directory`](#directory). | -| `symbol` | `"🅒 "` | El símbolo usado antes del nombre del entorno. | -| `style` | `"bold green"` | El estilo del módulo. | -| `format` | `"[$symbol$environment]($style) "` | El formato del módulo. | -| `ignore_base` | `true` | Ignora el entorno `base` cuando se activa. | -| `disabled` | `false` | Desactiva el módulo `conda`. | +| Opción | Por defecto | Descripción | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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"` | El estilo del módulo. | +| `format` | `"via [$symbol$environment]($style) "` | El formato del módulo. | +| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `disabled` | `false` | Disables the `conda` module. | ### Variables | Variable | Ejemplo | Descripción | | ----------- | ------------ | -------------------------------------- | -| environment | `astronauts` | El entorno conda actual | +| environment | `astronauts` | The current conda environment | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -544,25 +536,25 @@ format = "[$symbol$environment](dimmed green) " ## Crystal -El módulo `crystal` muestra la versión actual instalada de Crystal. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `crystal` module shows the currently installed version of Crystal. El módulo se muestra si algunas de las siguientes condiciones se cumplen: - El directorio actual contiene un fichero `shard.yml` - El directorio actual contiene un fichero `.cr` ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | --------------------------------------------- | -| `symbol` | `"🔮 "` | Símbolo usado antes de la versión de Crystal. | -| `style` | `"bold red"` | El estilo del módulo. | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `disabled` | `false` | Desactiva el módulo `crystal`. | +| Opción | Por defecto | Descripción | +| ---------- | ---------------------------------- | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | El estilo del módulo. | +| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | +| `disabled` | `false` | Disables the `crystal` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | --------- | -------------------------------------- | -| version | `v0.32.1` | La versión de `crystal` | +| version | `v0.32.1` | The version of `crystal` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -579,7 +571,7 @@ format = "via [✨ $version](bold blue) " ## Dart -El módulo `dart` muestra la versión actualmente instalada de Dart. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `dart` module shows the currently installed version of Dart. El módulo se muestra si algunas de las siguientes condiciones se cumplen: - El directorio actual contiene un archivo con la extensión `.dart` - El directorio actual contiene un directorio `.dart_tool` @@ -587,18 +579,18 @@ El módulo `dart` muestra la versión actualmente instalada de Dart. El módulo ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"🎯 "` | Una cadena de formato que representa el símbolo de Dart | -| `style` | `"bold blue"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `dart`. | +| Opción | Por defecto | Descripción | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `dart` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v2.8.4` | La versión de `dart` | +| version | `v2.8.4` | The version of `dart` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -615,35 +607,35 @@ format = "via [🔰 $version](bold red) " ## 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. +The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. -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. +When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option. -Por ejemplo, dado `~/Dev/Nix/nixpkgs/pkgs` donde `nixpkgs` es la raíz del repositorio y la opción establecida a `1`. Ahora verás `~/D/N/nixpkgs/pkgs`, mientras que antes habría sido `nixpkgs/pkgs`. +For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`. ### Opciones -| Opción | Por defecto | Descripción | -| ------------------- | -------------------------------------------------- | --------------------------------------------------------------------- | -| `truncation_length` | `3` | El número de carpetas a las que se debe truncar el directorio actual. | -| `truncate_to_repo` | `true` | Truncar o no hasta la raíz del repositorio git en el que se esté. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | El formato del módulo. | -| `style` | `"bold cyan"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `directory`. | -| `read_only` | `"🔒"` | El símbolo que indica si el directorio actual es de sólo lectura. | -| `read_only_style` | `"red"` | El estilo para el símbolo de sólo lectura. | -| `truncation_symbol` | `""` | El símbolo a prefijar a las rutas truncadas. ej: "…/" | +| Opción | Por defecto | Descripción | +| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | El formato del módulo. | +| `style` | `"bold cyan"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `directory` module. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
-Este módulo tiene algunas opciones avanzadas de configuración que controlan cómo se muestra el directorio. +This module has a few advanced configuration options that control how the directory is displayed. -| Opciones avanzadas | Por defecto | Descripción | -| --------------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------- | -| `substitutions` | | Una tabla de sustituciones que se deben hacer a la ruta. | -| `fish_style_pwd_dir_length` | `0` | El número de caracteres a usar al aplicar la lógica de ruta pwd de la shell de fish. | -| `use_logical_path` | `true` | Muestra la ruta lógica proporcionada por el intérprete de comandos (`PWD`) en lugar de la ruta del sistema operativo. | +| Advanced Option | Por defecto | Descripción | +| --------------------------- | ----------- | ---------------------------------------------------------------------------------------- | +| `substitutions` | | A table of substitutions to be made to the path. | +| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. | +| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. | -`substitutions` permite definir reemplazos arbitrarios para cadenas literales que ocurren en la ruta, por ejemplo prefijos largos de red o directorios de desarrollo (p. ej. Java). Ten en cuenta que esto desactivará el estilo PWD de fish. +`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD. ```toml [directory.substitutions] @@ -651,7 +643,7 @@ Por ejemplo, dado `~/Dev/Nix/nixpkgs/pkgs` donde `nixpkgs` es la raíz del repos "src/com/long/java/path" = "mypath" ``` -`fish_style_pwd_dir_length` interactúa con las opciones de truncamiento estándar de una manera que puede sorprenderse primero: si no es cero, los componentes de la ruta que normalmente se truncarían se muestran con esa cantidad de caracteres. Por ejemplo, la ruta `/built/this/city/on/rock/and/roll`, que normalmente se mostraría como `rock/and/roll`, se mostraría como `/b/t/c/o/rock/and/roll` con `fish_style_pwd_dir_length = 1`--los componentes de ruta que normalmente se eliminarían se muestran con un solo carácter. Para `fish_style_pwd_dir_length = 2`, sería `/bu/th/ci/on/rock/and/roll`. +`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`.
@@ -659,7 +651,7 @@ Por ejemplo, dado `~/Dev/Nix/nixpkgs/pkgs` donde `nixpkgs` es la raíz del repos | Variable | Ejemplo | Descripción | | --------- | --------------------- | ------------------------------------- | -| path | `"D:/Projects"` | La ruta de directorio actual | +| path | `"D:/Projects"` | The current directory path | | 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 @@ -676,23 +668,23 @@ 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 `default`. +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default`. ### Opciones | Opción | Por defecto | Descripción | | ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | | `format` | `"via [$symbol$context]($style) "` | El formato del módulo. | -| `symbol` | `"🐳 "` | El símbolo usado antes de mostrar el contexto de Docker. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | | `style` | `"blue bold"` | El estilo del módulo. | -| `only_with_files` | `false` | Mostrar solo cuando hay un `docker-compose.yml` o `Dockerfile` en el directorio actual. | -| `disabled` | `true` | Desactiva el módulo `docker_context`. | +| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | +| `disabled` | `true` | Disables the `docker_context` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------------- | -------------------------------------- | -| context | `test_context` | El contexto actual de docker | +| context | `test_context` | The current docker context | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -709,9 +701,9 @@ format = "via [🐋 $context](blue bold)" ## Dotnet -El módulo `dotnet` muestra la versión relevante 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. +The `dotnet` module shows the relevant version of the .NET Core SDK for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK. -Este módulo solo se mostrará en tu prompt cuando uno o más de los siguientes archivos estén presentes en el directorio actual: +This module will only be shown in your prompt when one or more of the following files are present in the current directory: - `global.json` - `project.json` @@ -723,30 +715,30 @@ Este módulo solo se mostrará en tu prompt cuando uno o más de los siguientes - `*.fsproj` - `*.xproj` -También necesitarás tener instalado .NET Core SDK para poder usarlo correctamente. +You'll also need the .NET Core SDK installed in order to use it correctly. -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 `heurístico = false` en las opciones del módulo. +Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options. -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. +The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. ### Opciones -| Opción | Por defecto | Descripción | -| ----------- | ---------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"v[$symbol$version( 🎯 $tfm)]($style) "` | El formato del módulo. | -| `symbol` | `"•NET "` | El símbolo usado antes de mostrar la version de dotnet. | -| `heuristic` | `true` | Usa una detección de versiones más rápida para mantener a starship veloz. | -| `style` | `"bold blue"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `dotnet`. | +| Opción | Por defecto | Descripción | +| ----------- | --------------------------------------- | -------------------------------------------------------- | +| `format` | `"[$symbol$version( 🎯 $tfm)]($style) "` | El formato del módulo. | +| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. | +| `heuristic` | `true` | Use faster version detection to keep starship snappy. | +| `style` | `"bold blue"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `dotnet` module. | ### Variables -| Variable | Ejemplo | Descripción | -| --------- | ---------------- | --------------------------------------------------------------- | -| version | `v3.1.201` | La version del sdk de `dotnet` | -| tfm | `netstandard2.0` | El Target Framework Moniker al que se dirige el proyecto actual | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| --------- | ---------------- | ------------------------------------------------------------------ | +| version | `v3.1.201` | The version of `dotnet` sdk | +| tfm | `netstandard2.0` | The Target Framework Moniker that the current project is targeting | +| 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 @@ -763,25 +755,25 @@ heuristic = false ## Elixir -El módulo `elixir` muestra la version instalada actualmente de Elixir y Erlang/OTP. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. El módulo se muestra si algunas de las siguientes condiciones se cumplen: - El directorio actual contiene un archivo `mix.exs`. ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | --------------------------------------------------------- | -------------------------------------------------------------- | -| `symbol` | `"💧 "` | El símbolo usado antes de mostrar la version de Elixir/Erlang. | -| `style` | `"bold purple"` | El estilo del módulo. | -| `format` | `'via [$symbol$version \(OTP $otp_version\)]($style) '` | El formato para el módulo elixir. | -| `disabled` | `false` | Desactiva el módulo `elixir`. | +| Opción | Por defecto | Descripción | +| ---------- | --------------------------------------------------------- | --------------------------------------------------------------- | +| `symbol` | `"💧 "` | The symbol used before displaying the version of Elixir/Erlang. | +| `style` | `"bold purple"` | El estilo del módulo. | +| `format` | `'via [$symbol$version \(OTP $otp_version\)]($style) '` | The format for the module elixir. | +| `disabled` | `false` | Disables the `elixir` module. | ### Variables | Variable | Ejemplo | Descripción | | ----------- | ------- | -------------------------------------- | -| version | `v1.10` | La version de `elixir` | -| otp_version | | La version de otp de `elixir` | +| version | `v1.10` | The version of `elixir` | +| otp_version | | The otp version of `elixir` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -798,7 +790,7 @@ symbol = "🔮 " ## Elm -El módulo `elm` muestra la versión actualmente instalada de Elm. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `elm` module shows the currently installed version of Elm. El módulo se muestra si algunas de las siguientes condiciones se cumplen: - El directorio actual contiene un fichero `elm.json` - El directorio actual contiene un fichero `elm-package.json` @@ -808,18 +800,18 @@ El módulo `elm` muestra la versión actualmente instalada de Elm. El módulo se ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"🌳 "` | Una cadena de formato que representa el símbolo de Elm. | -| `style` | `"cyan bold"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `elm`. | +| Opción | Por defecto | Descripción | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | +| `symbol` | `"🌳 "` | A format string representing the symbol of Elm. | +| `style` | `"cyan bold"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `elm` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | --------- | -------------------------------------- | -| version | `v0.19.1` | La versión de `elm` | +| version | `v0.19.1` | The version of `elm` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -836,28 +828,28 @@ format = "via [ $version](cyan bold) " ## Variable de entorno -El módulo `env_var` muestra el valor actual de una variable de entorno seleccionada. El módulo se mostrará sólo si se cumplen cualquiera de las siguientes condiciones: +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: - La opción de configuración de `variable` coincide con una variable de entorno existente - La opción de configuración de `variable` no está definida, pero la opción de configuración `predeterminada` se encuentra ### Opciones -| Opción | Por defecto | Descripción | -| ------------- | ------------------------------ | -------------------------------------------------------------------------------------- | -| `symbol` | | El símbolo usado antes de mostrar el valor de la variable. | -| `variable` | | La variable de entorno a mostrar. | -| `por defecto` | | El valor por defecto que se mostrará cuando la variable seleccionada no está definida. | -| `format` | `"with [$env_value]($style) "` | El formato del módulo. | -| `disabled` | `false` | Desactiva el módulo `env_var`. | +| Opción | Por defecto | Descripción | +| ---------- | ------------------------------ | ---------------------------------------------------------------------------- | +| `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) "` | El formato del módulo. | +| `disabled` | `false` | Disables the `env_var` module. | ### Variables -| Variable | Ejemplo | Descripción | -| --------- | ------------------------------------- | ------------------------------------------- | -| env_value | `Windows NT` (si _variable_ es `$OS`) | El valor de entorno de la opción `variable` | -| 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 | +| --------- | ------------------------------------------- | ------------------------------------------ | +| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` | +| 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 @@ -873,25 +865,25 @@ default = "unknown shell" ## Erlang -El módulo `erlang` muestra la versión instalada de Erlang/OTP. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `erlang` module shows the currently installed version of Erlang/OTP. El módulo se muestra si algunas de las siguientes condiciones se cumplen: - El directorio actual contiene un fichero `rebar.config`. - El directorio actual contiene un fichero `erlang.mk`. ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ------------------------------------------------------- | -| `symbol` | `" "` | El símbolo usado antes de mostrar la versión de Erlang. | -| `style` | `"bold red"` | El estilo del módulo. | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `disabled` | `false` | Desactiva el módulo `erlang`. | +| Opción | Por defecto | Descripción | +| ---------- | ---------------------------------- | -------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before displaying the version of erlang. | +| `style` | `"bold red"` | El estilo del módulo. | +| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | +| `disabled` | `false` | Disables the `erlang` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | --------- | -------------------------------------- | -| version | `v22.1.3` | La versión de `erlang` | +| version | `v22.1.3` | The version of `erlang` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -908,28 +900,28 @@ format = "via [e $version](bold red) " ## Gcloud -El módulo `gcloud` muestra la configuración actual para el CLI de [`gcloud`](https://cloud.google.com/sdk/gcloud). Esto se basa en el archivo `~/.config/gcloud/active_config`, el archivo `~/.config/gcloud/configurations/config_{CONFIG NAME}` y la varieble de entorno `CLOUDSDK_CONFIG`. +The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. ### Opciones -| Opción | Por defecto | Descripción | -| ---------------- | ------------------------------------------------ | ---------------------------------------------------------- | -| `format` | `'on [$symbol$account(\($region\))]($style) '` | El formato del módulo. | -| `symbol` | `"☁️ "` | El símbolo usado antes de mostrar el perfil actual de GCP. | -| `region_aliases` | | Tabla de alias de región a mostrar además del nombre GCP. | -| `style` | `"bold blue"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `gcloud`. | +| Opción | Por defecto | Descripción | +| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | +| `format` | `'on [$symbol$account(\($region\))]($style) '` | El formato del 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"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `gcloud` module. | ### Variables -| Variable | Ejemplo | Descripción | -| --------- | ----------------- | ----------------------------------------------------------------------------- | -| region | `us-central1` | La región GCP actual | -| account | `foo@example.com` | El perfil actual de GCP | -| project | | El proyecto GCP actual | -| active | `por defecto` | El nombre de configuración activo escrito en `~/.config/gcloud/active_config` | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| --------- | ----------------- | ------------------------------------------------------------------ | +| region | `us-central1` | The current GCP region | +| account | `foo@example.com` | The current GCP profile | +| project | | The current GCP project | +| active | `default` | The active config name written in `~/.config/gcloud/active_config` | +| 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 @@ -968,29 +960,30 @@ asia-northeast1 = "an1" ## Git Branch -El módulo `git_branch` muestra la rama activa del repositorio en su directorio actual. +The `git_branch` module shows the active branch of the repo in your current directory. ### Opciones -| Opción | Por defecto | Descripción | -| -------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------- | -| `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) "` | El formato del módulo. Use `"$branch"` to refer to the current branch name. | -| `symbol` | `" "` | A format string representing the symbol of git branch. | -| `style` | `"bold purple"` | El estilo del módulo. | -| `truncation_length` | `2^63 - 1` | Truncates a git branch to X graphemes. | -| `truncation_symbol` | `"…"` | El símbolo usado para indicar que un nombre de rama fue truncado. You can use `""` for no symbol. | -| `only_attached` | `false` | Only show the branch name when not in a detached HEAD state. | -| `disabled` | `false` | Disables the `git_branch` module. | +| Opción | Por defecto | Descripción | +| -------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- | +| `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) "` | El formato del módulo. Use `"$branch"` to refer to the current branch name. | +| `symbol` | `" "` | A format string representing the symbol of git branch. | +| `style` | `"bold purple"` | El estilo del módulo. | +| `truncation_length` | `2^63 - 1` | Truncates a git branch to X graphemes. | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use `""` for no symbol. | +| `only_attached` | `false` | Only show the branch name when not in a detached HEAD state. | +| `disabled` | `false` | Disables the `git_branch` module. | ### Variables -| Variable | Ejemplo | Descripción | -| --------- | -------- | ------------------------------------------------------------------------------------------------------------- | -| branch | `master` | El nombre de la rama actual, regresa a `HEAD` si no hay ninguna rama actual (por ejemplo, git detached HEAD). | -| remote | `master` | The remote branch name. | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| ------------- | -------- | ---------------------------------------------------------------------------------------------------- | +| branch | `master` | The current branch name, falls back to `HEAD` if there's no current branch (e.g. git detached HEAD). | +| remote_name | `origin` | The remote name. | +| remote_branch | `master` | The name of the branch tracked on `remote_name`. | +| 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 @@ -1007,25 +1000,25 @@ truncation_symbol = "" ## Git commit -El módulo `git_commit` muestra el hash de commit actual y también la etiqueta (si existe) del repositorio en su directorio actual. +The `git_commit` module shows the current commit hash and also the tag (if any) of the repo in your current directory. ### Opciones -| Opción | Por defecto | Descripción | -| -------------------- | ------------------------------------------------------ | ---------------------------------------------------------------------------- | -| `commit_hash_length` | `7` | La longitud del hash del commit de git mostrado. | -| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | El formato del módulo. | -| `style` | `"bold green"` | El estilo del módulo. | -| `only_detached` | `true` | Mostrar solo el hash del commit de git cuando esté en estado "detached HEAD" | -| `tag_disabled` | `true` | Deshabilita mostrar información de etiquetas en el módulo `git_commit`. | -| `tag_symbol` | `"🏷 "` | Símbolo de etiqueta prefijando la información mostrada | -| `disabled` | `false` | Desactiva el módulo `git_commit`. | +| Opción | Por defecto | Descripción | +| -------------------- | ------------------------------------------------------ | ----------------------------------------------------- | +| `commit_hash_length` | `7` | The length of the displayed git commit hash. | +| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | El formato del módulo. | +| `style` | `"bold green"` | El estilo del 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. | +| `tag_symbol` | `"🏷 "` | Tag symbol prefixing the info shown | +| `disabled` | `false` | Disables the `git_commit` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | --------- | ------------------------------------- | -| hash | `b703eb3` | El hash actual del commit de git | +| hash | `b703eb3` | The current git commit hash | | style\* | | Refleja el valor de la opción `style` | \*: Esta variable sólo puede ser usada como parte de una cadena de estilo @@ -1042,30 +1035,30 @@ tag_symbol = "🔖 " ## Git state -El módulo `git_state` se mostrará en directorios que son parte de un repositorio git, y donde hay una operación en curso, tales como: _REBASING_, _BISECTING_, etc. Si hay información de progreso (por ejemplo, REBASING 3/10), esa información será mostrada también. +The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too. ### Opciones -| Opción | Por defecto | Descripción | -| -------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `rebase` | `"REBASING"` | Una cadena de formato que se muestra cuando un `rebase` está en progreso. | -| `merge` | `"MERGING"` | Una cadena de formato que se muestra cuando un `merge` está en progreso. | -| `revert` | `"REVERTING"` | Una cadena de formato mostrada cuando un `revert` está en progreso. | -| `cherry_pick` | `"CHERRY-PICKING"` | Una cadena de formato que se muestra cuando un `cherry-pick` está en progreso. | -| `bisect` | `"BISECTING"` | Una cadena de formato que se muestra cuando un `bisect` está en progreso. | -| `am` | `"AM"` | Una cadena de formato que se muestra cuando un `apply-mailbox` (`git am`) está en progeso. | -| `am_or_rebase` | `"AM/REBASE"` | Una cadena de formato que se muestra cuando un ambiguo `apply-builbox` o `rebase` está en progreso. | -| `style` | `"bold yellow"` | El estilo del módulo. | -| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | El formato del módulo. | -| `disabled` | `false` | Desactiva el módulo `git_state`. | +| Opción | Por defecto | Descripción | +| -------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `rebase` | `"REBASING"` | A format string displayed when a `rebase` is in progress. | +| `merge` | `"MERGING"` | A format string displayed when a `merge` is in progress. | +| `revert` | `"REVERTING"` | A format string displayed when a `revert` is in progress. | +| `cherry_pick` | `"CHERRY-PICKING"` | A format string displayed when a `cherry-pick` is in progress. | +| `bisect` | `"BISECTING"` | A format string displayed when a `bisect` is in progress. | +| `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"` | El estilo del módulo. | +| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | El formato del módulo. | +| `disabled` | `false` | Disables the `git_state` module. | ### Variables | Variable | Ejemplo | Descripción | | ---------------- | ---------- | ------------------------------------- | -| state | `REBASING` | El estado actual del repositorio | -| progress_current | `1` | El progreso de la operación actual | -| progress_total | `2` | El progreso total de la operación | +| state | `REBASING` | The current state of the repo | +| progress_current | `1` | The current operation progress | +| progress_total | `2` | The total operation progress | | style\* | | Refleja el valor de la opción `style` | \*: Esta variable sólo puede ser usada como parte de una cadena de estilo @@ -1082,57 +1075,57 @@ cherry_pick = "[🍒 PICKING](bold red)" ## Git status -El módulo `git_status` muestra símbolos que representan el estado del repositorio en su directorio actual. +The `git_status` module shows symbols representing the state of the repo in your current directory. ### Opciones -| Opción | Por defecto | Descripción | -| ------------ | ----------------------------------------------- | ---------------------------------------- | -| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | El formato por defecto para `git_status` | -| `conflicted` | `"="` | Esta rama tiene conflictos de fusión. | -| `ahead` | `"⇡"` | El formato de `ahead` | -| `behind` | `"⇣"` | El formato de `behind` | -| `diverged` | `"⇕"` | El formato de `diverged` | -| `untracked` | `"?"` | El formato de `untracked` | -| `stashed` | `"$"` | El formato de `stashed` | -| `modified` | `"!"` | El formato de `modified` | -| `staged` | `"+"` | El formato de `staged` | -| `renamed` | `"»"` | El formato de `renamed` | -| `deleted` | `"✘"` | El formato de `deleted` | -| `style` | `"bold red"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `git_status`. | +| Opción | Por defecto | Descripción | +| ------------ | ----------------------------------------------- | ----------------------------------- | +| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` | +| `conflicted` | `"="` | This branch has merge conflicts. | +| `ahead` | `"⇡"` | The format of `ahead` | +| `behind` | `"⇣"` | The format of `behind` | +| `diverged` | `"⇕"` | The format of `diverged` | +| `untracked` | `"?"` | The format of `untracked` | +| `stashed` | `"$"` | The format of `stashed` | +| `modified` | `"!"` | The format of `modified` | +| `staged` | `"+"` | The format of `staged` | +| `renamed` | `"»"` | The format of `renamed` | +| `deleted` | `"✘"` | The format of `deleted` | +| `style` | `"bold red"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `git_status` module. | ### Variables -Las siguientes variables se pueden utilizar en `format`: +The following variables can be used in `format`: -| Variable | Descripción | -| -------------- | -------------------------------------------------------------------------------------------------------- | -| `all_status` | Atajo para `$conflicted$stashed$deleted$renamed$modified$staged$untracked` | -| `ahead_behind` | Muestra la cadena de formato de `diverged` `ahead` o `behind` basado en el estado actual del repositorio | -| `conflicted` | Muestra `conflicted` cuando esta rama tiene conflictos de fusión. | -| `untracked` | Muestra `untracked` cuando hay archivos sin rastrear en el directorio de trabajo. | -| `stashed` | Muestra `stashed` cuando existe un "stash" para el repositorio local. | -| `modified` | Muestra `modified` cuando hay modificaciones de archivo en el directorio de trabajo. | -| `staged` | Muestra `staged` cuando se ha añadido un nuevo archivo al área de "stash". | -| `renamed` | Muestra `renamed` cuando un archivo renombrado ha sido añadido al área de "stash". | -| `deleted` | Muestra `deleted` cuando un archivo ha sido añadido al área de "stash". | -| style\* | Refleja el valor de la opción `style` | +| Variable | Descripción | +| -------------- | --------------------------------------------------------------------------------------------- | +| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` | +| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo | +| `conflicted` | Displays `conflicted` when this branch has merge conflicts. | +| `untracked` | Displays `untracked` when there are untracked files in the working directory. | +| `stashed` | Displays `stashed` when a stash exists for the local repository. | +| `modified` | Displays `modified` when there are file modifications in the working directory. | +| `staged` | Displays `staged` when a new file has been added to the staging area. | +| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | +| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| style\* | Refleja el valor de la opción `style` | \*: Esta variable sólo puede ser usada como parte de una cadena de estilo -Las siguientes variables pueden ser usadas en `diverged`: +The following variables can be used in `diverged`: -| Variable | Descripción | -| -------------- | ------------------------------------------------------- | -| `ahead_count` | Número de commits por delante de la rama de seguimiento | -| `behind_count` | Número de commits detrás de la rama de seguimiento | +| Variable | Descripción | +| -------------- | ---------------------------------------------- | +| `ahead_count` | Number of commits ahead of the tracking branch | +| `behind_count` | Number of commits behind the tracking branch | -Las siguientes variales pueden ser usadas en `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`: +The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`: -| Variable | Descripción | -| -------- | ----------------------------- | -| `count` | Muestra el número de archivos | +| Variable | Descripción | +| -------- | ------------------------ | +| `count` | Show the number of files | ### Ejemplo @@ -1152,7 +1145,7 @@ renamed = "👅" deleted = "🗑" ``` -Mostrar el recuento delante/detrás de la rama que está siendo rastreada +Show ahead/behind count of the branch being tracked ```toml # ~/.config/starship.toml @@ -1165,7 +1158,7 @@ behind = "⇣${count}" ## Golang -El módulo `golang` muestra la versión actualmente instalada de Golang. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `golang` module shows the currently installed version of Golang. El módulo se muestra si algunas de las siguientes condiciones se cumplen: - El directorio actual contiene un fichero `go.mod` - El directorio actual contiene un fichero `go.sum` @@ -1178,18 +1171,18 @@ El módulo `golang` muestra la versión actualmente instalada de Golang. El mód ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ------------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"🐹 "` | Una cadena de formato que representa el símbolo de Go. | -| `style` | `"bold cyan"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo de `golang`. | +| Opción | Por defecto | Descripción | +| ---------- | ---------------------------------- | ---------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | +| `symbol` | `"🐹 "` | A format string representing the symbol of Go. | +| `style` | `"bold cyan"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `golang` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | --------- | -------------------------------------- | -| version | `v1.12.1` | La versión de `go` | +| version | `v1.12.1` | The version of `go` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1206,25 +1199,25 @@ format = "via [🏎💨 $version](bold cyan) " ## Helm -El módulo `helm` muestra la versión instalada de Helm. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `helm` module shows the currently installed version of Helm. El módulo se muestra si algunas de las siguientes condiciones se cumplen: - El directorio actual contiene un fichero `helmfile.yaml` - El directorio actual contiene un archivo `Chart.yaml` ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | -------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"⎈ "` | Una cadena de formato que representa el símbolo de Helm. | -| `style` | `"bold white"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `helm`. | +| Opción | Por defecto | Descripción | +| ---------- | ---------------------------------- | ------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | +| `symbol` | `"⎈ "` | A format string representing the symbol of Helm. | +| `style` | `"bold white"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `helm` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v3.1.1` | La versión de `helm` | +| version | `v3.1.1` | The version of `helm` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1241,17 +1234,17 @@ format = "via [⎈ $version](bold white) " ## Hostname -El módulo `hostname` muestra el nombre de host del sistema. +The `hostname` module shows the system hostname. ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ssh_only` | `true` | Mostrar sólo el nombre de host cuando esté conectado a una sesión SSH. | -| `trim_at` | `"."` | Cadena en la que el nombre de host se corta, después de la primera partida. `"."` se detendrá después del primer punto. `""` deshabilitará cualquier truncamiento | -| `format` | `"[$hostname]($style) in "` | El formato del módulo. | -| `style` | `"bold dimmed green"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `hostname`. | +| Opción | Por defecto | Descripción | +| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `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 "` | El formato del módulo. | +| `style` | `"bold dimmed green"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `hostname` module. | ### Variables @@ -1276,25 +1269,25 @@ disabled = false ## Java -El módulo `java` muestra la versión actualmente instalada de Java. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `java` module shows the currently installed version of Java. El módulo se muestra si algunas de las siguientes condiciones se cumplen: -- El directorio actual contiene un archivo `pom.xml`, `build.gradle.kts`, `build.sbt` o `.java-version` -- El directorio actual contiene un archivo con la extensión `.java`, `.class`, `.gradle` o `.jar` +- El directorio actual contiene un archivo `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, o `build.boot` +- El directorio actual contiene un archivo con la extensión `.java`, `.class`, `.gradle` o `.jar`, `.clj` o `.cljc` ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | -------------------------------------- | ------------------------------------------------------- | -| `format` | `"via [${symbol}${version}]($style) "` | El formato del módulo. | -| `symbol` | `"☕ "` | Una cadena de formato que representa el símbolo de Java | -| `style` | `"red dimmed"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `java`. | +| Opción | Por defecto | Descripción | +| ---------- | -------------------------------------- | ----------------------------------------------- | +| `format` | `"via [${symbol}${version}]($style) "` | El formato del módulo. | +| `symbol` | `"☕ "` | A format string representing the symbol of Java | +| `style` | `"red dimmed"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `java` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ------- | -------------------------------------- | -| version | `v14` | La versión de `java` | +| version | `v14` | The version of `java` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1311,23 +1304,23 @@ symbol = "🌟 " ## Jobs -El módulo `jobs` muestra el número actual de tareas en ejecución. El módulo se mostrará sólo si hay tareas en segundo plano ejecutándose. El módulo mostrará el número de tareas en ejecución si hay más de 1 tarea o más que el valor configurado de `threshold`, si existe. +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. ### Opciones -| Opción | Por defecto | Descripción | -| ----------- | ----------------------------- | --------------------------------------------------------- | -| `threshold` | `1` | Muestra el número de tareas si se exceden. | -| `format` | `"[$symbol$number]($style) "` | El formato del módulo. | -| `symbol` | `"✦"` | Una cadena de formato que representa el número de tareas. | -| `style` | `"bold blue"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `jobs`. | +| Opción | Por defecto | Descripción | +| ----------- | ----------------------------- | ------------------------------------------------ | +| `threshold` | `1` | Show number of jobs if exceeded. | +| `format` | `"[$symbol$number]($style) "` | El formato del módulo. | +| `symbol` | `"✦"` | A format string representing the number of jobs. | +| `style` | `"bold blue"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `jobs` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ------- | -------------------------------------- | -| number | `1` | El número de tareas | +| number | `1` | The number of jobs | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1345,7 +1338,7 @@ threshold = 4 ## Julia -El módulo `Julia` muestra la versión actualmente instalada de Julia. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `julia` module shows the currently installed version of Julia. El módulo se muestra si algunas de las siguientes condiciones se cumplen: - El directorio actual contiene un archivo `Project.toml` - El directorio actual contiene un archivo `Manifest.toml` @@ -1353,18 +1346,18 @@ El módulo `Julia` muestra la versión actualmente instalada de Julia. El módul ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | --------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"ஃ "` | Una cadena de formato que representa el símbolo de Julia. | -| `style` | `"bold purple"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `julia`. | +| Opción | Por defecto | Descripción | +| ---------- | ---------------------------------- | ------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | +| `symbol` | `"ஃ "` | A format string representing the symbol of Julia. | +| `style` | `"bold purple"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `julia` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v1.4.0` | La versión de `julia` | +| version | `v1.4.0` | The version of `julia` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1379,34 +1372,77 @@ El módulo `Julia` muestra la versión actualmente instalada de Julia. El módul symbol = "∴ " ``` +## Kotlin + +The `kotlin` module shows the currently installed version of Kotlin. El módulo se muestra si algunas de las siguientes condiciones se cumplen: + +- The current directory contains a `.kt` or a `.kts` file + +### Opciones + +| Opción | Por defecto | Descripción | +| --------------- | ---------------------------------- | ----------------------------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | +| `symbol` | `"🅺 "` | A format string representing the symbol of Kotlin. | +| `style` | `"bold blue"` | El estilo del módulo. | +| `kotlin_binary` | `"kotlin"` | Configures the kotlin binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `kotlin` module. | + +### Variables + +| Variable | Ejemplo | Descripción | +| --------- | --------- | -------------------------------------- | +| version | `v1.4.21` | The version of `kotlin` | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | + +\*: Esta variable sólo puede ser usada como parte de una cadena de estilo + +### Ejemplo + +```toml +# ~/.config/starship.toml + +[kotlin] +symbol = "🅺 " +``` + +```toml +# ~/.config/starship.toml + +[kotlin] +# Uses the Kotlin Compiler binary to get the installed version +kotlin_binary = "kotlinc" +``` + ## Kubernetes -Muestra el nombre del contexto actual de Kubernetes y, si se establece, el espacio de nombres del archivo kubeconfig. El espacio de nombres necesita establecerse en el archivo kubeconfig, esto puede hacerse mediante `kubectl config set-context starship-cluster --namespace astronaut`. Si se establece la variable de entorno `$KUBECONFIG`, el módulo usará eso si no usará el `~/.kube/config`. +Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. ::: tip -Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### Opciones -| Opción | Por defecto | Descripción | -| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------------- | -| `symbol` | `"☸ "` | Una cadena de formato que representa el símbolo mostrado antes del Cluster. | -| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | El formato del módulo. | -| `style` | `"cyan bold"` | El estilo del módulo. | -| `context_aliases` | | Tabla de alias de contexto a mostrar. | -| `disabled` | `true` | Desactiva el módulo `kubernetes`. | +| Opción | Por defecto | Descripción | +| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | +| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. | +| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | El formato del módulo. | +| `style` | `"cyan bold"` | El estilo del módulo. | +| `context_aliases` | | Table of context aliases to display. | +| `disabled` | `true` | Disables the `kubernetes` module. | ### Variables -| Variable | Ejemplo | Descripción | -| --------- | -------------------- | ----------------------------------------------------------- | -| context | `starship-cluster` | El contexto actual de kubernetes | -| namespace | `starship-namespace` | Si se establece, el espacio de nombres actual de kubernetes | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| --------- | -------------------- | ---------------------------------------- | +| context | `starship-cluster` | The current kubernetes context | +| namespace | `starship-namespace` | If set, the current kubernetes namespace | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | \*: Esta variable sólo puede ser usada como parte de una cadena de estilo @@ -1422,15 +1458,15 @@ disabled = false "dev.local.cluster.k8s" = "dev" ``` -## Salto de línea +## Line Break -El módulo `line_break` separa el indicador en dos líneas. +The `line_break` module separates the prompt into two lines. ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ----------- | ------------------------------------------------------------------------------- | -| `disabled` | `false` | Deshabilita el módulo `line_break`, haciendo que el mensaje sea una sola línea. | +| Opción | Por defecto | Descripción | +| ---------- | ----------- | ------------------------------------------------------------------ | +| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | ### Ejemplo @@ -1443,27 +1479,27 @@ disabled = true ## Lua -El módulo `lua` muestra la versión instalada de Lua. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `lua` module shows the currently installed version of Lua. El módulo se muestra si algunas de las siguientes condiciones se cumplen: -- El directorio actual contiene un archivo `.lua-version` -- El directorio actual contiene un directorio `lua` -- El directorio actual contiene un archivo con la extensión `.lua` +- The current directory contains a `.lua-version` file +- The current directory contains a `lua` directory +- The current directory contains a file with the `.lua` extension ### Opciones -| Opción | Por defecto | Descripción | -| ------------ | ---------------------------------- | ----------------------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"🌙 "` | Una cadena de formato que representa el símbolo de Lua. | -| `style` | `"bold blue"` | El estilo del módulo. | -| `lua_binary` | `"lua"` | Configura el binario de lua que Starship ejecuta al obtener la versión. | -| `disabled` | `false` | Desactiva el módulo `lua`. | +| Opción | Por defecto | Descripción | +| ------------ | ---------------------------------- | -------------------------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | +| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | +| `style` | `"bold blue"` | El estilo del módulo. | +| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `lua` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v5.4.0` | La versión de `lua` | +| version | `v5.4.0` | The version of `lua` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1480,38 +1516,38 @@ format = "via [🌕 $version](bold blue) " ## Memory Usage -El módulo `memory_usage` muestra la memoria del sistema actual y el uso de memoria de intercambio. +The `memory_usage` module shows current system memory and swap usage. -Por defecto, el uso de swap se muestra si el intercambio total del sistema no es cero. +By default the swap usage is displayed if the total system swap is non-zero. ::: tip -Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### Opciones -| Opción | Por defecto | Descripción | -| ----------- | --------------------------------------------- | ------------------------------------------------------------- | -| `threshold` | `75` | Ocultar el uso de memoria a menos que supere este porcentaje. | -| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | El formato del módulo. | -| `symbol` | `"🐏"` | El símbolo usado antes de mostrar el uso de memoria. | -| `style` | `"bold dimmed white"` | El estilo del módulo. | -| `disabled` | `true` | Desactiva el módulo `memory_usage`. | +| Opción | Por defecto | Descripción | +| ----------- | --------------------------------------------- | -------------------------------------------------------- | +| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | +| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | El formato del módulo. | +| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | +| `style` | `"bold dimmed white"` | El estilo del módulo. | +| `disabled` | `true` | Disables the `memory_usage` module. | ### Variables -| Variable | Ejemplo | Descripción | -| ---------------- | ------------- | ---------------------------------------------------------------------------------- | -| ram | `31GiB/65GiB` | La memoria RAM usada/total del sistema actual. | -| ram_pct | `48%` | El porcentaje de la memoria actual del sistema. | -| swap\*\* | `1GiB/4GiB` | El tamaño de la memoria de intercambio del archivo de memoria del sistema actual. | -| swap_pct\*\* | `77%` | El porcentaje de memoria de intercambio del archivo de memoria del sistema actual. | -| symbol | `🐏` | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| ---------------- | ------------- | ------------------------------------------------------------------ | +| ram | `31GiB/65GiB` | The usage/total RAM of the current system memory. | +| ram_pct | `48%` | The percentage of the current system memory. | +| swap\*\* | `1GiB/4GiB` | The swap memory size of the current system swap memory file. | +| swap_pct\*\* | `77%` | The swap memory percentage of the current system swap memory file. | +| symbol | `🐏` | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | -\*: Esta variable sólo puede utilizarse como parte de una cadena de estilo \*\*: La información del archivo SWAP sólo se muestra si se detecta en el sistema actual +\*: This variable can only be used as a part of a style string \*\*: The SWAP file information is only displayed if detected on the current system ### Ejemplo @@ -1527,24 +1563,24 @@ style = "bold dimmed green" ## Mercurial Branch -El módulo `hg_branch` muestra la rama activa del repositorio en su directorio actual. +The `hg_branch` module shows the active branch of the repo in your current directory. ### Opciones -| Opción | Por defecto | Descripción | -| ------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------- | -| `symbol` | `" "` | El símbolo usado antes del marcador hg o nombre de la rama del repositorio en su directorio actual. | -| `style` | `"bold purple"` | El estilo del módulo. | -| `format` | `"on [$symbol$branch]($style) "` | El formato del módulo. | -| `truncation_length` | `2^63 - 1` | Trunca el nombre de la rama hg a X grafemas | -| `truncation_symbol` | `"…"` | El símbolo usado para indicar que un nombre de rama fue truncado. | -| `disabled` | `true` | Desactiva el módulo `hg_branch`. | +| Opción | Por defecto | Descripción | +| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `style` | `"bold purple"` | El estilo del módulo. | +| `format` | `"on [$symbol$branch]($style) "` | El formato del módulo. | +| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `disabled` | `true` | Disables the `hg_branch` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| branch | `master` | La rama de mercurial activa | +| branch | `master` | The active mercurial branch | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1563,27 +1599,27 @@ truncation_symbol = "" ## Nim -El módulo `nim` muestra la versión instalada de Nim. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `nim` module shows the currently installed version of Nim. El módulo se muestra si algunas de las siguientes condiciones se cumplen: -- El directorio actual contiene un archivo `nim.cfg` -- El directorio actual contiene un archivo con la extensión `.nim` -- El directorio actual contiene un archivo con la extensión `.nims` -- El directorio actual contiene un archivo con la extensión `.nimble` +- The current directory contains a `nim.cfg` file +- The current directory contains a file with the `.nim` extension +- The current directory contains a file with the `.nims` extension +- The current directory contains a file with the `.nimble` extension ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ---------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo | -| `symbol` | `"👑 "` | El símbolo usado antes de mostrar la versión de Nim. | -| `style` | `"bold yellow"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `nim`. | +| Opción | Por defecto | Descripción | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module | +| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | +| `style` | `"bold yellow"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `nim` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v1.2.0` | La versión de `nimc` | +| version | `v1.2.0` | The version of `nimc` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1601,25 +1637,25 @@ symbol = "🎣 " ## Nix-shell -El módulo `nix_shell` muestra el entorno nix-shell. El módulo se mostrará dentro de un entorno nix-shell. +The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment. ### Opciones -| Opción | Por defecto | Descripción | -| ------------ | ---------------------------------------------- | -------------------------------------------------------------------------------- | -| `format` | `'via [$symbol$state( \($name\))]($style) '` | El formato del módulo. | -| `symbol` | `"❄️ "` | Una cadena de formato que representa el símbolo de nix-shell. | -| `style` | `"bold blue"` | El estilo del módulo. | -| `impure_msg` | `"impure"` | Una cadena de formato que se muestra cuando el intérprete de comandos es impuro. | -| `pure_msg` | `"pure"` | Una cadena de formato que se muestra cuando el intérprete de comandos es puro. | -| `disabled` | `false` | Desactiva el módulo `nix_shell`. | +| Opción | Por defecto | Descripción | +| ------------ | ---------------------------------------------- | ----------------------------------------------------- | +| `format` | `'via [$symbol$state( \($name\))]($style) '` | El formato del módulo. | +| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | +| `style` | `"bold blue"` | El estilo del módulo. | +| `impure_msg` | `"impure"` | A format string shown when the shell is impure. | +| `pure_msg` | `"pure"` | A format string shown when the shell is pure. | +| `disabled` | `false` | Disables the `nix_shell` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ------- | -------------------------------------- | -| state | `pure` | El estado de nix-shell | -| name | `lorri` | El nombre de nix-shell | +| state | `pure` | The state of the nix-shell | +| name | `lorri` | The name of the nix-shell | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1639,28 +1675,29 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' ## NodeJS -El módulo `nodejs` muestra la versión instalada de NodeJS. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `nodejs` module shows the currently installed version of NodeJS. El módulo se muestra si algunas de las siguientes condiciones se cumplen: -- El directorio actual contiene un archivo `package.json` -- El directorio actual contiene un archivo `.node-version` -- El directorio actual contiene un directorio `node_modules` -- El directorio actual contiene un archivo con la extensión `.js`, `.mjs` o `.cjs` -- El directorio actual contiene un archivo con la extensión `.ts` +- The current directory contains a `package.json` file +- The current directory contains a `.node-version` file +- The current directory contains a `node_modules` directory +- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension +- The current directory contains a file with the `.ts` extension ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ---------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"⬢ "` | Una cadena de formato que representa el símbolo de NodeJS. | -| `style` | `"bold green"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `nodejs`. | +| Opción | Por defecto | Descripción | +| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | +| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. | +| `style` | `"bold green"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `nodejs` module. | +| `not_capable_style` | `bold red` | The style for the module when an engines property in Packages.json does not match the NodeJS version. | ###  Variables | Variable | Ejemplo | Descripción | | --------- | ---------- | -------------------------------------- | -| version | `v13.12.0` | La versión de `node` | +| version | `v13.12.0` | The version of `node` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1677,29 +1714,29 @@ format = "via [🤖 $version](bold green) " ## OCaml -El módulo `ocaml` muestra la versión actualmente instalada de OCaml. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `ocaml` module shows the currently installed version of OCaml. El módulo se muestra si algunas de las siguientes condiciones se cumplen: -- El directorio actual contiene un archivo con extensión `.opam` o directorio `_opam` -- El directorio actual contiene un directorio `esy.lock` -- El directorio actual contiene un archivo `dune` o `dune-project` -- El directorio actual contiene un archivo `jbuild` o `jbuild-ignore` -- El directorio actual contiene un archivo `.merlin` -- El directorio actual contiene un archivo con la extensión `.ml`, `.mli`, `.re` o `.rei` +- The current directory contains a file with `.opam` extension or `_opam` directory +- The current directory contains a `esy.lock` directory +- The current directory contains a `dune` or `dune-project` file +- The current directory contains a `jbuild` or `jbuild-ignore` file +- The current directory contains a `.merlin` file +- The current directory contains a file with `.ml`, `.mli`, `.re` or `.rei` extension ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ------------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | La cadena de formato para el módulo. | -| `symbol` | `"🐫 "` | El símbolo usado antes de mostrar la versión de OCaml. | -| `style` | `"bold yellow"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `ocaml`. | +| Opción | Por defecto | Descripción | +| ---------- | ---------------------------------- | ------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format string for the module. | +| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | +| `style` | `"bold yellow"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `ocaml` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | --------- | -------------------------------------- | -| version | `v4.10.0` | La versión de `ocaml` | +| version | `v4.10.0` | The version of `ocaml` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1716,23 +1753,23 @@ format = "via [🐪 $version]($style) " ## OpenStack -El módulo `openstack` muestra la nube OpenStack actual y el proyecto. El módulo solo está activo cuando la variable env `OS_CLOUD` está definida en cuyo caso leerá el archivo `nubes. aml` desde cualquiera de las [ubicaciones por defecto](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files) para obtener el proyecto actual en uso. +The `openstack` module shows the current OpenStack cloud and project. The module only active when the `OS_CLOUD` env var is set, in which case it will read `clouds.yaml` file from any of the [default locations](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files). to fetch the current project in use. ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | --------------------------------------------------- | ----------------------------------------------------------- | -| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | El formato del módulo. | -| `symbol` | `"☁️ "` | El símbolo usado antes de mostrar la nube OpenStack actual. | -| `style` | `"bold yellow"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `OpenStack`. | +| Opción | Por defecto | Descripción | +| ---------- | --------------------------------------------------- | -------------------------------------------------------------- | +| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | El formato del módulo. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | +| `style` | `"bold yellow"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `OpenStack` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ------- | -------------------------------------- | -| cloud | `corp` | La nube OpenStack actual | -| project | `dev` | El proyecto OpenStack actual | +| cloud | `corp` | The current OpenStack cloud | +| project | `dev` | The current OpenStack project | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1751,35 +1788,36 @@ symbol = "☁️ " ## Package Version -El módulo `package` se muestra cuando el directorio actual es el repositorio de un paquete, y muestra su versión actual. El módulo soporta actualmente los paquetes `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` y `helm`. +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages. -- **npm** – La versión del paquete `npm` se extrae del `package.json` presente en el directorio actual -- **cargo** – La versión del paquete `cargo` se extrae del `Cargo.toml` presente en el directorio actual -- **poetry** – La versión del paquete `poetry` es extraída del `pyproject.toml` presente en el directorio actual -- **composer** - La versión del paquete `composer` se extrae del `composer.json` presente en el directorio actual -- **gradle** – La versión del paquete `gradle` es extraída del `build.gradle` presente -- **julia** - La versión del paquete se extrae del `Project.toml` presente -- **mix** - La versión del paquete `mix` se extrae del `mix.exs` presente -- **helm** - La versión del gráfico `helm` se extrae del `Chart.yaml` presente -- **maven** - La versión del paquete `maven` es extraída del `pom.xml` presente +- **npm** – The `npm` package version is extracted from the `package.json` present in the current directory +- **cargo** – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory +- **poetry** – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory +- **composer** – The `composer` package version is extracted from the `composer.json` present in the current directory +- **gradle** – The `gradle` package version is extracted from the `build.gradle` present +- **julia** - The package version is extracted from the `Project.toml` present +- **mix** - The `mix` package version is extracted from the `mix.exs` present +- **helm** - The `helm` chart version is extracted from the `Chart.yaml` present +- **maven** - The `maven` package version is extracted from the `pom.xml` present +- **meson** - The `meson` package version is extracted from the `meson.build` present > ⚠️ La versión que se muestra es la del paquete cuyo código fuente está en tu directorio actual, no en tu gestor de paquetes. ### Opciones -| Opción | Por defecto | Descripción | -| ----------------- | ---------------------------------- | -------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"📦 "` | El símbolo usado antes de mostrar la versión del paquete. | -| `style` | `"bold 208"` | El estilo del módulo. | -| `display_private` | `false` | Activar la visualización de la versión para los paquetes marcados como privados. | -| `disabled` | `false` | Desactiva el módulo `package`. | +| Opción | Por defecto | Descripción | +| ----------------- | ---------------------------------- | ---------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | +| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | +| `style` | `"bold 208"` | El estilo del módulo. | +| `display_private` | `false` | Enable displaying version for packages marked as private. | +| `disabled` | `false` | Disables the `package` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v1.0.0` | La versión de su paquete | +| version | `v1.0.0` | The version of your package | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1796,28 +1834,28 @@ format = "via [🎁 $version](208 bold) " ## Perl -El módulo `perl` muestra la versión actualmente instalada de Perl. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `perl` module shows the currently installed version of Perl. El módulo se muestra si algunas de las siguientes condiciones se cumplen: -- El directorio actual contiene un archivo `Makefile.PL` o `Build.PL` -- El directorio actual contiene un archivo `cpanfile` o `cpanfile.snapshot` -- El directorio actual contiene un archivo `META.json` o `META.yml` -- El directorio actual contiene un archivo `.perl-version` -- El directorio actual contiene un `.pl`, `.pm` o `.pod` +- The current directory contains a `Makefile.PL` or `Build.PL` file +- The current directory contains a `cpanfile` or `cpanfile.snapshot` file +- The current directory contains a `META.json` file or `META.yml` file +- The current directory contains a `.perl-version` file +- The current directory contains a `.pl`, `.pm` or `.pod` ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ---------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | La cadena de formato para el módulo. | -| `symbol` | `"🐪 "` | El símbolo usado antes de mostrar la versión de Perl | -| `style` | `"bold 149"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `perl`. | +| Opción | Por defecto | Descripción | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format string for the module. | +| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | +| `style` | `"bold 149"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `perl` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | --------- | -------------------------------------- | -| version | `v5.26.1` | La versión de `perl` | +| version | `v5.26.1` | The version of `perl` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1832,26 +1870,26 @@ format = "via [🦪 $version]($style) " ## PHP -El módulo `php` muestra la versión instalada de PHP. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `php` module shows the currently installed version of PHP. El módulo se muestra si algunas de las siguientes condiciones se cumplen: -- El directorio actual contiene un archivo `composer.json` -- El directorio actual contiene un archivo `.php-version` -- El directorio actual contiene un archivo `.php` +- The current directory contains a `composer.json` file +- The current directory contains a `.php-version` file +- The current directory contains a `.php` file ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ---------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"🐘 "` | El símbolo usado antes de mostrar la versión de PHP. | -| `style` | `"147 bold"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `php`. | +| Opción | Por defecto | Descripción | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | +| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | +| `style` | `"147 bold"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `php` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v7.3.8` | La versión de `php` | +| version | `v7.3.8` | The version of `php` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1868,25 +1906,25 @@ format = "via [🔹 $version](147 bold) " ## PureScript -El módulo `purescript` muestra la versión actualmente instalada de PureScript. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `purescript` module shows the currently installed version of PureScript version. El módulo se muestra si algunas de las siguientes condiciones se cumplen: -- El directorio actual contiene un archivo `spago.dhall` -- El directorio actual contiene un archivo \*.purs +- The current directory contains a `spago.dhall` file +- The current directory contains a \*.purs files ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ----------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"<=> "` | El símbolo usado antes de mostrar la versión de PureScript. | -| `style` | `"bold white"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `purescript`. | +| Opción | Por defecto | Descripción | +| ---------- | ---------------------------------- | ------------------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `purescript` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `0.13.5` | La versión de `purescript` | +| version | `0.13.5` | The version of `purescript` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1903,44 +1941,52 @@ format = "via [$symbol$version](bold white)" ## Python -El módulo `python` muestra la versión actualmente instalada de Python y el actual entorno virtual de Python si uno está activado. +The `python` module shows the currently installed version of Python and the current Python virtual environment if one is activated. -Si `pyenv_version_name` se establece en `true`, mostrará el nombre de la versión de pyenv. De lo contrario, se mostrará el número de versión de `python --version`. +If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`. El módulo se muestra si algunas de las siguientes condiciones se cumplen: -- El directorio actual contiene un archivo `.python-version` -- El directorio actual contiene un archivo `requirements.txt` -- El directorio actual contiene un archivo `pyproject.toml` -- El directorio actual contiene un archivo con la extensión `.py` (y `scan_for_pyfiles` es verdadero) -- El directorio actual contiene un archivo `Pipfile` -- El directorio actual contiene un archivo `tox.ini` -- El directorio actual contiene un archivo `setup.py` -- El directorio actual contiene un archivo `__init__.py` -- Un entorno virtual está activado actualmente +- The current directory contains a `.python-version` file +- The current directory contains a `requirements.txt` file +- The current directory contains a `pyproject.toml` file +- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true) +- The current directory contains a `Pipfile` file +- The current directory contains a `tox.ini` file +- The current directory contains a `setup.py` file +- The current directory contains a `__init__.py` file +- A virtual environment is currently activated ### Opciones -| Opción | Por defecto | Descripción | -| -------------------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | El formato del módulo. | -| `symbol` | `"🐍 "` | Una cadena de formato que representa el símbolo de Python | -| `style` | `"yellow bold"` | El estilo del módulo. | -| `pyenv_version_name` | `false` | Usar pyenv para obtener la versión de Python | -| `pyenv_prefix` | `pyenv` | Prefijo antes de mostrar la versión de pyenv sólo se utiliza si se utiliza pyenv | -| `scan_for_pyfiles` | `true` | Si es falso, los archivos Python en el directorio actual no mostrarán este módulo. | -| `python_binary` | `python` | Configura el binario de python que Starship ejecuta al obtener la versión. | -| `disabled` | `false` | Desactiva el módulo `python`. | +| Opción | Por defecto | Descripción | +| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | El formato del módulo. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | El estilo del módulo. | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | + +::: tip + +The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used. + +The default values and order for `python_binary` was chosen to first identify the Python version in a virtualenv/conda environments (which currently still add a `python`, no matter if it points to `python3` or `python2`). This has the side effect that if you still have a system Python 2 installed, it may be picked up before any Python 3 (at least on Linux Distros that always symlink `/usr/bin/python` to Python 2). If you do not work with Python 2 anymore but cannot remove the system Python 2, changing this to `"python3"` will hide any Python version 2, see example below. + +::: ### Variables -| Variable | Ejemplo | Descripción | -| ------------ | --------------- | ------------------------------------------- | -| version | `"v3.8.1"` | La versión de `python` | -| symbol | `"🐍 "` | Refleja el valor de la opción `symbol` | -| style | `"yellow bold"` | Refleja el valor de la opción `style` | -| pyenv_prefix | `"pyenv "` | Ordena el valor de la opción `pyenv_prefix` | -| virtualenv | `"venv"` | El nombre actual del `virtualenv` | +| Variable | Ejemplo | Descripción | +| ------------ | --------------- | ------------------------------------------ | +| version | `"v3.8.1"` | The version of `python` | +| symbol | `"🐍 "` | Refleja el valor de la opción `symbol` | +| style | `"yellow bold"` | Refleja el valor de la opción `style` | +| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | +| virtualenv | `"venv"` | The current `virtualenv` name | ### Ejemplo @@ -1953,39 +1999,36 @@ symbol = "👾 " pyenv_version_name = true ``` -Usando el binario de `python3` para obtener la versión. - -Nota - La variable `python_binary` cambia el binario que Starship ejecuta para obtener la versión de Python, no cambia los argumentos que se utilizan. - ```toml # ~/.config/starship.toml [python] +# Only use the `python3` binary to get the version. python_binary = "python3" ``` ## Ruby -El módulo `ruby` muestra la versión actualmente instalada de Ruby. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `ruby` module shows the currently installed version of Ruby. El módulo se muestra si algunas de las siguientes condiciones se cumplen: -- El directorio actual contiene un archivo `Gemfile` -- El directorio actual contiene un archivo `.ruby-version` -- El directorio actual contiene un archivo `.rb` +- The current directory contains a `Gemfile` file +- The current directory contains a `.ruby-version` file +- The current directory contains a `.rb` file ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | -------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"💎 "` | Una cadena de formato que representa el símbolo de Ruby. | -| `style` | `"bold red"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `ruby`. | +| Opción | Por defecto | Descripción | +| ---------- | ---------------------------------- | ------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `ruby` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v2.5.1` | La versión de `ruby` | +| version | `v2.5.1` | The version of `ruby` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -2002,25 +2045,25 @@ symbol = "🔺 " ## Rust -El módulo `rust` muestra la versión instalada de Rust. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `rust` module shows the currently installed version of Rust. El módulo se muestra si algunas de las siguientes condiciones se cumplen: -- El directorio actual contiene un archivo `Cargo.toml` -- El directorio actual contiene un archivo con la extensión `.rs` +- The current directory contains a `Cargo.toml` file +- The current directory contains a file with the `.rs` extension ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"🦀 "` | Una cadena de formato que representa el símbolo de Rust | -| `style` | `"bold red"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `rust`. | +| Opción | Por defecto | Descripción | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `rust` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ----------------- | -------------------------------------- | -| version | `v1.43.0-nightly` | La versión de `rustc` | +| version | `v1.43.0-nightly` | The version of `rustc` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -2037,23 +2080,24 @@ format = "via [⚙️ $version](red bold)" ## SHLVL -El módulo `shlvl` muestra la variable de entorno actual SHLVL ("nivel de shell"), si está establecido en un número y conoce o supera el umbral especificado. +The `shlvl` module shows the current SHLVL ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. ### Opciones -| Opción | Por defecto | Descripción | -| ----------- | ---------------------------- | ------------------------------------------- | -| `threshold` | `2` | Mostrar umbral. | -| `format` | `"[$symbol$shlvl]($style) "` | El formato del módulo. | -| `symbol` | `"↕️ "` | El símbolo usado para representar el SHLVL. | -| `style` | `"bold yellow"` | El estilo del módulo. | -| `disabled` | `true` | Desactiva el módulo `shlvl`. | +| Opción | Por defecto | Descripción | +| ----------- | ---------------------------- | ----------------------------------------------------------- | +| `threshold` | `2` | Display threshold. | +| `format` | `"[$symbol$shlvl]($style) "` | El formato del módulo. | +| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | +| `repeat` | `false` | Causes `symbol` to be repeated by the current SHLVL amount. | +| `style` | `"bold yellow"` | El estilo del módulo. | +| `disabled` | `true` | Disables the `shlvl` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ------- | -------------------------------------- | -| shlvl | `3` | El valor actual de SHLVL | +| shlvl | `3` | The current value of SHLVL | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -2072,22 +2116,22 @@ threshold = 3 ## Singularity -El módulo `singularity` muestra la imagen de singularity actual, si se encuentra dentro de un contenedor y `$SINGULARITY_NAME` está establecido. +The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set. ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | -------------------------------- | ------------------------------------------------------------------- | -| `format` | `'[$symbol\[$env\]]($style) '` | El formato del módulo. | -| `symbol` | `""` | Una cadena de formato que se muestra antes del nombre de la imagen. | -| `style` | `"bold dimmed blue"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `singularity`. | +| Opción | Por defecto | Descripción | +| ---------- | -------------------------------- | ------------------------------------------------ | +| `format` | `'[$symbol\[$env\]]($style) '` | El formato del módulo. | +| `symbol` | `""` | A format string displayed before the image name. | +| `style` | `"bold dimmed blue"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `singularity` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ------------ | -------------------------------------- | -| env | `centos.img` | La imagen de singularity actual | +| env | `centos.img` | The current singularity image | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -2104,28 +2148,39 @@ format = '[📦 \[$env\]]($style) ' ## Status -El módulo `status` muestra el código de salida del comando anterior. El módulo se mostrará sólo si el código de salida no es `0`. +The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. ::: tip -Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. ::: +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | -------------------------- | ---------------------------------------------------------- | -| `format` | `[$symbol$status]($style)` | El formato del módulo | -| `symbol` | `"✖"` | Una cadena de formato que representa el símbolo del estado | -| `style` | `"bold red"` | El estilo del módulo. | -| `disabled` | `true` | Desactiva el módulo `status`. | +| Opción | Por defecto | Descripción | +| ----------------------- | -------------------------- | ---------------------------------------------------- | +| `format` | `[$symbol$status]($style)` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | +| `style` | `"bold red"` | El estilo del módulo. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### Variables -| Variable | Ejemplo | Descripción | -| --------- | ------- | -------------------------------------- | -| status | `127` | El código de salida del último comando | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| -------------- | ------- | -------------------------------------------------------------------- | +| status | `127` | The exit code of the last command | +| int | `127` | The exit code of the last command | +| common_meaning | `ERROR` | Meaning of the code if not a signal | +| signal_number | `9` | Signal number corresponding to the exit code, only if signalled | +| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled | +| maybe_int | `7` | Contains the exit code number when no meaning has been found | +| 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 @@ -2137,33 +2192,34 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable [status] style = "bg:blue" -symbol = "💣 " -format = '[\[$symbol$status\]]($style) ' +symbol = "🔴" +format = '[\[$symbol $status_common_meaning$status_signal_name$status_maybe_int\]]($style) ' +map_symbol = true disabled = false ``` ## Swift -El módulo `swift` muestra la versión actualmente instalada de Swift. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `swift` module shows the currently installed version of Swift. El módulo se muestra si algunas de las siguientes condiciones se cumplen: -- El directorio actual contiene un archivo `Package.swift` -- El directorio actual contiene un archivo con la extensión `.swift` +- The current directory contains a `Package.swift` file +- The current directory contains a file with the `.swift` extension ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | -------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"🐦 "` | Una cadena de formato que representa el símbolo de Swift | -| `style` | `"bold 202"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `swift`. | +| Opción | Por defecto | Descripción | +| ---------- | ---------------------------------- | ------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `swift` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v5.2.4` | La versión de `swift` | +| version | `v5.2.4` | The version of `swift` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -2180,28 +2236,28 @@ format = "via [🏎 $version](red bold)" ## Terraform -El módulo `terraform` muestra el espacio de trabajo y la versión actual de terraform. Por defecto la versión de terraform no se muestra, ya que esto es lento en las versiones actuales de terraform cuando muchos plugins están en uso. Si aún deseas activarlo, [sigue el ejemplo que se muestra a continuación](#with-version). El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). El módulo se muestra si algunas de las siguientes condiciones se cumplen: -- El directorio actual contiene una carpeta `.terraform` -- El directorio actual contiene un archivo con las extensiones `.tf` o `.hcl` +- The current directory contains a `.terraform` folder +- Current directory contains a file with the `.tf` or `.hcl` extensions ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ------------------------------------ | ------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$workspace]($style) "` | La cadena de formato para el módulo. | -| `symbol` | `"💠 "` | Una cadena de formato que se muestra antes del espacio de trabajo de terraform. | -| `style` | `"bold 105"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `terraform`. | +| Opción | Por defecto | Descripción | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | +| `symbol` | `"💠 "` | A format string shown before the terraform workspace. | +| `style` | `"bold 105"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `terraform` module. | ### Variables -| Variable | Ejemplo | Descripción | -| --------- | ------------- | ----------------------------------------- | -| version | `v0.12.24` | La versión de `terraform` | -| workspace | `por defecto` | El espacio de trabajo actual de terraform | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| --------- | ---------- | -------------------------------------- | +| version | `v0.12.24` | The version of `terraform` | +| workspace | `default` | The current terraform workspace | +| 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 @@ -2225,35 +2281,35 @@ format = "[🏎💨 $version$workspace]($style) " format = "[🏎💨 $workspace]($style) " ``` -## Time +## Hora -El módulo `time` muestra la hora **local** actual. El valor de configuración de `format` es usado por la caja de [`chrono`](https://crates.io/crates/chrono) para controlar cómo se muestra la hora. Echa un vistazo a [los documentos de chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) para ver qué opciones están disponibles. +The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. ::: tip -Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### Opciones -| 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 | -| `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 | +| Opción | Por defecto | Descripción | +| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `format` | `"at [$time]($style) "` | The format string for the module. | +| `use_12hr` | `false` | Enables 12 hour formatting | +| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. | +| `style` | `"bold yellow"` | The style for the module time | +| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. | +| `disabled` | `true` | Disables the `time` module. | +| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | -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`. +If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. ### Variables | Variable | Ejemplo | Descripción | | --------- | ---------- | ------------------------------------- | -| time | `13:08:10` | La hora actual. | +| time | `13:08:10` | The current time. | | style\* | | Refleja el valor de la opción `style` | \*: Esta variable sólo puede ser usada como parte de una cadena de estilo @@ -2273,29 +2329,31 @@ time_range = "10:00:00-14:00:00" ## Username -El módulo `username` muestra el nombre de usuario activo. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `username` module shows active user's username. El módulo se muestra si algunas de las siguientes condiciones se cumplen: -- El usuario actual es root -- El usuario actual no es el mismo que el que está conectado -- El usuario está actualmente conectado como una sesión SSH -- La variable `show_always` se establece en true +- The current user is root +- The current user isn't the same as the one that is logged in +- The user is currently connected as an SSH session +- The variable `show_always` is set to true + +::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. ::: ### Opciones -| Opción | Por defecto | Descripción | -| ------------- | ----------------------- | ------------------------------------------ | -| `style_root` | `"bold red"` | El estilo usado cuando el usuario es root. | -| `style_user` | `"bold yellow"` | El estilo usado para usuarios no root. | -| `format` | `"[$user]($style) in "` | El formato del módulo. | -| `show_always` | `false` | Siempre muestra el módulo `username`. | -| `disabled` | `false` | Desactiva el módulo `username`. | +| Opción | Por defecto | Descripción | +| ------------- | ----------------------- | ------------------------------------- | +| `style_root` | `"bold red"` | The style used when the user is root. | +| `style_user` | `"bold yellow"` | The style used for non-root users. | +| `format` | `"[$user]($style) in "` | El formato del módulo. | +| `show_always` | `false` | Always shows the `username` module. | +| `disabled` | `false` | Disables the `username` module. | ### Variables -| Variable | Ejemplo | Descripción | -| -------- | ------------ | --------------------------------------------------------------------------------------------------- | -| `style` | `"red bold"` | Refleja el valor de la opción `style_root` cuando root inició sesión y `style_user` por otra parte. | -| `user` | `"matchai"` | El ID de usuario conectado actualmente. | +| Variable | Ejemplo | Descripción | +| -------- | ------------ | ------------------------------------------------------------------------------------------- | +| `style` | `"red bold"` | Mirrors the value of option `style_root` when root is logged in and `style_user` otherwise. | +| `user` | `"matchai"` | The currently logged-in user ID. | ### Ejemplo @@ -2312,24 +2370,24 @@ show_always = true ## Zig -El módulo `zig` muestra la versión instalada de Zig. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `zig` module shows the currently installed version of Zig. El módulo se muestra si algunas de las siguientes condiciones se cumplen: -- El directorio actual contiene un archivo `.zig` +- The current directory contains a `.zig` file ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ---------------------------------------------------- | -| `symbol` | `"↯ "` | El símbolo usado antes de mostrar la versión de Zig. | -| `style` | `"bold yellow"` | El estilo del módulo. | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `disabled` | `false` | Desactiva el módulo `zig`. | +| Opción | Por defecto | Descripción | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | El estilo del módulo. | +| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | +| `disabled` | `false` | Disables the `zig` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v0.6.0` | La versión de `zig` | +| version | `v0.6.0` | The version of `zig` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -2344,87 +2402,87 @@ El módulo `zig` muestra la versión instalada de Zig. El módulo se muestra si symbol = "⚡️ " ``` -## Comandos personalizados +## Custom commands -Los módulos `personalizados` muestran la salida de algunos comandos arbitrarios. +The `custom` modules show the output of some arbitrary commands. -Estos módulos se mostrarán si se cumplen alguna de las siguientes condiciones: +These modules will be shown if any of the following conditions are met: -- 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 +- 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 ::: tip -Múltiples módulos personalizados pueden definirse usando una `.`. +Multiple custom modules can be defined by using a `.`. ::: ::: tip -El orden en el que se muestran los módulos personalizados se puede establecer individualmente incluyendo `${custom.foo}` en el `format` de nivel superior (ya que incluye un punto, necesita usar `${...}`). Por defecto, el módulo `custom` simplemente mostrará todos los módulos personalizados en el orden en que fueron definidos. +The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined. ::: ::: tip -[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í! +[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! ::: ### Opciones -| 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` | `""` | 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`. | +| Opción | Por defecto | Descripción | +| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. | +| `shell` | | [See below](#custom-command-shell) | +| `description` | `""` | The description of the module that is shown when running `starship explain`. | +| `files` | `[]` | The files that will be searched in the working directory for a match. | +| `directories` | `[]` | The directories that will be searched in the working directory for a match. | +| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. | +| `symbol` | `""` | The symbol used before displaying the command output. | +| `style` | `"bold green"` | El estilo del módulo. | +| `format` | `"[$symbol$output]($style) "` | El formato del módulo. | +| `disabled` | `false` | Disables this `custom` module. | ### Variables -| Variable | Descripción | -| --------- | ----------------------------------------- | -| output | La salida del comando de shell en `shell` | -| symbol | Refleja el valor de la opción `symbol` | -| style\* | Refleja el valor de la opción `style` | +| Variable | Descripción | +| --------- | -------------------------------------- | +| 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` | \*: Esta variable sólo puede ser usada como parte de una cadena de estilo #### Comando personalizado de shell -`shell` acepta una lista no vacía de cadenas, donde: +`shell` accepts a non-empty list of strings, where: -- La primera cadena es la ruta al intérprete de comandos a usar para ejecutar el comando. -- Otros argumentos siguientes que son pasados al shell. +- The first string is the path to the shell to use to execute the command. +- Other following arguments are passed to the shell. -Si no está activado, se retornará a STARSHIP_SHELL y luego a "sh" en Linux, y "cmd /C" en Windows. +If unset, it will fallback to STARSHIP_SHELL and then to "sh" on Linux, and "cmd /C" on Windows. -El `comando` será pasado en stdin. +The `command` will be passed in on stdin. -Si no se da el `shell` o solo contiene un elemento y Starship detecta PowerShell los siguientes argumentos se añadirán automáticamente: `-NoProfile -Command -`. Este comportamiento puede evitarse pasando explícitamente argumentos al intérprete, p.ej. +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. ```toml shell = ["pwsh", "-Command", "-"] ``` -::: advertencia Asegúrate de que tu configuración personalizada de shell salga con éxito +::: warning Make sure your custom shell configuration exits gracefully -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`). +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). -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. +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. -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. +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. -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. +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. ::: @@ -2434,8 +2492,8 @@ La detección automática de shells y la adición adecuada de parámetros están # ~/.config/starship.toml [custom.foo] -command = "echo foo" # muestra la salida del comando -files = ["foo"] # se pueden especificar filtros +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" diff --git a/docs/es-ES/faq/README.md b/docs/es-ES/faq/README.md index ad119ee9c..197fd4b8a 100644 --- a/docs/es-ES/faq/README.md +++ b/docs/es-ES/faq/README.md @@ -12,7 +12,7 @@ ## ¿Cómo obtengo el autocompletado del comando como se muestra en el GIF? -El soporte de completado es proporcionado por el intérprete de órdenes elegido. En el caso de la demo, la demo se realizó con [Fish Shell](https://fishshell.com/), que proporciona el completado por defecto. Si usas Z Shell (zsh), te sugeriría echar un vistazo a [zsh-autosuggeries,](https://github.com/zsh-users/zsh-autosuggestions). +Completion support, or autocomplete, is provided by your shell of choice. En el caso de la demo, la demo se realizó con [Fish Shell](https://fishshell.com/), que proporciona el completado por defecto. Si usas Z Shell (zsh), te sugeriría echar un vistazo a [zsh-autosuggeries,](https://github.com/zsh-users/zsh-autosuggestions). ## ¿`prompt_order` y `.disabled` hacen lo mismo? @@ -21,7 +21,7 @@ Sí, se pueden usar ambos para desactivar los módulos en el símbolo del sistem - Deshabilitar módulos es más explícito que omitirlos del nivel superior `format` - Los nuevos módulos se añadirán al símbolo del sistema en cuanto Starship se actualice -## La documentación dice que Starship es compatible con cualquier intérprete de comandos pero no soporta X Shell. ¿Por qué? +## The docs say Starship is cross-shell. Why isn't my preferred shell supported? Por la forma en que Starshp está construído, debería ser posible añadir soporte para prácticamente cualquier intérprete de comandos. El binario de Starship es sin estado y agnóstico, por lo que mientras que tu intérprete de comandos se pueda ampliar y soporte la personalización del símbolo del sistema, puede utilizar Starship. diff --git a/docs/es-ES/guide/README.md b/docs/es-ES/guide/README.md index 626ce5cf8..d152b9ae3 100644 --- a/docs/es-ES/guide/README.md +++ b/docs/es-ES/guide/README.md @@ -79,13 +79,15 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png" alt="简体中文" />   - Español   - - **¡El prompt minimalista, ultrarápido e infinitamente personalizable para cualquier intérprete de comandos!** - - **Rápido:** es rápido – _realmente_ rápido! 🚀 - **Personalizable:** configura cada parte de tu prompt. - **Universal:** funciona en cualquier intérprete de comandos, en cualquier sistema operativo. @@ -199,7 +199,7 @@ #### PowerShell - Añade lo siguiente al final de `Microsoft.PowerShell_profile.ps1`. Puedes comprobar la ubicación de este archivo consultando la variable `$PROFILE` en PowerShell. Normalmente la ruta es `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` o `~/.config/powershell/Microsoft.PowerShell_profile.ps1` en -Nix. + Añade lo siguiente al final de `Microsoft.PowerShell_profile.ps1`. Puedes comprobar la ubicación de este archivo consultando la variable `$PROFILE` en PowerShell. Normalmente la ruta es `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` o `~/.config/powershell/Microsoft.PowerShell_profile.ps1` en -Nix. ```sh Invoke-Expression (&starship init powershell) @@ -220,6 +220,8 @@ ¡Siempre estamos buscando colaboradores de **todos los niveles y habilidades**! Si estas buscando una manera fácil de ayudar este proyecto, puedes intentar resolver un problema con la etiqueta "[good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)". +Si hablas con fluidez en un idioma que no sea inglés, agradecemos mucho cualquier ayuda para mantener nuestros documentos traducidos y actualizados en otros idiomas. Si quieres ayudar, puedes contribuir con las traducciones en el [Crowdin de Starship](https://translate.starship.rs/). + Si quieres ayudar a colaborar a Starship, por favor mira nuestra [Guía de Colaboradores](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Además, siéntete libre de entrar en nuestro [servidor de Discord](https://discord.gg/8Jzqu3T) y di "¡Hola!". 👋 ### Desarrolladores @@ -252,7 +254,7 @@ Apoya este proyecto con tu organización. Su logo se mostrará aquí con un enla ## 💭 Inspirado por -Por favor, revisa estos proyectos que inspiraron la creación de Starship. 🙏 +Por favor, revisa estos trabajos previos que ayudaron a inspirar la creación de starship. 🙏 - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Una prompt ZSH para astronautas. @@ -262,9 +264,9 @@ Por favor, revisa estos proyectos que inspiraron la creación de Starship. 🙏


- Icono de Starship + Icono de cohete de Starship

## 📝 Licencia -Copyright © 2019-actualidad, [Creadores de Starship](https://github.com/starship/starship/graphs/contributors).
Este proyecto está bajo una licencia [ISC](https://github.com/starship/starship/blob/master/LICENSE). +Derechos de autor © 2019-presente, [Colaboradores de Starship](https://github.com/starship/starship/graphs/contributors).
Este proyecto está bajo una licencia [ISC](https://github.com/starship/starship/blob/master/LICENSE). diff --git a/docs/es-ES/presets/README.md b/docs/es-ES/presets/README.md index 31a5b75a5..b9042b4b4 100644 --- a/docs/es-ES/presets/README.md +++ b/docs/es-ES/presets/README.md @@ -18,17 +18,15 @@ Este ajuste predeterminado no modifica nada excepto los símbolos usados para ca [aws] symbol = " " -[battery] -full_symbol = "" -charging_symbol = "" -discharging_symbol = "" - [conda] symbol = " " [dart] symbol = " " +[directory] +read_only = " " + [docker] symbol = " " diff --git a/docs/fr-FR/advanced-config/README.md b/docs/fr-FR/advanced-config/README.md index 9bba9e70b..ec08b8279 100644 --- a/docs/fr-FR/advanced-config/README.md +++ b/docs/fr-FR/advanced-config/README.md @@ -82,7 +82,7 @@ Les chaînes de style sont une liste de mots, séparés par des espaces. Les mot où `` est un spécificateur de couleur (discuté ci-dessous). `fg:` et `` font actuellement la même chose, même si cela peut changer plus tard. L'ordre des mots dans le string n'a pas d'importance. -Le jeton ` none ` remplace tous les autres jetons d'une string, de sorte que, par exemple, ` fg: red none fg: blue ` créera toujours une string sans style. Il peut devenir une erreur d'utiliser `none` en conjonction avec d'autres jetons dans le futur. +The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. Un spécificateur de couleur peut être l'un des éléments suivants : diff --git a/docs/fr-FR/config/README.md b/docs/fr-FR/config/README.md index 97c3634cf..177561963 100644 --- a/docs/fr-FR/config/README.md +++ b/docs/fr-FR/config/README.md @@ -51,7 +51,7 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" **Module**: Un composant dans l'invite donnant des informations basées sur des informations contextuelles à propos de votre Système d'Exploitation. Par exemple, le module "nodejs" montre la version de NodeJS qui est actuellement installée sur votre ordinateur, si votre répertoire actuel est un projet NodeJS. -**Variable**: Petits sous-composants qui contiennent des informations fournies par le module. Par exemple, la variable "version" dans le module "nodejs" contient la version actuelle de NodeJS. +**Variable**: Smaller sub-components that contain information provided by the module. Par exemple, la variable "version" dans le module "nodejs" contient la version actuelle de NodeJS. Par convention, la plupart des modules ont un préfixe de la couleur par défaut du terminal (par exemple `via` dans "nodejs") et un espace vide comme suffixe. @@ -173,7 +173,7 @@ Le `format` par défaut est utilisé pour définir le format de l'invite, si il ```toml format = "$all" -# Ce qui est equivalent a: +# Which is equivalent to format = """ $username\ $hostname\ @@ -197,6 +197,7 @@ $golang\ $helm\ $java\ $julia\ +$kotlin\ $nim\ $nodejs\ $ocaml\ @@ -217,8 +218,8 @@ $gcloud\ $openstack\ $env_var\ $crystal\ -$cmd_duration\ $custom\ +$cmd_duration\ $line_break\ $lua\ $jobs\ @@ -304,24 +305,15 @@ Le module `battery` montre à quel point la batterie de l'appareil est chargée | Option | Default | Description | | -------------------- | --------------------------------- | --------------------------------------------------- | -| `full_symbol` | `"•"` | Le symbole affiché lorsque la batterie est pleine. | -| `charging_symbol` | `"⇡"` | Le symbole affiché lorsque la batterie se charge. | -| `discharging_symbol` | `"⇣"` | Le symbole affiché lorsque la batterie se décharge. | +| `full_symbol` | `""` | Le symbole affiché lorsque la batterie est pleine. | +| `charging_symbol` | `""` | Le symbole affiché lorsque la batterie se charge. | +| `discharging_symbol` | `""` | Le symbole affiché lorsque la batterie se décharge. | +| `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) "` | Format du module. | -| `display` | [lien](#battery-display) | Affiche le seuil et le style du module. | -| `disabled` | `false` | Désactive le module `battery`. | +| `display` | [lien](#battery-display) | Display threshold and style for the module. | +| `disabled` | `false` | Disables the `battery` module. | -
-Il existe aussi des options pour des états de batterie peu communs. - -| Variable | Description | -| ---------------- | ------------------------------------------------------------- | -| `unknown_symbol` | Le symbole affiché lorsque l'état de la batterie est inconnu. | -| `empty_symbol` | Le symbole affiché lorsque la batterie est vide. | - -Remarque : L'indicateur de batterie sera masqué si le statut est `unknown` ou `empty` sauf si vous spécifiez l'option dans la configuration. - -
### Exemple @@ -336,7 +328,7 @@ discharging_symbol = "💀" ### Indicateur de batterie -L'option de configuration `display` est utilisée pour définir quand l'indicateur de batterie doit être affiché (seuil) et à quoi il ressemble (style). Si aucun `display` n'est fourni. La valeur par défaut est la suivante : +The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. La valeur par défaut est la suivante : ```toml [[battery.display]] @@ -346,12 +338,12 @@ style = "bold red" #### Options -L'option `display` est une array de la table suivante. +The `display` option is an array of the following table. -| Option | Description | -| ----------- | -------------------------------------------------- | -| `threshold` | La limite supérieure pour l'option d'affichage. | -| `style` | Le style de l'option display si elle est utilisée. | +| Option | Description | +| ----------- | ----------------------------------------------- | +| `threshold` | The upper bound for the display option. | +| `style` | The style used if the display option is in use. | #### Exemple @@ -370,30 +362,30 @@ style = "bold yellow" ## Caractères -Le module `character` affiche un caractère (habituellement une flèche) à côté de l'endroit où le texte est entré dans votre terminal. +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. -Le caractère vous dira si la dernière commande a été réussie ou pas. Cela peut être fait de deux manières: +The character will tell you whether the last command was successful or not. It can do this in two ways: - changement de couleur (`red`/`green`) - changement de forme (`❯`/`✖`) -Par défaut, il ne change que la couleur. Si vous voulez également changer sa forme, jetez un œil à [cet exemple](#with-custom-error-shape). +By default it only changes color. If you also want to change it's shape take a look at [this example](#with-custom-error-shape). ### Options -| Option | Default | Description | -| ---------------- | ------------------- | ----------------------------------------------------------------------------- | -| `format` | `"$symbol "` | Le format utilisée avant l'entrée de texte. | -| `success_symbol` | `"[❯](bold green)"` | Le format utilisé avant l'entrée de texte si la commande précédente a réussi. | -| `error_symbol` | `"[❯](bold red)"` | Le format utilisé avant l'entrée de texte si la commande précédente a échoué. | -| `vicmd_symbol` | `"[❮](bold green)"` | Le format utilisé avant l'entrée de texte si le shell est en mode vim normal. | -| `disabled` | `false` | Désactive le module `character`. | +| Option | Défaut | Description | +| ---------------- | ------------------- | -------------------------------------------------------------------------------- | +| `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. | +| `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. | +| `vicmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | +| `disabled` | `false` | Disables the `character` module. | ### Variables -| Variable | Exemple | Description | -| -------- | ------- | --------------------------------------------------------------- | -| symbol | | Reflète sois `success_symbol`, `error_symbol` ou `vicmd_symbol` | +| Variable | Exemple | Description | +| -------- | ------- | --------------------------------------------------------------------- | +| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` | ### Exemples @@ -428,25 +420,25 @@ vicmd_symbol = "[V](bold green) " ## CMake -Le module `cmake` affiche la version actuellement installée de CMake si l'une des conditions suivantes est remplie : +The `cmake` module shows the currently installed version of CMake if any of the following conditions are met: - Le répertoire actuel contient un fichier `CMakeLists.txt` - Le répertoire actuel contient un fichier ` CMakeCache.txt` ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | --------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | Format du module. | -| `symbol` | `"喝 "` | Le symbole utilisé avant la version de cmake. | -| `style` | `"bold blue"` | Le style du module. | -| `disabled` | `false` | Désactive le module `cmake`. | +| Option | Défaut | Description | +| ---------- | ---------------------------------- | -------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | Format du module. | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | Le style du module. | +| `disabled` | `false` | Disables the `cmake` module. | ### Variables | Variable | Exemple | Description | | --------- | --------- | -------------------------------------- | -| version | `v3.17.3` | La version de cmake | +| version | `v3.17.3` | The version of cmake | | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | @@ -454,27 +446,27 @@ Le module `cmake` affiche la version actuellement installée de CMake si l'une d ## Temps d'exécution -Le module `cmd_duration` montre le temps qu'a pris la dernière commande a pris pour s'exécuter. Le module ne sera affiché que si la commande a pris plus de deux secondes, ou si la valeur de configuration `min_time` existe. +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. -::: attention, n'accrochez pas la trappe DEBUG en Bash +::: warning Do not hook the DEBUG trap in Bash -Si vous utilisez starship en `bash`, n'accrochez pas `DEBUG` après avoir exécuté `eval $(starship init $0)`, ou ce module **cassera**. +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. ::: -Les utilisateurs de Bash qui ont besoin de fonctionnalité pré-exec peuvent utiliser [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Définissez simplement les array `preexec_functions` et `precmd_functions` avant d'éxécuter `eval $(starship init $0)`, puis procédez comme d'habitude. +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. ### Options -| Option | Default | Description | -| -------------------- | ----------------------------- | ---------------------------------------------------------------------- | -| `min_time` | `2_000` | Durée la plus courte quand afficher le temps (en millisecondes). | -| `show_milliseconds` | `false` | Afficher les millisecondes en plus des secondes pendant la durée. | -| `format` | `"took [$duration]($style) "` | Format du module. | -| `style` | `"bold yellow"` | Le style du module. | -| `disabled` | `false` | Désactive le module `cmd_duration`. | -| `show_notifications` | `false` | Afficher les notifications du bureau lorsque la commande est terminée. | -| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | +| Option | Défaut | Description | +| -------------------- | ----------------------------- | ---------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | Format du module. | +| `style` | `"bold yellow"` | Le style du module. | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `show_notifications` | `false` | Show desktop notifications when command completes. | +| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | ::: tip @@ -484,10 +476,10 @@ Showing desktop notifications requires starship to be built with `rust-notify` s ### Variables -| Variable | Exemple | Description | -| --------- | -------- | --------------------------------------------- | -| duration | `16m40s` | Le temps nécessaire pour exécuter la commande | -| style\* | | Reflète la valeur de l'option `style` | +| Variable | Exemple | Description | +| --------- | -------- | --------------------------------------- | +| duration | `16m40s` | The time it took to execute the command | +| style\* | | Reflète la valeur de l'option `style` | \* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style @@ -513,22 +505,22 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c ### Options -| Option | Default | Description | -| ------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `truncation_length` | `1` | Le nombre de répertoires dans lesquels le chemin d'environnement (Path) doit être tronqué, si l'environnement a été créé via `conda create -p [path]`. `0` ne signifie pas de troncature. Regardez aussi le module [`directory`](#directory). | -| `symbol` | `"🅒 "` | Le symbole utilisé avant le nom d'environnement. | -| `style` | `"bold green"` | Le style du module. | -| `format` | `"[$symbol$environment]($style) "` | Format du module. | -| `ignore_base` | `true` | Ignore l'environnement `base` lorsqu'il est activé. | -| `disabled` | `false` | Désactive le module `conda`. | +| Option | Défaut | Description | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. | +| `symbol` | `"🅒 "` | The symbol used before the environment name. | +| `style` | `"bold green"` | Le style du module. | +| `format` | `"via [$symbol$environment]($style) "` | Format du module. | +| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `disabled` | `false` | Disables the `conda` module. | ### Variables -| Variable | Exemple | Description | -| ------------- | ------------ | -------------------------------------- | -| environnement | `astronauts` | La version courante de conda | -| symbol | | Reflète la valeur de l'option `symbol` | -| style\* | | Reflète la valeur de l'option `style` | +| Variable | Exemple | Description | +| ----------- | ------------ | -------------------------------------- | +| environment | `astronauts` | The current conda environment | +| symbol | | Reflète la valeur de l'option `symbol` | +| style\* | | Reflète la valeur de l'option `style` | \* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style @@ -543,26 +535,26 @@ format = "[$symbol$environment](dimmed green) " ## Crystal -The `crystal` module shows the currently installed version of Crystal. The module will be shown if any of the following conditions are met: +The `crystal` module shows the currently installed version of Crystal. Le module est affiché si l'une des ces conditions est remplie : - Le répertoire courant contient un fichier `shard.yml` - Le répertoire courant contient un fichier `.cr` ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ---------------------------------------------------------- | -| `symbol` | `"🔮 "` | Le symbole utilisé avant d'afficher la version de crystal. | -| `style` | `"bold green"` | Le style du module. | -| `format` | `"via [$symbol$version]($style) "` | Format du module. | -| `disabled` | `false` | Désactive le module `crystal`. | +| Option | Défaut | Description | +| ---------- | ---------------------------------- | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | Le style du module. | +| `format` | `"via [$symbol$version]($style) "` | Format du module. | +| `disabled` | `false` | Disables the `crystal` module. | ### Variables | Variable | Exemple | Description | | --------- | --------- | -------------------------------------- | -| version | `v0.32.1` | La version de `cristal` | -| symbole | | Reflète la valeur de l'option `symbol` | +| version | `v0.32.1` | The version of `crystal` | +| symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | \* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style @@ -578,7 +570,7 @@ format = "via [✨ $version](bold blue) " ## Dart -The `dart` module shows the currently installed version of Dart. The module will be shown if any of the following conditions are met: +The `dart` module shows the currently installed version of Dart. Le module est affiché si l'une des ces conditions est remplie : - Le répertoire courant contient un fichier `.dart` - Le répertoire courant contient un répertoire `.dart_tool` @@ -586,18 +578,18 @@ The `dart` module shows the currently installed version of Dart. The module will ### Options -| Option | Défaut | Description | -| ---------- | ---------------------------------- | -------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | Format du module. | -| `symbol` | `"🎯 "` | Une chaîne de caractères représentant le symbole de Dart | -| `style` | `"bold blue"` | Le style du module. | -| `disabled` | `false` | Désactive le module `dart`. | +| Option | Défaut | Description | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | Format du module. | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | Le style du module. | +| `disabled` | `false` | Disables the `dart` module. | ### Variables | Variable | Exemple | Description | | --------- | -------- | -------------------------------------- | -| version | `v2.8.4` | La version de `dart` | +| version | `v2.8.4` | The version of `dart` | | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | @@ -622,25 +614,25 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Options -| Option | Défaut | Description | -| ------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | Le nombre de dossiers parents selon lesquels le répertoire courant doit être tronqué. | -| `truncate_to_repo` | `true` | Si oui ou non tronquer à la racine du repo git dans lequel vous vous trouvez. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | Format du module. | -| `style` | `"bold cyan"` | Le style du module. | -| `disabled` | `false` | Désactive le module `directory`. | -| `read_only` | `"🔒"` | Le symbole indiquant que le répertoire courant est en lecture seule. | -| `read_only_style` | `"red"` | Le style du symbole en lecture seule. | -| `truncation_symbol` | `""` | Le symbole en préfixe aux chemins tronqués. eg: "…/" | +| Option | Défaut | Description | +| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | Format du module. | +| `style` | `"bold cyan"` | Le style du module. | +| `disabled` | `false` | Disables the `directory` module. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
This module has a few advanced configuration options that control how the directory is displayed. -| Options avancées | Default | Description | -| --------------------------- | ------- | ---------------------------------------------------------------------------------------- | -| `substitutions` | | Table de substitutions à faire au chemin. | -| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. | -| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. | +| Advanced Option | Défaut | Description | +| --------------------------- | ------ | ---------------------------------------------------------------------------------------- | +| `substitutions` | | A table of substitutions to be made to the path. | +| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. | +| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. | `substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD. @@ -658,7 +650,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | Variable | Exemple | Description | | --------- | --------------------- | ------------------------------------- | -| path | `"D:/Projects"` | Le chemin du répertoire courant | +| path | `"D:/Projects"` | The current directory path | | style\* | `"black bold dimmed"` | Reflète la valeur de l'option `style` | \* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style @@ -679,13 +671,13 @@ The `docker_context` module shows the currently active [Docker context](https:// ### Options -| Option | Default | Description | +| Option | Défaut | Description | | ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | | `format` | `"via [$symbol$context]($style) "` | Format du module. | | `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | | `style` | `"blue bold"` | Le style du module. | | `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | -| `disabled` | `true` | Désactive le module `docker_context`. | +| `disabled` | `true` | Disables the `docker_context` module. | ### Variables @@ -730,19 +722,19 @@ The module will also show the Target Framework Moniker ( ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. @@ -1795,7 +1833,7 @@ format = "via [🎁 $version](208 bold) " ## Perl -The `perl` module shows the currently installed version of Perl. The module will be shown if any of the following conditions are met: +The `perl` module shows the currently installed version of Perl. Le module est affiché si l'une des ces conditions est remplie : - The current directory contains a `Makefile.PL` or `Build.PL` file - The current directory contains a `cpanfile` or `cpanfile.snapshot` file @@ -1831,7 +1869,7 @@ format = "via [🦪 $version]($style) " ## PHP -The `php` module shows the currently installed version of PHP. The module will be shown if any of the following conditions are met: +The `php` module shows the currently installed version of PHP. Le module est affiché si l'une des ces conditions est remplie : - The current directory contains a `composer.json` file - The current directory contains a `.php-version` file @@ -1867,7 +1905,7 @@ format = "via [🔹 $version](147 bold) " ## PureScript -The `purescript` module shows the currently installed version of PureScript version. The module will be shown if any of the following conditions are met: +The `purescript` module shows the currently installed version of PureScript version. Le module est affiché si l'une des ces conditions est remplie : - The current directory contains a `spago.dhall` file - The current directory contains a \*.purs files @@ -1906,7 +1944,7 @@ The `python` module shows the currently installed version of Python and the curr If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`. -The module will be shown if any of the following conditions are met: +Le module est affiché si l'une des ces conditions est remplie : - The current directory contains a `.python-version` file - The current directory contains a `requirements.txt` file @@ -1920,16 +1958,24 @@ The module will be shown if any of the following conditions are met: ### Options -| Option | Défaut | Description | -| -------------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | Format du module. | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | Le style du module. | -| `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | -| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | -| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. | -| `disabled` | `false` | Disables the `python` module. | +| Option | Défaut | Description | +| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | Format du module. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | Le style du module. | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | + +::: tip + +The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used. + +The default values and order for `python_binary` was chosen to first identify the Python version in a virtualenv/conda environments (which currently still add a `python`, no matter if it points to `python3` or `python2`). This has the side effect that if you still have a system Python 2 installed, it may be picked up before any Python 3 (at least on Linux Distros that always symlink `/usr/bin/python` to Python 2). If you do not work with Python 2 anymore but cannot remove the system Python 2, changing this to `"python3"` will hide any Python version 2, see example below. + +::: ### Variables @@ -1952,20 +1998,17 @@ symbol = "👾 " pyenv_version_name = true ``` -Using the `python3` binary to get the version. - -Note - The `python_binary` variable changes the binary that Starship executes to get the version of Python, it doesn't change the arguments that are used. - ```toml # ~/.config/starship.toml [python] +# Only use the `python3` binary to get the version. python_binary = "python3" ``` ## Ruby -The `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met: +The `ruby` module shows the currently installed version of Ruby. Le module est affiché si l'une des ces conditions est remplie : - The current directory contains a `Gemfile` file - The current directory contains a `.ruby-version` file @@ -1977,7 +2020,7 @@ The `ruby` module shows the currently installed version of Ruby. The module will | ---------- | ---------------------------------- | ------------------------------------------------ | | `format` | `"via [$symbol$version]($style) "` | Format du module. | | `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `style` | `"bold green"` | Le style du module. | +| `style` | `"bold red"` | Le style du module. | | `disabled` | `false` | Disables the `ruby` module. | ### Variables @@ -2001,7 +2044,7 @@ symbol = "🔺 " ## Rust -The `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met: +The `rust` module shows the currently installed version of Rust. Le module est affiché si l'une des ces conditions est remplie : - The current directory contains a `Cargo.toml` file - The current directory contains a file with the `.rs` extension @@ -2012,7 +2055,7 @@ The `rust` module shows the currently installed version of Rust. The module will | ---------- | ---------------------------------- | ----------------------------------------------- | | `format` | `"via [$symbol$version]($style) "` | Format du module. | | `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `style` | `"bold green"` | Le style du module. | +| `style` | `"bold red"` | Le style du module. | | `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -2040,13 +2083,14 @@ The `shlvl` module shows the current SHLVL ("shell level") environment variable, ### Options -| Option | Défaut | Description | -| ----------- | ---------------------------- | --------------------------------------- | -| `threshold` | `2` | Display threshold. | -| `format` | `"[$symbol$shlvl]($style) "` | Format du module. | -| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | -| `style` | `"bold yellow"` | Le style du module. | -| `disabled` | `true` | Disables the `shlvl` module. | +| Option | Défaut | Description | +| ----------- | ---------------------------- | ----------------------------------------------------------- | +| `threshold` | `2` | Display threshold. | +| `format` | `"[$symbol$shlvl]($style) "` | Format du module. | +| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | +| `repeat` | `false` | Causes `symbol` to be repeated by the current SHLVL amount. | +| `style` | `"bold yellow"` | Le style du module. | +| `disabled` | `true` | Disables the `shlvl` module. | ### Variables @@ -2111,20 +2155,31 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Défaut | Description | -| ---------- | -------------------------- | ------------------------------------------------------ | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | A format string representing the symbol for the status | -| `style` | `"bold green"` | Le style du module. | -| `disabled` | `true` | Disables the `status` module. | +| Option | Défaut | Description | +| ----------------------- | -------------------------- | ---------------------------------------------------- | +| `format` | `[$symbol$status]($style)` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | +| `style` | `"bold red"` | Le style du module. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### Variables -| Variable | Exemple | Description | -| --------- | ------- | -------------------------------------- | -| status | `127` | The exit code of the last command | -| symbol | | Reflète la valeur de l'option `symbol` | -| style\* | | Reflète la valeur de l'option `style` | +| Variable | Exemple | Description | +| -------------- | ------- | -------------------------------------------------------------------- | +| status | `127` | The exit code of the last command | +| int | `127` | The exit code of the last command | +| common_meaning | `ERROR` | Meaning of the code if not a signal | +| signal_number | `9` | Signal number corresponding to the exit code, only if signalled | +| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled | +| maybe_int | `7` | Contains the exit code number when no meaning has been found | +| symbol | | Reflète la valeur de l'option `symbol` | +| style\* | | Reflète la valeur de l'option `style` | \* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style @@ -2136,15 +2191,16 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y [status] style = "bg:blue" -symbol = "💣 " -format = '[\[$symbol$status\]]($style) ' +symbol = "🔴" +format = '[\[$symbol $status_common_meaning$status_signal_name$status_maybe_int\]]($style) ' +map_symbol = true disabled = false ``` ## Swift -The `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met: +The `swift` module shows the currently installed version of Swift. Le module est affiché si l'une des ces conditions est remplie : - The current directory contains a `Package.swift` file - The current directory contains a file with the `.swift` extension @@ -2179,7 +2235,7 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). The module will be shown if any of the following conditions are met: +The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). Le module est affiché si l'une des ces conditions est remplie : - The current directory contains a `.terraform` folder - Current directory contains a file with the `.tf` or `.hcl` extensions @@ -2198,7 +2254,7 @@ The `terraform` module shows the currently selected terraform workspace and vers | Variable | Exemple | Description | | --------- | ---------- | -------------------------------------- | | version | `v0.12.24` | The version of `terraform` | -| workspace | `défaut` | The current terraform workspace | +| workspace | `default` | The current terraform workspace | | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | @@ -2272,18 +2328,20 @@ time_range = "10:00:00-14:00:00" ## Username -The `username` module shows active user's username. The module will be shown if any of the following conditions are met: +The `username` module shows active user's username. Le module est affiché si l'une des ces conditions est remplie : - The current user is root - The current user isn't the same as the one that is logged in - The user is currently connected as an SSH session - The variable `show_always` is set to true +::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. ::: + ### Options | Option | Défaut | Description | | ------------- | ----------------------- | ------------------------------------- | -| `style_root` | `"bold green"` | The style used when the user is root. | +| `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 "` | Format du module. | | `show_always` | `false` | Always shows the `username` module. | @@ -2311,7 +2369,7 @@ show_always = true ## Zig -The `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met: +The `zig` module shows the currently installed version of Zig. Le module est affiché si l'une des ces conditions est remplie : - The current directory contains a `.zig` file @@ -2400,9 +2458,9 @@ The order in which custom modules are shown can be individually set by including #### Commandes shell personnalisées -`shell` accepte une liste de chaînes non vide, où: +`shell` accepts a non-empty list of strings, where: -- La première chaîne est le chemin vers le shell à utiliser pour exécuter la commande. +- The first string is the path to the shell to use to execute the command. - Other following arguments are passed to the shell. If unset, it will fallback to STARSHIP_SHELL and then to "sh" on Linux, and "cmd /C" on Windows. diff --git a/docs/fr-FR/faq/README.md b/docs/fr-FR/faq/README.md index 907507e96..6590a1303 100644 --- a/docs/fr-FR/faq/README.md +++ b/docs/fr-FR/faq/README.md @@ -12,7 +12,7 @@ ## Comment puis-je obtenir la complétion de commandes comme montré dans le GIF de démo? -Le support de complétion est fourni par le shell de votre choix. Dans le cas de la démo, elle a été faite avec [Fish Shell](https://fishshell.com/), qui fournit des complétions par défaut. Si vous utilisez le Shell Z (zsh), vous pouvez jeter un œil à [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions). +Completion support, or autocomplete, is provided by your shell of choice. Dans le cas de la démo, elle a été faite avec [Fish Shell](https://fishshell.com/), qui fournit des complétions par défaut. Si vous utilisez le Shell Z (zsh), vous pouvez jeter un œil à [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions). ## Est-ce que l'option globale `format` et `.disabled` font la même chose ? @@ -21,7 +21,7 @@ Oui, ils peuvent tous deux être utilisés pour désactiver les modules dans l'i - Désactiver les modules est plus explicite que de les omettre du `format global` - Les modules nouvellement créés seront ajoutés à l'invite de commande au fur et à mesure que Starship sera mis à jour -## La doc dit que Starship est cross-shell, mais il ne supporte pas le shell X. Pourquoi ? +## The docs say Starship is cross-shell. Why isn't my preferred shell supported? Étant donné la façon dont Starship est construit, il devrait être possible d'ajouter le support pour pratiquement n'importe quel shell. Starship est sans état et agnostique, donc tant que votre shell supporte la personnalisation rapide et l'expansion, Starship peut être utilisé. diff --git a/docs/fr-FR/guide/README.md b/docs/fr-FR/guide/README.md index fa88db879..845fad4c3 100644 --- a/docs/fr-FR/guide/README.md +++ b/docs/fr-FR/guide/README.md @@ -79,13 +79,15 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png" alt="简体中文" />   - Espagnol   - - **L'invite minimaliste, ultra-rapide et personnalisable à l'infini pour n'importe quel shell !** - - **Rapide** : il est rapide - _vraiment vraiment_ rapide ! 🚀 - **Personnalisable:** configurer chaque élément de votre invite. - **Universel:** fonctionne avec n'importe quel shell, sur n'importe quel système d'exploitation. @@ -199,7 +199,7 @@ #### PowerShell - Ajoutez ce qui suit à la fin de `Microsoft.PowerShell_profile.ps1`. Vous pouvez vérifier l'emplacement de ce fichier en regardant la variable `$PROFILE` dans PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. + Ajoutez ce qui suit à la fin de `Microsoft.PowerShell_profile.ps1`. Vous pouvez vérifier l'emplacement de ce fichier en regardant la variable `$PROFILE` dans PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. ```sh Invoke-Expression (&starship init powershell) @@ -220,6 +220,8 @@ Nous sommes toujours à la recherche de contributeurs de **tous niveaux de compétence**! Si vous cherchez à faciliter votre entrée dans le projet, essayez un [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). +If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/). + Si vous êtes intéressé pour aider et contribuer à Starship, veuillez jeter un coup d'œil à notre [Guide de contribution](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Aussi, n'hésitez pas à vous rendre sur notre [serveur Discord](https://discord.gg/8Jzqu3T) pour dire bonjour. 👋 ### Contributeurs @@ -252,7 +254,7 @@ Soutenez ce projet avec votre organisation. Votre logo apparaîtra ici avec un l ## 💭Inspiré par -Jetez un œil aux précédents projets qui ont inspiré la création de starship. 🙏 +Voyez ces travaux précédents qui ont contribué à inspirer la création de vaisseau. 🙏 - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Un invite de commandes ZSH pour les astronautes. diff --git a/docs/fr-FR/presets/README.md b/docs/fr-FR/presets/README.md index 1c85c010d..c926b285f 100644 --- a/docs/fr-FR/presets/README.md +++ b/docs/fr-FR/presets/README.md @@ -18,17 +18,15 @@ Cette configuration ne modifie rien sauf les symboles utilisés pour chaque modu [aws] symbol = " " -[battery] -full_symbol = "" -charging_symbol = "" -discharging_symbol = "" - [conda] symbol = " " [dart] symbol = " " +[directory] +read_only = " " + [docker] symbol = " " diff --git a/docs/it-IT/README.md b/docs/it-IT/README.md new file mode 100644 index 000000000..b22afa4ac --- /dev/null +++ b/docs/it-IT/README.md @@ -0,0 +1,112 @@ +--- +home: true +heroImage: /logo.svg +heroText: +tagline: Il prompt minimalista, super veloce e infinitamente personalizzabile per qualsiasi shell! +actionText: Inizia → +actionLink: ./guide/ +features: + - + title: Prima la compatibilità + details: Funziona sulle shell e sui sistemi operativi più comuni. Usalo ovunque! + - + title: Generato in Rust + details: Sfrutta la velocità e sicurezza migliori di Rust, per rendere il tuo prompt il più veloce e il più affidabile. + - + title: Personalizzabile + details: Ogni più piccolo dettaglio è personalizzabile a piacere, per rendere questo messaggio prompt minimalista o ricco delle funzionalità che desideri. +footer: Licenza ISC | Copyright © 2019-present Starship Collaboratori +#Used for the description meta tag, for SEO +metaTitle: "Starship: Cross-Shell Prompt" +description: Starship è il prompt minimalista, super veloce ed estremamente personalizzabile per qualsiasi shell! Mostra le informazioni di cui hai bisogno, rimanendo elegante e minimale. Installazione rapida disponibile per Bash, Fish, ZSH, Ion e PowerShell. +--- + +
+ +
+ +### Installazione Veloce + +1. Installa il binario **starship**: + + + #### Installa l'ultima Versione + + Con Shell: + + ```sh + curl -fsSL https://starship.rs/install.sh | bash + ``` + + + #### Installa con Package Manager + + With [Homebrew](https://brew.sh/): + + ```sh + brew install starship + ``` + + Con [Scoop](https://scoop.sh): + + ```powershell + scoop install starship + ``` + +1. Aggiungi lo script di inizializzazione al file di configurazione della shell: + + + #### Bash + + Aggiungi quanto segue alla fine di `~/.bashrc`: + + ```sh + # ~/.bashrc + + eval "$(starship init bash)" + ``` + + + #### Fish + + Aggiungi quanto segue alla fine di `~/.config/fish/config.fish`: + + ```sh + # ~/.config/fish/config.fish + + starship init fish | source + ``` + + + #### Zsh + + Aggiungi quanto segue alla fine di `~/.zshrc`: + + ```sh + # ~/.zshrc + + eval "$(starship init zsh)" + ``` + + + #### Powershell + + Aggiungi quanto segue alla fine di `Microsoft.PowerShell_profile.ps1`. Puoi controllare la posizione di questo file interrogando la variabile `$PROFILE` in PowerShell. In genere il percorso è `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` oppure `~/.config/powershell/Microsoft.PowerShell_profile.ps1` in -Nix. + + ```sh + Invoke-Expression (&starship init powershell) + ``` + + + #### Ion + + Aggiungi quanto segue alla fine di `~/.config/ion/initrc`: + + ```sh + # ~/.config/ion/initrc + + eval $(starship init ion) + ``` diff --git a/docs/it-IT/advanced-config/README.md b/docs/it-IT/advanced-config/README.md new file mode 100644 index 000000000..1c7da93b6 --- /dev/null +++ b/docs/it-IT/advanced-config/README.md @@ -0,0 +1,93 @@ +# Configurazione Avanzata + +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 + +Le configurazioni in questa sezione sono soggette a modifiche nelle future versioni di Starship. + +::: + +## Comandi personalizzati di pre-prompt e pre-esecuzione per Bash + +Bash non ha un framework preexec/precmd formale come la maggior parte delle altre shell. Per questo motivo, è difficile fornire hook completamente personalizzabile in `bash`. Tuttavia, Starship dà la limitata possibilità di inserire le tue funzioni nella procedura prompt-rendering: + +- Per eseguire una funzione personalizzata a destra del prompt prima che venga disegnato, definisci una nuova funzione e assegna il suo nome a `starship_precmd_user_func`. Per esempio, per visualizzare l'icona di un razzo prima del prompt, si può usare il codice seguente + +```bash +function blastoff(){ + echo "🚀" +} +starship_precmd_user_func="blastoff" +``` + +- 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(){ + echo "🚀" +} +trap blastoff DEBUG # Trap DEBUG *before* running starship +eval $(starship init bash) +``` + +## Cambia il Titolo della Finestra + +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): + +```bash +function set_win_title(){ + echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007" +} +``` + +Puoi usare delle variabili per personalizzare questo titolo (`$USER`, `$HOSTNAME`, e `$PWD` sono le scelte più popolari). + +In `bash`, impostare questa funzione per essere la precmd Starship function: + +```bash +starship_precmd_user_func="set_win_title" +``` + +In `zsh`, aggiungi questo `precmd_functions` all'array: + +```bash +precmd_functions+=(set_win_title) +``` + +Se ti piace il risultato, aggiungi queste righe al tuo file shell di configurazione (`~/. ashrc` 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`: + +```bash +function set_win_title(){ + echo -ne "\033]0; $(basename $PWD) \007" +} +starship_precmd_user_func="set_win_title" +``` + +## Stile delle Stringhe + +Le stringhe di stile sono un elenco di parole, separate da spazi bianchi. Le parole non sono sensibili alle maiuscole (cioè `grassetto` e `BoLd` sono considerate la stessa stringa). Ogni parola può essere una delle seguenti: + + - `bold` + - `underline` + - `dimmed` + - `bg:` + - `fg:` + - `` + - `none` + +dove `` è un colore specifico (discusso in seguito). `fg:` e `` attualmente fanno la stessa cosa , anche se questo potrebbe cambiare in futuro. 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` 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 `rosso`. Potrà diventare un errore usare `nessuno` in combinazione con altri token in futuro. + +Uno colore specifico può essere uno di questi: + + - Uno dei colori standard del terminale: `nero`, `rosso`, `verde`, `blu`, `giallo`, `viola`, `ciano`, `bianco`. Puoi eventualmente utilizzare il prefisso `bright-` per ottenere la versione luminosa (es. `bright-white`). + - Un `#` seguito da un valore esadecimale a sei cifre. Questo specifica un [colore esagesimale in RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp). + - Un numero compreso tra 0-255. Specifica un [codice colore ANSI a 8 bit](https://i.stack.imgur.com/KTSQa.png). + +Se sono specificati più colori per il primo piano/sfondo, l'ultimo nella stringa avrà la priorità. diff --git a/docs/it-IT/config/README.md b/docs/it-IT/config/README.md new file mode 100644 index 000000000..90628f674 --- /dev/null +++ b/docs/it-IT/config/README.md @@ -0,0 +1,2503 @@ +# Configuration + +To get started configuring starship, create the following 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: + +```toml +# Don't print a new line at the start of the prompt +add_newline = false + +# 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" + +# Disable the package module, hiding it from the prompt completely +[package] +disabled = true +``` + +You can change default `starship.toml` file location with `STARSHIP_CONFIG` environment variable: + +```sh +export STARSHIP_CONFIG=~/.starship +``` + +Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: + +```ps1 +$ENV:STARSHIP_CONFIG = "$HOME\.starship" +``` + +### 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: + +```sh +export STARSHIP_CACHE=~/.starship/cache +``` + +Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: + +```ps1 +$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" +``` + +### Terminology + +**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of NodeJS that is currently installed on your computer, if your current directory is a NodeJS project. + +**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 NodeJS. + +By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. + +### Format Strings + +Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. + +#### Variable + +A variable contains a `$` symbol followed by the name of the variable. The name of a variable only contains letters, numbers and `_`. + +For example: + +- `$version` is a format string with a variable named `version`. +- `$git_branch$git_commit` is a format string with two variables named `git_branch` and `git_commit`. +- `$git_branch $git_commit` has the two variables separated with a space. + +#### Text Group + +A text group is made up of two different parts. + +The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it. + +In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used style the first part. + +For example: + +- `[on](red bold)` will print a string `on` with bold text colored red. +- `[⬢ $version](bold green)` will print a symbol `⬢` followed by the content of variable `version`, with bold text colored green. +- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green. + +#### Stile delle Stringhe + +Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). + +- `"fg:green bg:blue"` sets green text on a blue background +- `"bg:blue fg:bright-green"` sets bright green text on a blue background +- `"bold fg:27"` sets bold text with [ANSI color](https://i.stack.imgur.com/KTSQa.png) 27 +- `"underline bg:#bf5700"` sets underlined text on a burnt orange background +- `"bold italic fg:purple"` sets bold italic purple text +- `""` explicitly disables all styling + +Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics. + +#### Conditional Format Strings + +A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. + +For example: + +- `(@$region)` will show nothing if the variable `region` is `None`, otherwise `@` followed by the value of region. +- `(some text)` will always show nothing since there are no variables wrapped in the braces. +- When `$all` is a shortcut for `\[$a$b\]`, `($all)` will show nothing only if `$a` and `$b` are both `None`. This works the same as `(\[$a$b\] )`. + +#### Escapable characters + +The following symbols have special usage in a format string. If you want to print the following symbols, you have to escape them with a backslash (`\`). + +- \$ +- \\ +- [ +- ] +- ( +- ) + +Note that `toml` has [its own escape syntax](https://github.com/toml-lang/toml#user-content-string). It is recommended to use a literal string (`''`) in your config. If you want to use a basic string (`""`), pay attention to escape the backslash `\`. + +For example, when you want to print a `$` symbol on a new line, the following configs for `format` are equivalent: + +```toml +# with basic string +format = "\n\\$" + +# with multiline basic string +format = """ + +\\$""" + +# with literal string +format = ''' + +\$''' +``` + +## Prompt + +This is the list of prompt-wide configuration options. + +### Options + +| Option | Default | Description | +| -------------- | ------------------------------ | ----------------------------------------------------- | +| `format` | [link](#default-prompt-format) | Configure the format of the prompt. | +| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | +| `add_newline` | `true` | Add a new line before the start of the prompt. | + +### Example + +```toml +# ~/.config/starship.toml + +# Use custom format +format = """ +[┌───────────────────>](bold green) +[│](bold green)$directory$rust$package +[└─>](bold green) """ + +# Wait 10 milliseconds for starship to check files under the current directory. +scan_timeout = 10 + +# Disable the newline at the start of the prompt +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. The default is as shown: + +```toml +format = "$all" + +# Which is equivalent to +format = """ +$username\ +$hostname\ +$shlvl\ +$kubernetes\ +$directory\ +$git_branch\ +$git_commit\ +$git_state\ +$git_status\ +$hg_branch\ +$docker_context\ +$package\ +$cmake\ +$dart\ +$dotnet\ +$elixir\ +$elm\ +$erlang\ +$golang\ +$helm\ +$java\ +$julia\ +$kotlin\ +$nim\ +$nodejs\ +$ocaml\ +$perl\ +$php\ +$purescript\ +$python\ +$ruby\ +$rust\ +$swift\ +$terraform\ +$zig\ +$nix_shell\ +$conda\ +$memory_usage\ +$aws\ +$gcloud\ +$openstack\ +$env_var\ +$crystal\ +$custom\ +$cmd_duration\ +$line_break\ +$lua\ +$jobs\ +$battery\ +$time\ +$status\ +$character""" +``` + +## AWS + +The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. + +When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var. + +### Options + +| Option | Default | Description | +| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | +| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | +| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `AWS` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------------- | ------------------------------------ | +| region | `ap-northeast-1` | The current AWS region | +| profile | `astronauts` | The current AWS profile | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Examples + +#### Display everything + +```toml +# ~/.config/starship.toml + +[aws] +format = 'on [$symbol$profile(\($region\))]($style) ' +style = "bold blue" +symbol = "🅰 " +[aws.region_aliases] +ap-southeast-2 = "au" +us-east-1 = "va" +``` + +#### Display region + +```toml +# ~/.config/starship.toml + +[aws] +format = "on [$symbol$region]($style) " +style = "bold blue" +symbol = "🅰 " +[aws.region_aliases] +ap-southeast-2 = "au" +us-east-1 = "va" +``` + +#### Display profile + +```toml +# ~/.config/starship.toml + +[aws] +format = "on [$symbol$profile]($style) " +style = "bold blue" +symbol = "🅰 " +``` + +## Battery + +The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. + +### Options + +| Option | Default | Description | +| -------------------- | --------------------------------- | --------------------------------------------------- | +| `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. | +| `display` | [link](#battery-display) | Display threshold and style for the module. | +| `disabled` | `false` | Disables the `battery` module. | + + +### Example + +```toml +# ~/.config/starship.toml + +[battery] +full_symbol = "🔋" +charging_symbol = "⚡️" +discharging_symbol = "💀" +``` + +### Battery Display + +The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. The default is as shown: + +```toml +[[battery.display]] +threshold = 10 +style = "bold red" +``` + +#### Options + +The `display` option is an array of the following table. + +| Option | Description | +| ----------- | ----------------------------------------------- | +| `threshold` | The upper bound for the display option. | +| `style` | The style used if the display option is in use. | + +#### Example + +```toml +[[battery.display]] # "bold red" style when capacity is between 0% and 10% +threshold = 10 +style = "bold red" + +[[battery.display]] # "bold yellow" style when capacity is between 10% and 30% +threshold = 30 +style = "bold yellow" + +# when capacity is over 30%, the battery indicator will not be displayed + +``` + +## Character + +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. + +The character will tell you whether the last command was successful or not. It can do this in two ways: + +- changing color (`red`/`green`) +- changing shape (`❯`/`✖`) + +By default it only changes color. If you also want to change it's shape take a look at [this example](#with-custom-error-shape). + +### Options + +| Option | Default | Description | +| ---------------- | ------------------- | -------------------------------------------------------------------------------- | +| `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. | +| `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. | +| `vicmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | +| `disabled` | `false` | Disables the `character` module. | + +### Variables + +| Variable | Example | Description | +| -------- | ------- | --------------------------------------------------------------------- | +| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` | + +### Examples + +#### With custom error shape + +```toml +# ~/.config/starship.toml + +[character] +success_symbol = "[➜](bold green) " +error_symbol = "[✗](bold red) " +``` + +#### Without custom error shape + +```toml +# ~/.config/starship.toml + +[character] +success_symbol = "[➜](bold green) " +error_symbol = "[➜](bold red) " +``` + +#### With custom vim shape + +```toml +# ~/.config/starship.toml + +[character] +vicmd_symbol = "[V](bold green) " +``` + +## CMake + +The `cmake` module shows the currently installed version of CMake if any of the following conditions are met: + +- The current directory contains a `CMakeLists.txt` file +- The current directory contains a `CMakeCache.txt` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | -------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `cmake` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v3.17.3` | The version of cmake | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +## Command Duration + +The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. + +::: warning Do not hook the DEBUG trap in Bash + +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. + +::: + +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. + +### Options + +| Option | Default | Description | +| -------------------- | ----------------------------- | ---------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `show_notifications` | `false` | Show desktop notifications when command completes. | +| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | + +::: tip + +Showing desktop notifications requires starship to be built with `rust-notify` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. + +::: + +### Variables + +| Variable | Example | Description | +| --------- | -------- | --------------------------------------- | +| duration | `16m40s` | The time it took to execute the command | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[cmd_duration] +min_time = 500 +format = "underwent [$duration](bold yellow)" +``` + +## Conda + +The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set. + +::: tip + +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. + +::: + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. | +| `symbol` | `"🅒 "` | The symbol used before the environment name. | +| `style` | `"bold green"` | The style for the module. | +| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `disabled` | `false` | Disables the `conda` module. | + +### Variables + +| Variable | Example | Description | +| ----------- | ------------ | ------------------------------------ | +| environment | `astronauts` | The current conda environment | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[conda] +format = "[$symbol$environment](dimmed green) " +``` + +## Crystal + +The `crystal` module shows the currently installed version of Crystal. The module will be shown if any of the following conditions are met: + +- The current directory contains a `shard.yml` file +- The current directory contains a `.cr` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | The style for the module. | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `disabled` | `false` | Disables the `crystal` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.32.1` | The version of `crystal` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[crystal] +format = "via [✨ $version](bold blue) " +``` + +## Dart + +The `dart` module shows the currently installed version of Dart. The module will be shown if any of the following conditions are met: + +- The current directory contains a file with `.dart` extension +- The current directory contains a `.dart_tool` directory +- The current directory contains a `pubspec.yaml` or `pubspec.lock` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dart` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v2.8.4` | The version of `dart` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[dart] +format = "via [🔰 $version](bold red) " +``` + +## Directory + +The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. + +When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option. + +For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | +| `style` | `"bold cyan"` | The style for the module. | +| `disabled` | `false` | Disables the `directory` module. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | + +
+This module has a few advanced configuration options that control how the directory is displayed. + +| Advanced Option | Default | Description | +| --------------------------- | ------- | ---------------------------------------------------------------------------------------- | +| `substitutions` | | A table of substitutions to be made to the path. | +| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. | +| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. | + +`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD. + +```toml +[directory.substitutions] +"/Volumes/network/path" = "/net" +"src/com/long/java/path" = "mypath" +``` + +`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`. + +
+ +### Variables + +| Variable | Example | Description | +| --------- | --------------------- | ----------------------------------- | +| path | `"D:/Projects"` | The current directory path | +| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[directory] +truncation_length = 8 +truncation_symbol = "…/" +``` + +## Docker Context + +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default`. + +### Options + +| Option | Default | Description | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | The format for the module. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | The style for the module. | +| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | +| `disabled` | `true` | Disables the `docker_context` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------------- | ------------------------------------ | +| context | `test_context` | The current docker context | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[docker_context] +format = "via [🐋 $context](blue bold)" +``` + +## Dotnet + +The `dotnet` module shows the relevant version of the .NET Core SDK for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK. + +This module will only be shown in your prompt when one or more of the following files are present in the current directory: + +- `global.json` +- `project.json` +- `Directory.Build.props` +- `Directory.Build.targets` +- `Packages.props` +- `*.sln` +- `*.csproj` +- `*.fsproj` +- `*.xproj` + +You'll also need the .NET Core SDK installed in order to use it correctly. + +Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options. + +The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. + +### Options + +| Option | Default | Description | +| ----------- | --------------------------------------- | -------------------------------------------------------- | +| `format` | `"[$symbol$version( 🎯 $tfm)]($style) "` | The format for the module. | +| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. | +| `heuristic` | `true` | Use faster version detection to keep starship snappy. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dotnet` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------------- | ------------------------------------------------------------------ | +| version | `v3.1.201` | The version of `dotnet` sdk | +| tfm | `netstandard2.0` | The Target Framework Moniker that the current project is targeting | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[dotnet] +symbol = "🥅 " +style = "green" +heuristic = false +``` + +## Elixir + +The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. The module will be shown if any of the following conditions are met: + +- The current directory contains a `mix.exs` file. + +### Options + +| Option | Default | Description | +| ---------- | --------------------------------------------------------- | --------------------------------------------------------------- | +| `symbol` | `"💧 "` | The symbol used before displaying the version of Elixir/Erlang. | +| `style` | `"bold purple"` | The style for the module. | +| `format` | `'via [$symbol$version \(OTP $otp_version\)]($style) '` | The format for the module elixir. | +| `disabled` | `false` | Disables the `elixir` module. | + +### Variables + +| Variable | Example | Description | +| ----------- | ------- | ------------------------------------ | +| version | `v1.10` | The version of `elixir` | +| otp_version | | The otp version of `elixir` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[elixir] +symbol = "🔮 " +``` + +## Elm + +The `elm` module shows the currently installed version of Elm. The module will be shown if any of the following conditions are met: + +- The current directory contains a `elm.json` file +- The current directory contains a `elm-package.json` file +- The current directory contains a `.elm-version` file +- The current directory contains a `elm-stuff` folder +- The current directory contains a `*.elm` files + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🌳 "` | A format string representing the symbol of Elm. | +| `style` | `"cyan bold"` | The style for the module. | +| `disabled` | `false` | Disables the `elm` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.19.1` | The version of `elm` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[elm] +format = "via [ $version](cyan bold) " +``` + +## Environment Variable + +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: + +- The `variable` configuration option matches an existing environment variable +- The `variable` configuration option is not defined, but the `default` configuration option is + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------ | ---------------------------------------------------------------------------- | +| `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. | +| `disabled` | `false` | Disables the `env_var` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------------------------------------- | ------------------------------------------ | +| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | `black bold dimmed` | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[env_var] +variable = "SHELL" +default = "unknown shell" +``` + +## Erlang + +The `erlang` module shows the currently installed version of Erlang/OTP. The module will be shown if any of the following conditions are met: + +- The current directory contains a `rebar.config` file. +- The current directory contains a `erlang.mk` file. + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | -------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before displaying the version of erlang. | +| `style` | `"bold red"` | The style for the module. | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `disabled` | `false` | Disables the `erlang` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v22.1.3` | The version of `erlang` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[erlang] +format = "via [e $version](bold red) " +``` + +## Gcloud + +The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. + +### Options + +| Option | Default | Description | +| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | +| `format` | `'on [$symbol$account(\($region\))]($style) '` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. | +| `region_aliases` | | Table of region aliases to display in addition to the GCP name. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `gcloud` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ----------------- | ------------------------------------------------------------------ | +| region | `us-central1` | The current GCP region | +| account | `foo@example.com` | The current GCP profile | +| project | | The current GCP project | +| active | `default` | The active config name written in `~/.config/gcloud/active_config` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Examples + +#### Display account and project + +```toml +# ~/.config/starship.toml + +[gcloud] +format = 'on [$symbol$account(\($project\))]($style) ' +``` + +#### Display active config name only + +```toml +# ~/.config/starship.toml + +[gcloud] +format = "[$symbol$active]($style) " +style = "bold yellow" +``` + +#### Display account and aliased region + +```toml +# ~/.config/starship.toml + +[gcloud] +symbol = "️🇬️ " +[gcloud.region_aliases] +us-central1 = "uc1" +asia-northeast1 = "an1" +``` + +## Git Branch + +The `git_branch` module shows the active branch of the repo in your current directory. + +### Options + +| Option | Default | Description | +| -------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- | +| `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. | +| `symbol` | `" "` | A format string representing the symbol of git branch. | +| `style` | `"bold purple"` | The style for the module. | +| `truncation_length` | `2^63 - 1` | Truncates a git branch to X graphemes. | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use `""` for no symbol. | +| `only_attached` | `false` | Only show the branch name when not in a detached HEAD state. | +| `disabled` | `false` | Disables the `git_branch` module. | + +### Variables + +| Variable | Example | Description | +| ------------- | -------- | ---------------------------------------------------------------------------------------------------- | +| branch | `master` | The current branch name, falls back to `HEAD` if there's no current branch (e.g. git detached HEAD). | +| remote_name | `origin` | The remote name. | +| remote_branch | `master` | The name of the branch tracked on `remote_name`. | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_branch] +symbol = "🌱 " +truncation_length = 4 +truncation_symbol = "" +``` + +## Git Commit + +The `git_commit` module shows the current commit hash and also the tag (if any) of the repo in your current directory. + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------ | ----------------------------------------------------- | +| `commit_hash_length` | `7` | The length of the displayed git commit hash. | +| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | The format for the module. | +| `style` | `"bold green"` | The style for the module. | +| `only_detached` | `true` | Only show git commit hash when in detached HEAD state | +| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. | +| `tag_symbol` | `"🏷 "` | Tag symbol prefixing the info shown | +| `disabled` | `false` | Disables the `git_commit` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ----------------------------------- | +| hash | `b703eb3` | The current git commit hash | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_commit] +commit_hash_length = 4 +tag_symbol = "🔖 " +``` + +## Git State + +The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too. + +### Options + +| Option | Default | Description | +| -------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `rebase` | `"REBASING"` | A format string displayed when a `rebase` is in progress. | +| `merge` | `"MERGING"` | A format string displayed when a `merge` is in progress. | +| `revert` | `"REVERTING"` | A format string displayed when a `revert` is in progress. | +| `cherry_pick` | `"CHERRY-PICKING"` | A format string displayed when a `cherry-pick` is in progress. | +| `bisect` | `"BISECTING"` | A format string displayed when a `bisect` is in progress. | +| `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"` | The style for the module. | +| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | The format for the module. | +| `disabled` | `false` | Disables the `git_state` module. | + +### Variables + +| Variable | Example | Description | +| ---------------- | ---------- | ----------------------------------- | +| state | `REBASING` | The current state of the repo | +| progress_current | `1` | The current operation progress | +| progress_total | `2` | The total operation progress | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_state] +format = '[\($state( $progress_current of $progress_total)\)]($style) ' +cherry_pick = "[🍒 PICKING](bold red)" +``` + +## Git Status + +The `git_status` module shows symbols representing the state of the repo in your current directory. + +### Options + +| Option | Default | Description | +| ------------ | ----------------------------------------------- | ----------------------------------- | +| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` | +| `conflicted` | `"="` | This branch has merge conflicts. | +| `ahead` | `"⇡"` | The format of `ahead` | +| `behind` | `"⇣"` | The format of `behind` | +| `diverged` | `"⇕"` | The format of `diverged` | +| `untracked` | `"?"` | The format of `untracked` | +| `stashed` | `"$"` | The format of `stashed` | +| `modified` | `"!"` | The format of `modified` | +| `staged` | `"+"` | The format of `staged` | +| `renamed` | `"»"` | The format of `renamed` | +| `deleted` | `"✘"` | The format of `deleted` | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `git_status` module. | + +### Variables + +The following variables can be used in `format`: + +| Variable | Description | +| -------------- | --------------------------------------------------------------------------------------------- | +| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` | +| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo | +| `conflicted` | Displays `conflicted` when this branch has merge conflicts. | +| `untracked` | Displays `untracked` when there are untracked files in the working directory. | +| `stashed` | Displays `stashed` when a stash exists for the local repository. | +| `modified` | Displays `modified` when there are file modifications in the working directory. | +| `staged` | Displays `staged` when a new file has been added to the staging area. | +| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | +| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| style\* | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +The following variables can be used in `diverged`: + +| Variable | Description | +| -------------- | ---------------------------------------------- | +| `ahead_count` | Number of commits ahead of the tracking branch | +| `behind_count` | Number of commits behind the tracking branch | + +The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`: + +| Variable | Description | +| -------- | ------------------------ | +| `count` | Show the number of files | + +### Example + +```toml +# ~/.config/starship.toml + +[git_status] +conflicted = "🏳" +ahead = "🏎💨" +behind = "😰" +diverged = "😵" +untracked = "🤷‍" +stashed = "📦" +modified = "📝" +staged = '[++\($count\)](green)' +renamed = "👅" +deleted = "🗑" +``` + +Show ahead/behind count of the branch being tracked + +```toml +# ~/.config/starship.toml + +[git_status] +ahead = "⇡${count}" +diverged = "⇕⇡${ahead_count}⇣${behind_count}" +behind = "⇣${count}" +``` + +## Golang + +The `golang` module shows the currently installed version of Golang. The module will be shown if any of the following conditions are met: + +- The current directory contains a `go.mod` file +- The current directory contains a `go.sum` file +- The current directory contains a `glide.yaml` file +- The current directory contains a `Gopkg.yml` file +- The current directory contains a `Gopkg.lock` file +- The current directory contains a `.go-version` file +- The current directory contains a `Godeps` directory +- The current directory contains a file with the `.go` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ---------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🐹 "` | A format string representing the symbol of Go. | +| `style` | `"bold cyan"` | The style for the module. | +| `disabled` | `false` | Disables the `golang` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v1.12.1` | The version of `go` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[golang] +format = "via [🏎💨 $version](bold cyan) " +``` + +## Helm + +The `helm` module shows the currently installed version of Helm. The module will be shown if any of the following conditions are met: + +- The current directory contains a `helmfile.yaml` file +- The current directory contains a `Chart.yaml` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"⎈ "` | A format string representing the symbol of Helm. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `helm` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v3.1.1` | The version of `helm` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[helm] +format = "via [⎈ $version](bold white) " +``` + +## Hostname + +The `hostname` module shows the system hostname. + +### Options + +| Option | Default | Description | +| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `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. | +| `style` | `"bold dimmed green"` | The style for the module. | +| `disabled` | `false` | Disables the `hostname` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +format = "on [$hostname](bold red) " +trim_at = ".companyname.com" +disabled = false +``` + +## Java + +The `java` module shows the currently installed version of Java. The module will be shown if any of the following conditions are met: + +- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file +- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension + +### Options + +| Option | Default | Description | +| ---------- | -------------------------------------- | ----------------------------------------------- | +| `format` | `"via [${symbol}${version}]($style) "` | The format for the module. | +| `symbol` | `"☕ "` | A format string representing the symbol of Java | +| `style` | `"red dimmed"` | The style for the module. | +| `disabled` | `false` | Disables the `java` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| version | `v14` | The version of `java` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[java] +symbol = "🌟 " +``` + +## Jobs + +The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. + +### Options + +| Option | Default | Description | +| ----------- | ----------------------------- | ------------------------------------------------ | +| `threshold` | `1` | Show number of jobs if exceeded. | +| `format` | `"[$symbol$number]($style) "` | The format for the module. | +| `symbol` | `"✦"` | A format string representing the number of jobs. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `jobs` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| number | `1` | The number of jobs | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[jobs] +symbol = "+ " +threshold = 4 +``` + +## Julia + +The `julia` module shows the currently installed version of Julia. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Project.toml` file +- The current directory contains a `Manifest.toml` file +- The current directory contains a file with the `.jl` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"ஃ "` | A format string representing the symbol of Julia. | +| `style` | `"bold purple"` | The style for the module. | +| `disabled` | `false` | Disables the `julia` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.4.0` | The version of `julia` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[julia] +symbol = "∴ " +``` + +## Kotlin + +The `kotlin` module shows the currently installed version of Kotlin. The module will be shown if any of the following conditions are met: + +- The current directory contains a `.kt` or a `.kts` file + +### Options + +| Option | Default | Description | +| --------------- | ---------------------------------- | ----------------------------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🅺 "` | A format string representing the symbol of Kotlin. | +| `style` | `"bold blue"` | The style for the module. | +| `kotlin_binary` | `"kotlin"` | Configures the kotlin binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `kotlin` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v1.4.21` | The version of `kotlin` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[kotlin] +symbol = "🅺 " +``` + +```toml +# ~/.config/starship.toml + +[kotlin] +# Uses the Kotlin Compiler binary to get the installed version +kotlin_binary = "kotlinc" +``` + +## Kubernetes + +Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | +| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. | +| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. | +| `style` | `"cyan bold"` | The style for the module. | +| `context_aliases` | | Table of context aliases to display. | +| `disabled` | `true` | Disables the `kubernetes` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------------------- | ---------------------------------------- | +| context | `starship-cluster` | The current kubernetes context | +| namespace | `starship-namespace` | If set, the current kubernetes namespace | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[kubernetes] +format = 'on [⛵ $context \($namespace\)](dimmed green) ' +disabled = false +[kubernetes.context_aliases] +"dev.local.cluster.k8s" = "dev" +``` + +## Line Break + +The `line_break` module separates the prompt into two lines. + +### Options + +| Option | Default | Description | +| ---------- | ------- | ------------------------------------------------------------------ | +| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | + +### Example + +```toml +# ~/.config/starship.toml + +[line_break] +disabled = true +``` + +## Lua + +The `lua` module shows the currently installed version of Lua. The module will be shown if any of the following conditions are met: + +- The current directory contains a `.lua-version` file +- The current directory contains a `lua` directory +- The current directory contains a file with the `.lua` extension + +### Options + +| Option | Default | Description | +| ------------ | ---------------------------------- | -------------------------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | +| `style` | `"bold blue"` | The style for the module. | +| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `lua` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v5.4.0` | The version of `lua` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[lua] +format = "via [🌕 $version](bold blue) " +``` + +## Memory Usage + +The `memory_usage` module shows current system memory and swap usage. + +By default the swap usage is displayed if the total system swap is non-zero. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------- | --------------------------------------------- | -------------------------------------------------------- | +| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | +| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | The format for the module. | +| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | +| `style` | `"bold dimmed white"` | The style for the module. | +| `disabled` | `true` | Disables the `memory_usage` module. | + +### Variables + +| Variable | Example | Description | +| ---------------- | ------------- | ------------------------------------------------------------------ | +| ram | `31GiB/65GiB` | The usage/total RAM of the current system memory. | +| ram_pct | `48%` | The percentage of the current system memory. | +| swap\*\* | `1GiB/4GiB` | The swap memory size of the current system swap memory file. | +| swap_pct\*\* | `77%` | The swap memory percentage of the current system swap memory file. | +| symbol | `🐏` | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string \*\*: The SWAP file information is only displayed if detected on the current system + +### Example + +```toml +# ~/.config/starship.toml + +[memory_usage] +disabled = false +threshold = -1 +symbol = " " +style = "bold dimmed green" +``` + +## Mercurial Branch + +The `hg_branch` module shows the active branch of the repo in your current directory. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `style` | `"bold purple"` | The style for the module. | +| `format` | `"on [$symbol$branch]($style) "` | The format for the module. | +| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `disabled` | `true` | Disables the `hg_branch` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| branch | `master` | The active mercurial branch | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[hg_branch] +format = "on [🌱 $branch](bold purple)" +truncation_length = 4 +truncation_symbol = "" +``` + +## Nim + +The `nim` module shows the currently installed version of Nim. The module will be shown if any of the following conditions are met: + +- The current directory contains a `nim.cfg` file +- The current directory contains a file with the `.nim` extension +- The current directory contains a file with the `.nims` extension +- The current directory contains a file with the `.nimble` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module | +| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `nim` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.2.0` | The version of `nimc` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nim] +style = "yellow" +symbol = "🎣 " +``` + +## Nix-shell + +The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment. + +### Options + +| Option | Default | Description | +| ------------ | ---------------------------------------------- | ----------------------------------------------------- | +| `format` | `'via [$symbol$state( \($name\))]($style) '` | The format for the module. | +| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | +| `style` | `"bold blue"` | The style for the module. | +| `impure_msg` | `"impure"` | A format string shown when the shell is impure. | +| `pure_msg` | `"pure"` | A format string shown when the shell is pure. | +| `disabled` | `false` | Disables the `nix_shell` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| state | `pure` | The state of the nix-shell | +| name | `lorri` | The name of the nix-shell | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nix_shell] +disabled = true +impure_msg = "[impure shell](bold red)" +pure_msg = "[pure shell](bold green)" +format = 'via [☃️ $state( \($name\))](bold blue) ' +``` + +## NodeJS + +The `nodejs` module shows the currently installed version of NodeJS. The module will be shown if any of the following conditions are met: + +- The current directory contains a `package.json` file +- The current directory contains a `.node-version` file +- The current directory contains a `node_modules` directory +- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension +- The current directory contains a file with the `.ts` extension + +### Options + +| Option | Default | Description | +| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. | +| `style` | `"bold green"` | The style for the module. | +| `disabled` | `false` | Disables the `nodejs` module. | +| `not_capable_style` | `bold red` | The style for the module when an engines property in Packages.json does not match the NodeJS version. | + +###  Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v13.12.0` | The version of `node` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nodejs] +format = "via [🤖 $version](bold green) " +``` + +## OCaml + +The `ocaml` module shows the currently installed version of OCaml. The module will be shown if any of the following conditions are met: + +- The current directory contains a file with `.opam` extension or `_opam` directory +- The current directory contains a `esy.lock` directory +- The current directory contains a `dune` or `dune-project` file +- The current directory contains a `jbuild` or `jbuild-ignore` file +- The current directory contains a `.merlin` file +- The current directory contains a file with `.ml`, `.mli`, `.re` or `.rei` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format string for the module. | +| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `ocaml` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v4.10.0` | The version of `ocaml` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[ocaml] +format = "via [🐪 $version]($style) " +``` + +## OpenStack + +The `openstack` module shows the current OpenStack cloud and project. The module only active when the `OS_CLOUD` env var is set, in which case it will read `clouds.yaml` file from any of the [default locations](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files). to fetch the current project in use. + +### Options + +| Option | Default | Description | +| ---------- | --------------------------------------------------- | -------------------------------------------------------------- | +| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `OpenStack` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| cloud | `corp` | The current OpenStack cloud | +| project | `dev` | The current OpenStack project | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[openstack] +format = "on [$symbol$cloud(\\($project\\))]($style) " +style = "bold yellow" +symbol = "☁️ " +``` + +## Package Version + +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages. + +- **npm** – The `npm` package version is extracted from the `package.json` present in the current directory +- **cargo** – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory +- **poetry** – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory +- **composer** – The `composer` package version is extracted from the `composer.json` present in the current directory +- **gradle** – The `gradle` package version is extracted from the `build.gradle` present +- **julia** - The package version is extracted from the `Project.toml` present +- **mix** - The `mix` package version is extracted from the `mix.exs` present +- **helm** - The `helm` chart version is extracted from the `Chart.yaml` present +- **maven** - The `maven` package version is extracted from the `pom.xml` present +- **meson** - The `meson` package version is extracted from the `meson.build` present + +> ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. + +### Options + +| Option | Default | Description | +| ----------------- | ---------------------------------- | ---------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | +| `style` | `"bold 208"` | The style for the module. | +| `display_private` | `false` | Enable displaying version for packages marked as private. | +| `disabled` | `false` | Disables the `package` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.0.0` | The version of your package | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[package] +format = "via [🎁 $version](208 bold) " +``` + +## Perl + +The `perl` module shows the currently installed version of Perl. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Makefile.PL` or `Build.PL` file +- The current directory contains a `cpanfile` or `cpanfile.snapshot` file +- The current directory contains a `META.json` file or `META.yml` file +- The current directory contains a `.perl-version` file +- The current directory contains a `.pl`, `.pm` or `.pod` + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format string for the module. | +| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | +| `style` | `"bold 149"` | The style for the module. | +| `disabled` | `false` | Disables the `perl` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v5.26.1` | The version of `perl` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +### Example + +```toml +# ~/.config/starship.toml + +[perl] +format = "via [🦪 $version]($style) " +``` + +## PHP + +The `php` module shows the currently installed version of PHP. The module will be shown if any of the following conditions are met: + +- The current directory contains a `composer.json` file +- The current directory contains a `.php-version` file +- The current directory contains a `.php` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | +| `style` | `"147 bold"` | The style for the module. | +| `disabled` | `false` | Disables the `php` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v7.3.8` | The version of `php` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[php] +format = "via [🔹 $version](147 bold) " +``` + +## PureScript + +The `purescript` module shows the currently installed version of PureScript version. The module will be shown if any of the following conditions are met: + +- The current directory contains a `spago.dhall` file +- The current directory contains a \*.purs files + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `purescript` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `0.13.5` | The version of `purescript` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[purescript] +format = "via [$symbol$version](bold white)" +``` + +## Python + +The `python` module shows the currently installed version of Python and the current Python virtual environment if one is activated. + +If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`. + +The module will be shown if any of the following conditions are met: + +- The current directory contains a `.python-version` file +- The current directory contains a `requirements.txt` file +- The current directory contains a `pyproject.toml` file +- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true) +- The current directory contains a `Pipfile` file +- The current directory contains a `tox.ini` file +- The current directory contains a `setup.py` file +- The current directory contains a `__init__.py` file +- A virtual environment is currently activated + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | The style for the module. | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | + +::: tip + +The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used. + +The default values and order for `python_binary` was chosen to first identify the Python version in a virtualenv/conda environments (which currently still add a `python`, no matter if it points to `python3` or `python2`). This has the side effect that if you still have a system Python 2 installed, it may be picked up before any Python 3 (at least on Linux Distros that always symlink `/usr/bin/python` to Python 2). If you do not work with Python 2 anymore but cannot remove the system Python 2, changing this to `"python3"` will hide any Python version 2, see example below. + +::: + +### Variables + +| Variable | Example | Description | +| ------------ | --------------- | ------------------------------------------ | +| version | `"v3.8.1"` | The version of `python` | +| symbol | `"🐍 "` | Mirrors the value of option `symbol` | +| style | `"yellow bold"` | Mirrors the value of option `style` | +| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | +| virtualenv | `"venv"` | The current `virtualenv` name | + + +### Example + +```toml +# ~/.config/starship.toml + +[python] +symbol = "👾 " +pyenv_version_name = true +``` + +```toml +# ~/.config/starship.toml + +[python] +# Only use the `python3` binary to get the version. +python_binary = "python3" +``` + +## Ruby + +The `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Gemfile` file +- The current directory contains a `.ruby-version` file +- The current directory contains a `.rb` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `ruby` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v2.5.1` | The version of `ruby` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[ruby] +symbol = "🔺 " +``` + +## Rust + +The `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Cargo.toml` file +- The current directory contains a file with the `.rs` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `rust` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ----------------- | ------------------------------------ | +| version | `v1.43.0-nightly` | The version of `rustc` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[rust] +format = "via [⚙️ $version](red bold)" +``` + +## SHLVL + +The `shlvl` module shows the current SHLVL ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. + +### Options + +| Option | Default | Description | +| ----------- | ---------------------------- | ----------------------------------------------------------- | +| `threshold` | `2` | Display threshold. | +| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. | +| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | +| `repeat` | `false` | Causes `symbol` to be repeated by the current SHLVL amount. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `true` | Disables the `shlvl` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| shlvl | `3` | The current value of SHLVL | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[shlvl] +disabled = false +format = "$shlvl level(s) down" +threshold = 3 +``` + +## Singolarità + +The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set. + +### Options + +| Option | Default | Description | +| ---------- | -------------------------------- | ------------------------------------------------ | +| `format` | `'[$symbol\[$env\]]($style) '` | The format for the module. | +| `symbol` | `""` | A format string displayed before the image name. | +| `style` | `"bold dimmed blue"` | The style for the module. | +| `disabled` | `false` | Disables the `singularity` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------ | ------------------------------------ | +| env | `centos.img` | The current singularity image | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[singularity] +format = '[📦 \[$env\]]($style) ' +``` + +## Status + +The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: + +### Options + +| Option | Default | Description | +| ----------------------- | -------------------------- | ---------------------------------------------------- | +| `format` | `[$symbol$status]($style)` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | +| `style` | `"bold red"` | The style for the module. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | + +### Variables + +| Variable | Example | Description | +| -------------- | ------- | -------------------------------------------------------------------- | +| status | `127` | The exit code of the last command | +| int | `127` | The exit code of the last command | +| common_meaning | `ERROR` | Meaning of the code if not a signal | +| signal_number | `9` | Signal number corresponding to the exit code, only if signalled | +| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled | +| maybe_int | `7` | Contains the exit code number when no meaning has been found | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml + +# ~/.config/starship.toml + +[status] +style = "bg:blue" +symbol = "🔴" +format = '[\[$symbol $status_common_meaning$status_signal_name$status_maybe_int\]]($style) ' +map_symbol = true +disabled = false + +``` + +## Swift + +The `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Package.swift` file +- The current directory contains a file with the `.swift` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | The style for the module. | +| `disabled` | `false` | Disables the `swift` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v5.2.4` | The version of `swift` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[swift] +format = "via [🏎 $version](red bold)" +``` + +## Terraform + +The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). The module will be shown if any of the following conditions are met: + +- The current directory contains a `.terraform` folder +- Current directory contains a file with the `.tf` or `.hcl` extensions + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | +| `symbol` | `"💠 "` | A format string shown before the terraform workspace. | +| `style` | `"bold 105"` | The style for the module. | +| `disabled` | `false` | Disables the `terraform` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `terraform` | +| workspace | `default` | The current terraform workspace | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +#### With Version + +```toml +# ~/.config/starship.toml + +[terraform] +format = "[🏎💨 $version$workspace]($style) " +``` + +#### Without version + +```toml +# ~/.config/starship.toml + +[terraform] +format = "[🏎💨 $workspace]($style) " +``` + +## Time + +The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `format` | `"at [$time]($style) "` | The format string for the module. | +| `use_12hr` | `false` | Enables 12 hour formatting | +| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. | +| `style` | `"bold yellow"` | The style for the module time | +| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. | +| `disabled` | `true` | Disables the `time` module. | +| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | + +If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ----------------------------------- | +| time | `13:08:10` | The current time. | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[time] +disabled = false +format = '🕙[\[ $time \]]($style) ' +time_format = "%T" +utc_time_offset = "-5" +time_range = "10:00:00-14:00:00" +``` + +## Username + +The `username` module shows active user's username. The module will be shown if any of the following conditions are met: + +- The current user is root +- The current user isn't the same as the one that is logged in +- The user is currently connected as an SSH session +- The variable `show_always` is set to true + +::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. ::: + +### Options + +| Option | Default | Description | +| ------------- | ----------------------- | ------------------------------------- | +| `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. | +| `show_always` | `false` | Always shows the `username` module. | +| `disabled` | `false` | Disables the `username` module. | + +### Variables + +| Variable | Example | Description | +| -------- | ------------ | ------------------------------------------------------------------------------------------- | +| `style` | `"red bold"` | Mirrors the value of option `style_root` when root is logged in and `style_user` otherwise. | +| `user` | `"matchai"` | The currently logged-in user ID. | + +### Example + +```toml +# ~/.config/starship.toml + +[username] +style_user = "white bold" +style_root = "black bold" +format = "user: [$user]($style) " +disabled = false +show_always = true +``` + +## Zig + +The `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met: + +- The current directory contains a `.zig` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | The style for the module. | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `disabled` | `false` | Disables the `zig` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v0.6.0` | The version of `zig` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[zig] +symbol = "⚡️ " +``` + +## Custom commands + +The `custom` modules show the output of some arbitrary commands. + +These modules will be shown if any of the following conditions are met: + +- 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 + +::: tip + +Multiple custom modules can be defined by using a `.`. + +::: + +::: tip + +The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined. + +::: + +::: tip + +[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! + +::: + +### 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` | `""` | 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. | + +### Variables + +| Variable | Description | +| --------- | -------------------------------------- | +| output | The output of shell command in `shell` | +| symbol | Mirrors the value of option `symbol` | +| style\* | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +#### Custom command shell + +`shell` accepts a non-empty list of strings, where: + +- The first string is the path to the shell to use to execute the command. +- Other following arguments are passed to the shell. + +If unset, it will fallback to STARSHIP_SHELL and then to "sh" on Linux, and "cmd /C" on Windows. + +The `command` will be passed in on 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. + +```toml +shell = ["pwsh", "-Command", "-"] +``` + +::: warning Make sure your custom shell configuration exits gracefully + +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). + +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. + +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. + +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. + +::: + +### Example + +```toml +# ~/.config/starship.toml + +[custom.foo] +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters +when = """ test "$HOME" == "$PWD" """ +format = " transcending [$output]($style)" + +[custom.time] +command = "time /T" +files = ["*.pst"] +shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +``` diff --git a/docs/it-IT/faq/README.md b/docs/it-IT/faq/README.md new file mode 100644 index 000000000..56a50d46a --- /dev/null +++ b/docs/it-IT/faq/README.md @@ -0,0 +1,92 @@ +# FAQ + +## Qual è la configurazione utilizzata nella GIF demo? + +- **Terminale Emulato**: [iTerm2](https://iterm2.com/) + - **Tema**: Minimale + - **Schema Colore**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy) + - **Font**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads) +- **Shell**: [Fish Shell](https://fishshell.com/) + - **Configurazione**: [matchai Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish) + - **Chiedi**: [Starship](https://starship.rs/) + +## 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 formato di primo livello `` e `.disabled` fanno la stessa cosa? + +Sì, entrambi possono essere utilizzati per disabilitare i moduli nel prompt. Se tutto quello che pensi di fare è disabilitare i moduli, `.disabled` è il modo preferito per per queste ragioni: + +- 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? + +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. + +Ecco un piccolo esempio per avere Starship lavorando con bash: + +```sh +# Ottenere lo status code dall'ultimo comando eseguito +STATUS=$? + +# Ottieni il numero di processi in esecuzione. +NUM_JOBS=$(jobs -p | wc -l) + +# Imposta il prompt come output di `starship prompt` +PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)" +``` + +L'implementazione [Bash](https://github.com/starship/starship/blob/master/src/init/starship.bash) integrata in Starship è leggermente più complessa per consentire funzionalità avanzate come il [modulo di durata dei comandi](https://starship.rs/config/#Command-Duration) e per garantire che Starship sia compatibile con le configurazioni Bash preinstallate. + +Per un elenco di tutti i flag accettati da `starship prompt`, utilizzare il seguente comando: + +```sh +starship prompt --help +``` + +The prompt will use as much context as is provided, but no flags are "required". + +## Come faccio a eseguire le distribuzioni Starship su Linux con vecchie versioni di glibc? + +Se si ottiene un errore come "_versione 'GLIBC_2. 8' non trovato (richiesta da Starship)_" quando si utilizza il binario precostruito (per esempio, su CentOS 6 o 7), puoi usare un binario compilato con `musl` invece di `glibc`: + +```sh +curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl +``` + +## Perché non vedo un simbolo di glifo nel mio prompt? + +La causa più comune è la configurazione errata del sistema. Alcune distribuzioni Linux in particolare non vengono fornite con il supporto dei font come impostazione predefinita. È necessario assicurarsi che: + +- In locale sia impostato un valore UTF-8, come `de_DE.UTF-8` o `ja_JP.UTF-8`. Se `LC_ALL` non è un valore UTF-8, [dovrai cambiarlo](https://www.tecmint.com/set-system-locales-in-linux/). +- Hai un font emoji installato. La maggior parte dei sistemi ha un font emoji per impostazione predefinita, ma alcuni (in particolare Arch Linux) non lo fanno. Di solito puoi installarne uno attraverso il gestore dei pacchetti del tuo sistema-[noto emoji](https://www.google.com/get/noto/help/emoji/) è uno dei popolari. +- Stai usando un [font Nerd](https://www.nerdfonts.com/). + +Per testare il sistema, eseguire i seguenti comandi in un terminale: + +```sh +echo -e "\xf0\x9f\x90\x8d" +echo -e "\xee\x82\xa0" +``` + +La prima riga dovrebbe riprodurre una [emoji di un serpente](https://emojipedia.org/snake/), mentre la seconda dovrebbe riprodurre il [simbolo powerline di ramo (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs). + +Se uno dei due simboli non viene visualizzato correttamente, il sistema è ancora mal configurato. Sfortunatamente, ottenere la configurazione dei caratteri corretta a volte è difficile. Gli utenti su Discord potrebbero essere in grado di aiutarti. Se entrambi i simboli vengono visualizzati correttamente, ma non li vedi ancora in starship, [segnala un bug!](https://github.com/starship/starship/issues/new/choose) + +## Come posso disinstallare Starship? + +Starship è altrettanto facile da disinstallare come lo è da installare. + +1. Rimuovi qualsiasi riga utilizzata per inizializzare Starship nella configurazione della tua shell (ad es. `~/.bashrc`). +1. Elimina il binario di Starship. + +Se Starship è stato installato utilizzando un gestore di pacchetti, fai riferimento alla documentazione per le istruzioni di disinstallazione. + +If Starship was installed using the `curl | bash` script, the following command will delete the binary: + +```sh +# Individua ed elimina il binario di Starship +rm "$(che starship)" +``` diff --git a/docs/it-IT/guide/README.md b/docs/it-IT/guide/README.md new file mode 100644 index 000000000..709fabb6a --- /dev/null +++ b/docs/it-IT/guide/README.md @@ -0,0 +1,272 @@ +

+ Starship: Cross-Shell Prompt +

+ +

+ GitHub Actions workflow status + Versione Crates.io + Stato del pacchetto
+ Chat su Discord + Segui @StarshipPrompt su Twitter +

+ +

+ Sito web + · + Installazione + · + Configurazione +

+ +

+ Inglese +   + 日本語 +   + 繁體中文 +   + Russo +   + Tedesco +   + 简体中文 +   + Spagnolo +   + Francese +

+ +

+ +Starship con iTerm2 e il tema Snazzy + +**Il prompt minimalista, super veloce e infinitamente personalizzabile per qualsiasi shell!** + +- **Velocità:** è veloce – _davvero_ veloce! 🚀 +- **Personalizzabile:** configura ogni aspetto del tuo prompt. +- **Universale:** funziona su qualsiasi shell, con qualsiasi sistema operativo. +- **Intelligente:** mostra le informazioni rilevanti a colpo d'occhio. +- **Ricco di funzionalità:** supporta tutti i tuoi strumenti preferiti. +- **Facile:** veloce da installare - inizia ad usarlo in pochi minuti. + +

+Esplora la documentazione di Starship  ▶ +

+ + + +## 🚀 Installazione + +### Prerequisiti + +- Un [Nerd Font](https://www.nerdfonts.com/) installato e abilitato nel tuo terminale (per esempio, prova [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). + +### Inizia + +1. Installa il binario **starship**: + + + #### Installa l'ultima Versione + + + ##### Da un binario precompilato, con Shell: + + ```sh + curl -fsSL https://starship.rs/install.sh | bash + ``` + + + ##### Da un sorgente su [crates.io](https://crates.io/): + + ```sh + cargo install starship + ``` + + + #### Installa via Package Manager + + + ##### Con [Homebrew](https://brew.sh/): + + ```sh + brew install starship + ``` + + + ##### Con [Scoop](https://scoop.sh): + + ```powershell + scoop install starship + ``` + +1. Aggiungi lo script di inizializzazione al file di configurazione della shell: + + + #### Bash + + Aggiungi quanto segue alla fine di `~/.bashrc`: + + ```sh + # ~/.bashrc + + eval "$(starship init bash)" + ``` + + + #### Fish + + Aggiungi quanto segue alla fine di `~/.config/fish/config.fish`: + + ```sh + # ~/.config/fish/config.fish + + starship init fish | source + ``` + + + #### Zsh + + Aggiungi quanto segue alla fine di `~/.zshrc`: + + ```sh + # ~/.zshrc + + eval "$(starship init zsh)" + ``` + + + #### PowerShell + + Aggiungi quanto segue alla fine di `Microsoft.PowerShell_profile.ps1`. Puoi controllare la posizione di questo file interrogando la variabile `$PROFILE` in PowerShell. Tipicamente il percorso è `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` oppure `~/.config/powershell/Microsoft.PowerShell_profile.ps1` su -Nix. + + ```sh + Invoke-Expression (&starship init powershell) + ``` + + + #### Ion + + Aggiungi quanto segue alla fine di `~/.config/ion/initrc`: + + ```sh + # ~/.config/ion/initrc + + eval $(starship init ion) + ``` + +## 🤝 Contribuire + +Siamo sempre alla ricerca di collaboratori di **tutti i livelli**! Se stai cercando di entrare facilmente nel progetto, prova un [buon primo problema](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). + +Se parli correntemente una lingua diversa dall'inglese, apprezziamo molto qualsiasi aiuto per mantenere i nostri documenti tradotti e aggiornati in altre lingue. Se desideri collaborare, le traduzioni possono essere fornite su [Starship Crowdin](https://translate.starship.rs/). + +Se sei interessato ad aiutare a contribuire a Starship, dai un'occhiata alla nostra [Guida al Contributo](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Inoltre, sentiti libero di entrare nel nostro [server Discord](https://discord.gg/8Jzqu3T) e dire ciao. 👋 + +### Contributori di codice + +Questi progetto esiste grazie a tutte le persone che contribuiscono. [[Contributo](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]. + + +### Contributori Finanziari + +Diventa un contributore finanziario e aiutaci a sostenere la nostra comunità. [[Contribute](https://opencollective.com/starship/contribute)] + +#### Privati + + + +#### Organizzazioni + +Supporta questo progetto con la tua organizzazione. Il tuo logo apparirà qui con un link al tuo sito web. [[Contribuisci](https://opencollective.com/starship/contribute)] + + + + + + + + + + + + +## 💭 Ispirato Da + +Ti invito di controllare questi lavori precedenti che hanno contribuito a ispirare la creazione di Starship. 🙏 + +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Un prompt ZSH per astronauti. + +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Tema robbyrussell Cross-shell scritto in JavaScript. + +- **[reujab/silver](https://github.com/reujab/silver)** - Un prompt multi-shell personalizzabile powerline-like con icone. + +

+
+ Starship rocket icon +

+ +## 📝 Licenza + +Copyright © 2019-presente, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).
Questo progetto è sotto licenza [ISC](https://github.com/starship/starship/blob/master/LICENSE). diff --git a/docs/it-IT/migrating-to-0.45.0/README.md b/docs/it-IT/migrating-to-0.45.0/README.md new file mode 100644 index 000000000..6158f304d --- /dev/null +++ b/docs/it-IT/migrating-to-0.45.0/README.md @@ -0,0 +1,267 @@ +# Migrazione alla versione 0.45.0 + +Starship v0.45.0 è una versione contenente importanti cambiamenti in preparazione della grande versione 1.0.0. Abbiamo apportato alcuni importanti cambiamenti per come la configurazione viene fatta sul prompt, al fine di consentire un maggior grado di personalizzazione. + +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. + +Starship v0.45.0 invece accetta un valore `format`, consentendo la personalizzazione del prompt al di fuori dei moduli stessi. + +**Esempio di configurazione pre-v0.45.0** + +```toml +prompt_order = [ + "username", + "hostname", + "directory", + "git_branch", + "git_commit", + "git_state", + "git_status", + "cmd_duration", + "custom", + "line_break", + "jobs", + "battery", + "time", + "character", +] +``` + +**Esempio di configurazione v0.45.0** + +```toml +format = """\ + $username\ + $hostname\ + $directory\ + $git_branch\ + $git_commit\ + $git_state\ + $git_status\ + $cmd_duration\ + $custom\ + $line_break\ + $jobs\ + $battery\ + $time\ + $character\ + """ +``` + +## Il prefisso `del modulo` e il suffisso `` sono stati sostituiti dal formato `` + +Precedentemente la v0.45.0, alcuni moduli accetterebbero `prefisso` e/o `suffisso` per stilare il modo in cui i moduli vengono renderizzati. + +Starship v0.45.0 invece accetta un valore `format`, consentendo la personalizzazione del prompt al di fuori dei moduli stessi. Invece di definire un prefisso e un suffisso per le variabili basate sul contesto, le variabili possono ora essere sostituite da una stringa di formato, che rappresenta l'output del modulo. + +**Esempio di configurazione pre-v0.45.0** + +```toml +[cmd_duration] +prefisso = "tak" +``` + +**Esempio di configurazione v0.45.0** + +```toml +[cmd_duration] +# $duration – The command duration (e.g. "15s") +# $style – The default style of the module (e.g. "bold yellow") +format = "took [$duration]($style) " +``` + +### Moduli soggetti + +#### Character + +| Proprietà rimossa | Sostituta | +| ----------------------- | ---------------- | +| `symbol` | `success_symbol` | +| `use_symbol_for_status` | `error_symbol` | +| `style_success` | `success_symbol` | +| `style_failure` | `error_symbol` | + +**Modifiche alla configurazione predefinita** + +```diff +[character] +-- symbol = "❯" +-- error_symbol = "✖" +-- use_symbol_for_status = true +-- vicmd_symbol = "❮" +++ success_symbol = "[❯](bold green)" +++ error_symbol = "[❯](bold red)" +++ vicmd_symbol = "[❮](bold green)" +``` + +Precedentemente, la proprietà `use_symbol_for_status` è stata utilizzata per configurare il prompt per mostrare `error_symbol` quando l'ultimo comando ha prodotto un codice di stato diverso da zero. + +Con il rilascio di v0.45.0, ora usiamo sempre `error_symbol` dopo codici di stato diversi da zero, unificando le proprietà `use_symbol_for_status` e `error_symbol`. + +Per configurare il prompt al fine di usare la vecchia configurazione `use_symbol_for_status = true`, aggiungi quanto segue al tuo file di configurazione: + +```toml +[character] +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 + +| Proprietà rimossa | Sostituta | +| ----------------- | --------- | +| `prefix` | `format` | + +**Modifiche alla configurazione predefinita** + +```diff +[cmd_duration] +-- prefix = "took " +++ format = "took [$duration]($style) " +``` + +#### Directory + +| Proprietà rimossa | Sostituta | +| ----------------- | --------- | +| `prefix` | `format` | + +**Modifiche alla configurazione predefinita** + +```diff +[directory] +-- prefix = "in " +++ format = "[$path]($style)[$read_only]($read_only_style) " +``` + +#### Variabili di ambiente + +| Proprietà rimossa | Sostituta | +| ----------------- | --------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Modifiche alla configurazione predefinita** + +```diff +[env_var] +-- prefix = "" +-- suffix = "" +++ format = "with [$env_value]($style) " +``` + +#### Git Commit + +| Proprietà rimossa | Sostituta | +| ----------------- | --------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Modifiche alla configurazione predefinita** + +```diff +[git_commit] +-- prefix = "(" +-- suffix = ")" +++ format = '[\($hash\)]($style) ' +``` + +#### Git Status + +| Proprietà rimossa | Sostituta | +| ----------------- | --------- | +| `prefix` | `format` | +| `suffix` | `format` | +| `show_sync_count` | `format` | + +**Modifiche alla configurazione predefinita** + +```diff +[git_status] +-- prefix = "[" +-- suffix = "]" +-- show_sync_count = false +++ format = '([\[$all_status$ahead_behind\]]($style) )' +``` + +Precedentemente, la proprietà `show_sync_count` è stata utilizzata per configurare il prompt per mostrare il numero di commit che il ramo era avanti o dietro il ramo in remoto. + +Con il rilascio della v0.45.0, questo è stato sostituito con tre proprietà separate, `ahead`, ` behind` e `diverged`. + +Per configurare il prompt al fine di usare la vecchia configurazione `show_sync_count = true`, aggiungi quanto segue al tuo file di configurazione: + +```toml +[git_status] +ahead = "⇡${count}" +diverged = "⇕⇡${ahead_count}⇣${behind_count}" +behind = "⇣${count}" +``` + +#### Hostname + +| Proprietà rimossa | Sostituta | +| ----------------- | --------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Modifiche alla configurazione predefinita** + +```diff +[hostname] +-- prefix = "" +-- suffix = "" +++ format = "[$hostname]($style) in " +``` + +#### Singolarità + +| Proprietà rimossa | Sostituta | +| ----------------- | --------- | +| `label` | `format` | +| `prefix` | `format` | +| `suffix` | `format` | + +**Modifiche alla configurazione predefinita** + +```diff +[singularity] +-- prefix = "" +-- suffix = "" +++ format = '[$symbol\[$env\]]($style) ' +``` + +#### Time + +| Proprietà rimossa | Sostituta | +| ----------------- | ------------- | +| `format` | `time_format` | + +**Modifiche alla configurazione predefinita** + +```diff +[time] +-- format = "🕙[ %T ]" +++ time_format = "%T" +++ format = "at 🕙[$time]($style) " +``` + +#### Comandi Personalizzati + +| Proprietà rimossa | Sostituta | +| ----------------- | --------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Modifiche alla configurazione predefinita** + +```diff +[custom.example] +-- prefix = "" +-- suffix = "" +++ format = "[$symbol$output]($style) " +``` diff --git a/docs/it-IT/presets/README.md b/docs/it-IT/presets/README.md new file mode 100644 index 000000000..4b8ab1e7b --- /dev/null +++ b/docs/it-IT/presets/README.md @@ -0,0 +1,89 @@ +# Preset + +Ecco una raccolta dei preset di configurazione inviati dalla community per Starship. Se hai un preset da condividere, per favore [ invia un PR ](https://github.com/starship/starship/edit/master/docs/presets/README.md) aggiornando questo file! 😊 + +## Nerd Font Symbols + +Questo preset non cambia nulla tranne i simboli utilizzati per ogni modulo. Se gli emoji non fanno per te, questo potrebbe attirare la tua attenzione! + +![Screenshot dei preset di Nerd Font Symbols](/presets/nerd-font-symbols.png) + +### Prerequisiti + +- Un [ Nerd Font ](https://www.nerdfonts.com/) installato e abilitato nel tuo terminale (l'esempio usa Fira Code Nerd Font) + +### Configurazione + +```toml +[aws] +symbol = " " + +[conda] +symbol = " " + +[dart] +symbol = " " + +[directory] +read_only = " " + +[docker] +symbol = " " + +[elixir] +symbol = " " + +[elm] +symbol = " " + +[git_branch] +symbol = " " + +[golang] +symbol = " " + +[haskell] +symbol = " " + +[hg_branch] +symbol = " " + +[java] +symbol = " " + +[julia] +symbol = " " + +[memory_usage] +symbol = " " + +[nim] +symbol = " " + +[nix_shell] +symbol = " " + +[nodejs] +symbol = " " + +[package] +symbol = " " + +[perl] +symbol = " " + +[php] +symbol = " " + +[python] +symbol = " " + +[ruby] +symbol = " " + +[rust] +symbol = " " + +[swift] +symbol = "ﯣ " +``` diff --git a/docs/ja-JP/advanced-config/README.md b/docs/ja-JP/advanced-config/README.md index 304896464..799a04144 100644 --- a/docs/ja-JP/advanced-config/README.md +++ b/docs/ja-JP/advanced-config/README.md @@ -82,7 +82,7 @@ starship_precmd_user_func="set_win_title" ここで、 `` は色を指定します(以下で述べます)。 `fg:` と `` は現在同様の動作ですが、将来変更される可能性があります。 文字列中の単語の順序は関係ありません。 -例えば `fg:red none fg:blue` は依然としてスタイルのない文字列となるように、 `none` は他の文字列中の他の単語すべてを上書きします。 将来 `none` を他の単語と一緒に使用することはエラーになるかもしれません。 +The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. 色は以下のいずれか1つを指定できます。 diff --git a/docs/ja-JP/config/README.md b/docs/ja-JP/config/README.md index ce96e2713..4620a9c6e 100644 --- a/docs/ja-JP/config/README.md +++ b/docs/ja-JP/config/README.md @@ -51,7 +51,7 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" **モジュール**: OSのコンテキスト情報に基づいて情報を提供するプロンプト内のコンポーネントです。 たとえば、現在のディレクトリがNodeJSプロジェクトである場合、「nodejs」モジュールは、現在コンピューターにインストールされているNodeJSのバージョンを表示します。 -**変数**: モジュールが提供する情報を含むサブコンポーネントを小さくする。 例えば、"nodejs" モジュール内の "version" 変数には、NodeJS の現在のバージョンが含まれています。 +**Variable**: Smaller sub-components that contain information provided by the module. 例えば、"nodejs" モジュール内の "version" 変数には、NodeJS の現在のバージョンが含まれています。 慣例により、ほとんどのモジュールにはデフォルトの端末色の接頭辞(「nodejs」の`via` など)と接尾辞として空のスペースがあります。 @@ -198,6 +198,7 @@ $golang\ $helm\ $java\ $julia\ +$kotlin\ $nim\ $nodejs\ $ocaml\ @@ -218,8 +219,8 @@ $gcloud\ $openstack\ $env_var\ $crystal\ -$cmd_duration\ $custom\ +$cmd_duration\ $line_break\ $lua\ $jobs\ @@ -303,26 +304,17 @@ symbol = "🅰 " ### オプション -| オプション | デフォルト | 説明 | -| -------------------- | --------------------------------- | ------------------------- | -| `full_symbol` | `"•"` | バッテリーが満タンのときに表示される記号です。 | -| `charging_symbol` | `"⇡"` | バッテリーの充電中に表示される記号です。 | -| `discharging_symbol` | `"⇣"` | バッテリーが放電しているときに表示される記号です。 | -| `format` | `"[$symbol$percentage]($style) "` | moduleのフォーマットです。 | -| `display` | [link](#battery-display) | モジュールの閾値とスタイルを表示します。 | -| `disabled` | `false` | `battery`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| -------------------- | --------------------------------- | --------------------------------------------------- | +| `full_symbol` | `""` | バッテリーが満タンのときに表示される記号です。 | +| `charging_symbol` | `""` | バッテリーの充電中に表示される記号です。 | +| `discharging_symbol` | `""` | バッテリーが放電しているときに表示される記号です。 | +| `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) "` | moduleのフォーマットです。 | +| `display` | [link](#battery-display) | Display threshold and style for the module. | +| `disabled` | `false` | Disables the `battery` module. | -
-いくつかのまれなバッテリー状態のオプションもあります。 - -| 変数 | 説明 | -| ---------------- | ------------------------ | -| `unknown_symbol` | バッテリー状態が不明なときに表示される記号です。 | -| `empty_symbol` | バッテリーが空のときに表示される記号です。 | - -オプションを指定しない限り、バッテリーの状態が`unknown`もしくは`empty`になった場合にインジケーターは非表示になります。 - -
### 設定例 @@ -337,7 +329,7 @@ discharging_symbol = "💀" ### バッテリーの表示 -`display` オプションを使用して、バッテリーインジケーターを表示するタイミング(閾値)と外観(スタイル)を定義します。 `display` が提供されない場合、 デフォルトは次のとおりです。 +The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. デフォルトは次のとおりです。 ```toml [[battery.display]] @@ -347,12 +339,12 @@ style = "bold red" #### オプション -`display`オプションは、次の表の通りです。 +The `display` option is an array of the following table. -| オプション | 説明 | -| ----------- | ------------------------------ | -| `threshold` | バッテリーが表示される上限です。 | -| `style` | displayオプションが使用されている場合のスタイルです。 | +| オプション | 説明 | +| ----------- | ----------------------------------------------- | +| `threshold` | The upper bound for the display option. | +| `style` | The style used if the display option is in use. | #### 設定例 @@ -371,14 +363,14 @@ style = "bold yellow" ## 文字 -`character`モジュールは、端末でテキストが入力される場所の横に文字(通常は矢印)を表示します。 +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. -文字は、最後のコマンドが成功したかどうかを示します。 表し方は下記の2つです。 +The character will tell you whether the last command was successful or not. It can do this in two ways: - 色の変更 (`赤`/`緑`) - プロンプトの表示の変更 (`❯`/`✖`) -デフォルトでは、色だけが変更されます。 If you also want to change it's shape take a look at [this example](#with-custom-error-shape). +By default it only changes color. If you also want to change it's shape take a look at [this example](#with-custom-error-shape). ### オプション @@ -388,7 +380,7 @@ style = "bold yellow" | `success_symbol` | `"[❯](bold green)"` | The format string used before the text input if the previous command succeeded. | | `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. | | `vicmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | -| `disabled` | `false` | `character`モジュールを無効にします。 | +| `disabled` | `false` | Disables the `character` module. | ### 変数 @@ -455,27 +447,27 @@ The `cmake` module shows the currently installed version of CMake if any of the ## コマンド実行時間 -`cmd_duration`モジュールは、最後のコマンドの実行にかかった時間を示します。 モジュールが表示されるのは、コマンドが2秒以上かかった場合、または`min_time`値が存在する場合のみです。 +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. -::: warning BashでDEBUGトラップをhookしない +::: warning Do not hook the DEBUG trap in Bash -`bash`でStarshipを実行している場合、 `eval $(starship init $0)`実行した後に`DEBUG`トラップをフックしないでください。そうしないと、このモジュールが**おそらくですが**壊れます。 +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. ::: -preexecのような機能を必要とするBashユーザーは、 [rcalorasのbash_preexecフレームワーク](https://github.com/rcaloras/bash-preexec)を使用できます。 `eval $(starship init $0)` を実行する前に、`preexec_functions`、および`precmd_functions`定義するだけで、通常どおり続行します。 +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. ### オプション -| オプション | デフォルト | 説明 | -| -------------------- | ----------------------------- | ----------------------------------------------------- | -| `min_time` | `2_000` | 実行時間を表示する最短期間(ミリ秒単位)です。 | -| `show_milliseconds` | `false` | 実行時間の秒に加えてミリ秒を表示します。 | -| `format` | `"took [$duration]($style) "` | moduleのフォーマットです。 | -| `style` | `"bold yellow"` | モジュールのスタイルです。 | -| `disabled` | `false` | `cmd_duration`モジュールを無効にします。 | -| `show_notifications` | `false` | Show desktop notifications when command completes. | -| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | +| オプション | デフォルト | 説明 | +| -------------------- | ----------------------------- | ---------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | moduleのフォーマットです。 | +| `style` | `"bold yellow"` | モジュールのスタイルです。 | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `show_notifications` | `false` | Show desktop notifications when command completes. | +| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | ::: tip @@ -485,10 +477,10 @@ Showing desktop notifications requires starship to be built with `rust-notify` s ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | -------- | ---------------------- | -| duration | `16m40s` | コマンドの実行時間 | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | -------- | --------------------------------------- | +| duration | `16m40s` | The time it took to execute the command | +| style\* | | オプション `style` の値をミラーする | \*: この変数はスタイル文字列の一部としてのみ使用できます @@ -514,14 +506,14 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c ### オプション -| オプション | デフォルト | 説明 | -| ------------------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `truncation_length` | `1` | 環境が`conda create -p [path]`で作成された場合、環境パスが切り捨てられるディレクトリ数。 `0`は切り捨てがないことを意味します。 [`directory`](#directory)もご覧ください。 | -| `symbol` | `"🅒 "` | 環境名の直前に使用されるシンボルです。 | -| `style` | `"bold green"` | モジュールのスタイルです。 | -| `format` | `"[$symbol$environment]($style) "` | moduleのフォーマットです。 | -| `ignore_base` | `true` | Ignores `base` environment when activated. | -| `disabled` | `false` | `conda`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. | +| `symbol` | `"🅒 "` | The symbol used before the environment name. | +| `style` | `"bold green"` | モジュールのスタイルです。 | +| `format` | `"via [$symbol$environment]($style) "` | moduleのフォーマットです。 | +| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `disabled` | `false` | Disables the `conda` module. | ### 変数 @@ -544,19 +536,19 @@ format = "[$symbol$environment](dimmed green) " ## Crystal -The `crystal` module shows the currently installed version of Crystal. The module will be shown if any of the following conditions are met: +The `crystal` module shows the currently installed version of Crystal. 次の条件のいずれかが満たされると、モジュールが表示されます。 - カレントディレクトリに`shard.yml`ファイルが含まれている - カレントディレクトリに`.cr`の拡張子のファイルが含まれている ### オプション -| オプション | デフォルト | 説明 | -| ---------- | ---------------------------------- | ------------------------------ | -| `symbol` | `"🔮 "` | Crystalのバージョンを表示する前に使用される記号です。 | -| `style` | `"bold red"` | モジュールのスタイルです。 | -| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 | -| `disabled` | `false` | `crystal`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ---------- | ---------------------------------- | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | モジュールのスタイルです。 | +| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 | +| `disabled` | `false` | Disables the `crystal` module. | ### 変数 @@ -579,7 +571,7 @@ format = "via [✨ $version](bold blue) " ## Dart -The `dart` module shows the currently installed version of Dart. The module will be shown if any of the following conditions are met: +The `dart` module shows the currently installed version of Dart. 次の条件のいずれかが満たされると、モジュールが表示されます。 - The current directory contains a file with `.dart` extension - The current directory contains a `.dart_tool` directory @@ -623,25 +615,25 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### オプション -| オプション | デフォルト | 説明 | -| ------------------- | -------------------------------------------------- | ----------------------------------------------------- | -| `truncation_length` | `3` | 現在のディレクトリを切り捨てる親フォルダーの数です。 | -| `truncate_to_repo` | `true` | 現在いるgitリポジトリのルートに切り捨てるかどうかです。 | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | moduleのフォーマットです。 | -| `style` | `"bold cyan"` | モジュールのスタイルです。 | -| `disabled` | `false` | `directory`モジュールを無効にします。 | -| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | -| `read_only_style` | `"red"` | The style for the read only symbol. | -| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | +| オプション | デフォルト | 説明 | +| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | moduleのフォーマットです。 | +| `style` | `"bold cyan"` | モジュールのスタイルです。 | +| `disabled` | `false` | Disables the `directory` module. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
This module has a few advanced configuration options that control how the directory is displayed. -| Advanced Option | デフォルト | 説明 | -| --------------------------- | ------ | ------------------------------------------------ | -| `substitutions` | | A table of substitutions to be made to the path. | -| `fish_style_pwd_dir_length` | `0` | fish shellのpwdパスロジックを適用するときに使用する文字数です。 | -| `use_logical_path` | `true` | OSからのパスの代わりに、シェル(`PWD`) によって提供される論理パスを表示します。 | +| Advanced Option | デフォルト | 説明 | +| --------------------------- | ------ | ---------------------------------------------------------------------------------------- | +| `substitutions` | | A table of substitutions to be made to the path. | +| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. | +| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. | `substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD. @@ -686,7 +678,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | | `style` | `"blue bold"` | モジュールのスタイルです。 | | `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | -| `disabled` | `true` | `docker_context`モジュールを無効にします。 | +| `disabled` | `true` | Disables the `docker_context` module. | ### 変数 @@ -731,13 +723,13 @@ The module will also show the Target Framework Moniker ( ⚠️ 表示されるバージョンは、パッケージマネージャーではなく、ソースコードが現在のディレクトリにあるパッケージのバージョンです。 @@ -1796,7 +1834,7 @@ format = "via [🎁 $version](208 bold) " ## Perl -The `perl` module shows the currently installed version of Perl. The module will be shown if any of the following conditions are met: +The `perl` module shows the currently installed version of Perl. 次の条件のいずれかが満たされると、モジュールが表示されます。 - The current directory contains a `Makefile.PL` or `Build.PL` file - The current directory contains a `cpanfile` or `cpanfile.snapshot` file @@ -1832,7 +1870,7 @@ format = "via [🦪 $version]($style) " ## PHP -The `php` module shows the currently installed version of PHP. The module will be shown if any of the following conditions are met: +The `php` module shows the currently installed version of PHP. 次の条件のいずれかが満たされると、モジュールが表示されます。 - The current directory contains a `composer.json` file - The current directory contains a `.php-version` file @@ -1868,7 +1906,7 @@ format = "via [🔹 $version](147 bold) " ## PureScript -The `purescript` module shows the currently installed version of PureScript version. The module will be shown if any of the following conditions are met: +The `purescript` module shows the currently installed version of PureScript version. 次の条件のいずれかが満たされると、モジュールが表示されます。 - The current directory contains a `spago.dhall` file - The current directory contains a \*.purs files @@ -1903,11 +1941,11 @@ format = "via [$symbol$version](bold white)" ## Python -`python` モジュールは現在インストールされているPythonのバージョンと アクティブ化されている場合は現在のPython仮想環境を表示します。 +The `python` module shows the currently installed version of Python and the current Python virtual environment if one is activated. If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`. -The module will be shown if any of the following conditions are met: +次の条件のいずれかが満たされると、モジュールが表示されます。 - The current directory contains a `.python-version` file - The current directory contains a `requirements.txt` file @@ -1921,16 +1959,24 @@ The module will be shown if any of the following conditions are met: ### オプション -| オプション | デフォルト | 説明 | -| -------------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | moduleのフォーマットです。 | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | モジュールのスタイルです。 | -| `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | -| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | -| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. | -| `disabled` | `false` | Disables the `python` module. | +| オプション | デフォルト | 説明 | +| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | moduleのフォーマットです。 | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | モジュールのスタイルです。 | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | + +::: tip + +The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used. + +The default values and order for `python_binary` was chosen to first identify the Python version in a virtualenv/conda environments (which currently still add a `python`, no matter if it points to `python3` or `python2`). This has the side effect that if you still have a system Python 2 installed, it may be picked up before any Python 3 (at least on Linux Distros that always symlink `/usr/bin/python` to Python 2). If you do not work with Python 2 anymore but cannot remove the system Python 2, changing this to `"python3"` will hide any Python version 2, see example below. + +::: ### 変数 @@ -1953,20 +1999,17 @@ symbol = "👾 " pyenv_version_name = true ``` -Using the `python3` binary to get the version. - -Note - The `python_binary` variable changes the binary that Starship executes to get the version of Python, it doesn't change the arguments that are used. - ```toml # ~/.config/starship.toml [python] +# Only use the `python3` binary to get the version. python_binary = "python3" ``` ## Ruby -The `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met: +The `ruby` module shows the currently installed version of Ruby. 次の条件のいずれかが満たされると、モジュールが表示されます。 - The current directory contains a `Gemfile` file - The current directory contains a `.ruby-version` file @@ -2002,7 +2045,7 @@ symbol = "🔺 " ## Rust -The `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met: +The `rust` module shows the currently installed version of Rust. 次の条件のいずれかが満たされると、モジュールが表示されます。 - The current directory contains a `Cargo.toml` file - The current directory contains a file with the `.rs` extension @@ -2041,13 +2084,14 @@ The `shlvl` module shows the current SHLVL ("shell level") environment variable, ### オプション -| オプション | デフォルト | 説明 | -| ----------- | ---------------------------- | --------------------------------------- | -| `threshold` | `2` | Display threshold. | -| `format` | `"[$symbol$shlvl]($style) "` | moduleのフォーマットです。 | -| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | -| `style` | `"bold yellow"` | モジュールのスタイルです。 | -| `disabled` | `true` | Disables the `shlvl` module. | +| オプション | デフォルト | 説明 | +| ----------- | ---------------------------- | ----------------------------------------------------------- | +| `threshold` | `2` | Display threshold. | +| `format` | `"[$symbol$shlvl]($style) "` | moduleのフォーマットです。 | +| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | +| `repeat` | `false` | Causes `symbol` to be repeated by the current SHLVL amount. | +| `style` | `"bold yellow"` | モジュールのスタイルです。 | +| `disabled` | `true` | Disables the `shlvl` module. | ### 変数 @@ -2112,20 +2156,31 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### オプション -| オプション | デフォルト | 説明 | -| ---------- | -------------------------- | ------------------------------------------------------ | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | A format string representing the symbol for the status | -| `style` | `"bold red"` | モジュールのスタイルです。 | -| `disabled` | `true` | Disables the `status` module. | +| オプション | デフォルト | 説明 | +| ----------------------- | -------------------------- | ---------------------------------------------------- | +| `format` | `[$symbol$status]($style)` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | +| `style` | `"bold red"` | モジュールのスタイルです。 | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | ----- | --------------------------------- | -| status | `127` | The exit code of the last command | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| -------------- | ------- | -------------------------------------------------------------------- | +| status | `127` | The exit code of the last command | +| int | `127` | The exit code of the last command | +| common_meaning | `ERROR` | Meaning of the code if not a signal | +| signal_number | `9` | Signal number corresponding to the exit code, only if signalled | +| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled | +| maybe_int | `7` | Contains the exit code number when no meaning has been found | +| symbol | | オプション `記号` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | \*: この変数はスタイル文字列の一部としてのみ使用できます @@ -2137,15 +2192,16 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y [status] style = "bg:blue" -symbol = "💣 " -format = '[\[$symbol$status\]]($style) ' +symbol = "🔴" +format = '[\[$symbol $status_common_meaning$status_signal_name$status_maybe_int\]]($style) ' +map_symbol = true disabled = false ``` ## Swift -The `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met: +The `swift` module shows the currently installed version of Swift. 次の条件のいずれかが満たされると、モジュールが表示されます。 - The current directory contains a `Package.swift` file - The current directory contains a file with the `.swift` extension @@ -2180,7 +2236,7 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). The module will be shown if any of the following conditions are met: +The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). 次の条件のいずれかが満たされると、モジュールが表示されます。 - The current directory contains a `.terraform` folder - Current directory contains a file with the `.tf` or `.hcl` extensions @@ -2273,13 +2329,15 @@ time_range = "10:00:00-14:00:00" ## Username -The `username` module shows active user's username. The module will be shown if any of the following conditions are met: +The `username` module shows active user's username. 次の条件のいずれかが満たされると、モジュールが表示されます。 - The current user is root - The current user isn't the same as the one that is logged in - The user is currently connected as an SSH session - The variable `show_always` is set to true +::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. ::: + ### オプション | オプション | デフォルト | 説明 | @@ -2312,7 +2370,7 @@ show_always = true ## Zig -The `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met: +The `zig` module shows the currently installed version of Zig. 次の条件のいずれかが満たされると、モジュールが表示されます。 - The current directory contains a `.zig` file diff --git a/docs/ja-JP/faq/README.md b/docs/ja-JP/faq/README.md index 80e8f380e..724033310 100644 --- a/docs/ja-JP/faq/README.md +++ b/docs/ja-JP/faq/README.md @@ -12,7 +12,7 @@ ## How do I get command completion as shown in the demo GIF? -Completion support 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). +Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions). ## Do top level `format` and `.disabled` do the same thing? @@ -21,7 +21,7 @@ Completion support is provided by your shell of choice. In the case of the demo, - Disabling modules is more explicit than omitting them from the top level `format` - Starshipが更新されると、新しく作成されたモジュールがプロンプトに追加されます -## ドキュメントによると、Starshipはクロスシェル対応をしているようですが、Xシェルはサポートしていません。 なぜですか? +## The docs say Starship is cross-shell. Why isn't my preferred shell supported? Starshipの構築方法は、事実上すべてのシェルのサポートを追加できるはずです。 Starshipのバイナリはステートレスであり、シェルに依存しないため、シェルがプロンプトのカスタマイズとシェルの拡張をサポートしている限り、Starshipを使用できます。 diff --git a/docs/ja-JP/guide/README.md b/docs/ja-JP/guide/README.md index f89793290..c6c9ac4b6 100644 --- a/docs/ja-JP/guide/README.md +++ b/docs/ja-JP/guide/README.md @@ -79,13 +79,15 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png" alt="简体中文" />   - Español   - - **シェル用の最小限の、非常に高速で、無限にカスタマイズ可能なプロンプトです!** - - **高速:** _本当に_ 高速です! 🚀 - **カスタマイズ可能:** プロンプトのあらゆる側面を構成します。 - **ユニバーサル:** あらゆるシェル、あらゆるオペレーティングシステムで動作します。 @@ -199,7 +199,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. + Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. ```sh Invoke-Expression (&starship init powershell) @@ -220,6 +220,8 @@ 私たちは常に**すべてのスキルレベル**の貢献者を探しています! もし簡単にプロジェクトへ参加する方法をお探しなら、 [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue) に取り組んでみてください。 +If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/). + もしあなたが Starship への貢献に興味がある場合は、我々の[貢献ガイド](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)をご覧ください。 また、気軽に我々の[Discord サーバー](https://discord.gg/8Jzqu3T)へ顔を出してください。 👋 ### コードに貢献していただいた方々 diff --git a/docs/ja-JP/presets/README.md b/docs/ja-JP/presets/README.md index 1adc1d4d0..4861c7f9a 100644 --- a/docs/ja-JP/presets/README.md +++ b/docs/ja-JP/presets/README.md @@ -18,17 +18,15 @@ [aws] symbol = " " -[battery] -full_symbol = "" -charging_symbol = "" -discharging_symbol = "" - [conda] symbol = " " [dart] symbol = " " +[directory] +read_only = " " + [docker] symbol = " " diff --git a/docs/ko-KR/README.md b/docs/ko-KR/README.md new file mode 100644 index 000000000..4767ca0b1 --- /dev/null +++ b/docs/ko-KR/README.md @@ -0,0 +1,112 @@ +--- +home: true +heroImage: /logo.svg +heroText: +tagline: The minimal, blazing-fast, and infinitely customizable prompt for any shell! +actionText: Get Started → +actionLink: ./guide/ +features: + - + title: Compatibility First + details: Works on the most common shells on the most common operating systems. Use it everywhere! + - + title: Rust-Powered + details: Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible. + - + title: Customizable + details: Every little detail is customizable to your liking, to make this prompt as minimal or feature-rich as you'd like it to be. +footer: ISC Licensed | Copyright © 2019-present Starship Contributors +#Used for the description meta tag, for SEO +metaTitle: "Starship: Cross-Shell Prompt" +description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and PowerShell. +--- + +
+ +
+ +### Quick Install + +1. Install the **starship** binary: + + + #### Install Latest Version + + With Shell: + + ```sh + curl -fsSL https://starship.rs/install.sh | bash + ``` + + + #### Install via Package Manager + + With [Homebrew](https://brew.sh/): + + ```sh + brew install starship + ``` + + With [Scoop](https://scoop.sh): + + ```powershell + scoop install starship + ``` + +1. Add the init script to your shell's config file: + + + #### Bash + + Add the following to the end of `~/.bashrc`: + + ```sh + # ~/.bashrc + + eval "$(starship init bash)" + ``` + + + #### Fish + + Add the following to the end of `~/.config/fish/config.fish`: + + ```sh + # ~/.config/fish/config.fish + + starship init fish | source + ``` + + + #### Zsh + + Add the following to the end of `~/.zshrc`: + + ```sh + # ~/.zshrc + + eval "$(starship init zsh)" + ``` + + + #### Powershell + + Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. + + ```sh + Invoke-Expression (&starship init powershell) + ``` + + + #### Ion + + Add the following to the end of `~/.config/ion/initrc`: + + ```sh + # ~/.config/ion/initrc + + eval $(starship init ion) + ``` diff --git a/docs/ko-KR/advanced-config/README.md b/docs/ko-KR/advanced-config/README.md new file mode 100644 index 000000000..1cf6ebb78 --- /dev/null +++ b/docs/ko-KR/advanced-config/README.md @@ -0,0 +1,93 @@ +# Advanced Configuration + +While Starship is a versatile shell, sometimes you need to do more than edit `starship.toml` to get it to do certain things. This page details some of the more advanced configuration techniques used in starship. + +::: warning + +The configurations in this section are subject to change in future releases of Starship. + +::: + +## Custom pre-prompt and pre-execution Commands in Bash + +Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure: + +- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do + +```bash +function blastoff(){ + echo "🚀" +} +starship_precmd_user_func="blastoff" +``` + +- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. + +```bash +function blastoff(){ + echo "🚀" +} +trap blastoff DEBUG # Trap DEBUG *before* running starship +eval $(starship init bash) +``` + +## Change Window Title + +Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`. + +First, define a window title change function (identical in bash and zsh): + +```bash +function set_win_title(){ + echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007" +} +``` + +You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). + +In `bash`, set this function to be the precmd starship function: + +```bash +starship_precmd_user_func="set_win_title" +``` + +In `zsh`, add this to the `precmd_functions` array: + +```bash +precmd_functions+=(set_win_title) +``` + +If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. + +For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`: + +```bash +function set_win_title(){ + echo -ne "\033]0; $(basename $PWD) \007" +} +starship_precmd_user_func="set_win_title" +``` + +## Style Strings + +Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: + + - `bold` + - `underline` + - `dimmed` + - `bg:` + - `fg:` + - `` + - `none` + +where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing , though this may change in the future. The order of words in the string does not matter. + +The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. + +A color specifier can be one of the following: + + - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). + - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). + - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). + +If multiple colors are specified for foreground/background, the last one in the string will take priority. diff --git a/docs/ko-KR/config/README.md b/docs/ko-KR/config/README.md new file mode 100644 index 000000000..286375e20 --- /dev/null +++ b/docs/ko-KR/config/README.md @@ -0,0 +1,2503 @@ +# Configuration + +To get started configuring starship, create the following 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: + +```toml +# Don't print a new line at the start of the prompt +add_newline = false + +# 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" + +# Disable the package module, hiding it from the prompt completely +[package] +disabled = true +``` + +You can change default `starship.toml` file location with `STARSHIP_CONFIG` environment variable: + +```sh +export STARSHIP_CONFIG=~/.starship +``` + +Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: + +```ps1 +$ENV:STARSHIP_CONFIG = "$HOME\.starship" +``` + +### 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: + +```sh +export STARSHIP_CACHE=~/.starship/cache +``` + +Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: + +```ps1 +$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" +``` + +### Terminology + +**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of NodeJS that is currently installed on your computer, if your current directory is a NodeJS project. + +**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 NodeJS. + +By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. + +### Format Strings + +Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. + +#### Variable + +A variable contains a `$` symbol followed by the name of the variable. The name of a variable only contains letters, numbers and `_`. + +For example: + +- `$version` is a format string with a variable named `version`. +- `$git_branch$git_commit` is a format string with two variables named `git_branch` and `git_commit`. +- `$git_branch $git_commit` has the two variables separated with a space. + +#### Text Group + +A text group is made up of two different parts. + +The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it. + +In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used style the first part. + +For example: + +- `[on](red bold)` will print a string `on` with bold text colored red. +- `[⬢ $version](bold green)` will print a symbol `⬢` followed by the content of variable `version`, with bold text colored green. +- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green. + +#### Style Strings + +Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). + +- `"fg:green bg:blue"` sets green text on a blue background +- `"bg:blue fg:bright-green"` sets bright green text on a blue background +- `"bold fg:27"` sets bold text with [ANSI color](https://i.stack.imgur.com/KTSQa.png) 27 +- `"underline bg:#bf5700"` sets underlined text on a burnt orange background +- `"bold italic fg:purple"` sets bold italic purple text +- `""` explicitly disables all styling + +Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics. + +#### Conditional Format Strings + +A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. + +For example: + +- `(@$region)` will show nothing if the variable `region` is `None`, otherwise `@` followed by the value of region. +- `(some text)` will always show nothing since there are no variables wrapped in the braces. +- When `$all` is a shortcut for `\[$a$b\]`, `($all)` will show nothing only if `$a` and `$b` are both `None`. This works the same as `(\[$a$b\] )`. + +#### Escapable characters + +The following symbols have special usage in a format string. If you want to print the following symbols, you have to escape them with a backslash (`\`). + +- \$ +- \\ +- [ +- ] +- ( +- ) + +Note that `toml` has [its own escape syntax](https://github.com/toml-lang/toml#user-content-string). It is recommended to use a literal string (`''`) in your config. If you want to use a basic string (`""`), pay attention to escape the backslash `\`. + +For example, when you want to print a `$` symbol on a new line, the following configs for `format` are equivalent: + +```toml +# with basic string +format = "\n\\$" + +# with multiline basic string +format = """ + +\\$""" + +# with literal string +format = ''' + +\$''' +``` + +## Prompt + +This is the list of prompt-wide configuration options. + +### Options + +| Option | Default | Description | +| -------------- | ------------------------------ | ----------------------------------------------------- | +| `format` | [link](#default-prompt-format) | Configure the format of the prompt. | +| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | +| `add_newline` | `true` | Add a new line before the start of the prompt. | + +### Example + +```toml +# ~/.config/starship.toml + +# Use custom format +format = """ +[┌───────────────────>](bold green) +[│](bold green)$directory$rust$package +[└─>](bold green) """ + +# Wait 10 milliseconds for starship to check files under the current directory. +scan_timeout = 10 + +# Disable the newline at the start of the prompt +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. The default is as shown: + +```toml +format = "$all" + +# Which is equivalent to +format = """ +$username\ +$hostname\ +$shlvl\ +$kubernetes\ +$directory\ +$git_branch\ +$git_commit\ +$git_state\ +$git_status\ +$hg_branch\ +$docker_context\ +$package\ +$cmake\ +$dart\ +$dotnet\ +$elixir\ +$elm\ +$erlang\ +$golang\ +$helm\ +$java\ +$julia\ +$kotlin\ +$nim\ +$nodejs\ +$ocaml\ +$perl\ +$php\ +$purescript\ +$python\ +$ruby\ +$rust\ +$swift\ +$terraform\ +$zig\ +$nix_shell\ +$conda\ +$memory_usage\ +$aws\ +$gcloud\ +$openstack\ +$env_var\ +$crystal\ +$custom\ +$cmd_duration\ +$line_break\ +$lua\ +$jobs\ +$battery\ +$time\ +$status\ +$character""" +``` + +## AWS + +The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. + +When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var. + +### Options + +| Option | Default | Description | +| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | +| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | +| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `AWS` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------------- | ------------------------------------ | +| region | `ap-northeast-1` | The current AWS region | +| profile | `astronauts` | The current AWS profile | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Examples + +#### Display everything + +```toml +# ~/.config/starship.toml + +[aws] +format = 'on [$symbol$profile(\($region\))]($style) ' +style = "bold blue" +symbol = "🅰 " +[aws.region_aliases] +ap-southeast-2 = "au" +us-east-1 = "va" +``` + +#### Display region + +```toml +# ~/.config/starship.toml + +[aws] +format = "on [$symbol$region]($style) " +style = "bold blue" +symbol = "🅰 " +[aws.region_aliases] +ap-southeast-2 = "au" +us-east-1 = "va" +``` + +#### Display profile + +```toml +# ~/.config/starship.toml + +[aws] +format = "on [$symbol$profile]($style) " +style = "bold blue" +symbol = "🅰 " +``` + +## Battery + +The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. + +### Options + +| Option | Default | Description | +| -------------------- | --------------------------------- | --------------------------------------------------- | +| `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. | +| `display` | [link](#battery-display) | Display threshold and style for the module. | +| `disabled` | `false` | Disables the `battery` module. | + + +### Example + +```toml +# ~/.config/starship.toml + +[battery] +full_symbol = "🔋" +charging_symbol = "⚡️" +discharging_symbol = "💀" +``` + +### Battery Display + +The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. The default is as shown: + +```toml +[[battery.display]] +threshold = 10 +style = "bold red" +``` + +#### Options + +The `display` option is an array of the following table. + +| Option | Description | +| ----------- | ----------------------------------------------- | +| `threshold` | The upper bound for the display option. | +| `style` | The style used if the display option is in use. | + +#### Example + +```toml +[[battery.display]] # "bold red" style when capacity is between 0% and 10% +threshold = 10 +style = "bold red" + +[[battery.display]] # "bold yellow" style when capacity is between 10% and 30% +threshold = 30 +style = "bold yellow" + +# when capacity is over 30%, the battery indicator will not be displayed + +``` + +## Character + +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. + +The character will tell you whether the last command was successful or not. It can do this in two ways: + +- changing color (`red`/`green`) +- changing shape (`❯`/`✖`) + +By default it only changes color. If you also want to change it's shape take a look at [this example](#with-custom-error-shape). + +### Options + +| Option | Default | Description | +| ---------------- | ------------------- | -------------------------------------------------------------------------------- | +| `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. | +| `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. | +| `vicmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | +| `disabled` | `false` | Disables the `character` module. | + +### Variables + +| Variable | Example | Description | +| -------- | ------- | --------------------------------------------------------------------- | +| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` | + +### Examples + +#### With custom error shape + +```toml +# ~/.config/starship.toml + +[character] +success_symbol = "[➜](bold green) " +error_symbol = "[✗](bold red) " +``` + +#### Without custom error shape + +```toml +# ~/.config/starship.toml + +[character] +success_symbol = "[➜](bold green) " +error_symbol = "[➜](bold red) " +``` + +#### With custom vim shape + +```toml +# ~/.config/starship.toml + +[character] +vicmd_symbol = "[V](bold green) " +``` + +## CMake + +The `cmake` module shows the currently installed version of CMake if any of the following conditions are met: + +- The current directory contains a `CMakeLists.txt` file +- The current directory contains a `CMakeCache.txt` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | -------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `cmake` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v3.17.3` | The version of cmake | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +## Command Duration + +The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. + +::: warning Do not hook the DEBUG trap in Bash + +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. + +::: + +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. + +### Options + +| Option | Default | Description | +| -------------------- | ----------------------------- | ---------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `show_notifications` | `false` | Show desktop notifications when command completes. | +| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | + +::: tip + +Showing desktop notifications requires starship to be built with `rust-notify` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. + +::: + +### Variables + +| Variable | Example | Description | +| --------- | -------- | --------------------------------------- | +| duration | `16m40s` | The time it took to execute the command | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[cmd_duration] +min_time = 500 +format = "underwent [$duration](bold yellow)" +``` + +## Conda + +The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set. + +::: tip + +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. + +::: + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. | +| `symbol` | `"🅒 "` | The symbol used before the environment name. | +| `style` | `"bold green"` | The style for the module. | +| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `disabled` | `false` | Disables the `conda` module. | + +### Variables + +| Variable | Example | Description | +| ----------- | ------------ | ------------------------------------ | +| environment | `astronauts` | The current conda environment | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[conda] +format = "[$symbol$environment](dimmed green) " +``` + +## Crystal + +The `crystal` module shows the currently installed version of Crystal. The module will be shown if any of the following conditions are met: + +- The current directory contains a `shard.yml` file +- The current directory contains a `.cr` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | The style for the module. | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `disabled` | `false` | Disables the `crystal` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.32.1` | The version of `crystal` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[crystal] +format = "via [✨ $version](bold blue) " +``` + +## Dart + +The `dart` module shows the currently installed version of Dart. The module will be shown if any of the following conditions are met: + +- The current directory contains a file with `.dart` extension +- The current directory contains a `.dart_tool` directory +- The current directory contains a `pubspec.yaml` or `pubspec.lock` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dart` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v2.8.4` | The version of `dart` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[dart] +format = "via [🔰 $version](bold red) " +``` + +## Directory + +The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. + +When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option. + +For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | +| `style` | `"bold cyan"` | The style for the module. | +| `disabled` | `false` | Disables the `directory` module. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | + +
+This module has a few advanced configuration options that control how the directory is displayed. + +| Advanced Option | Default | Description | +| --------------------------- | ------- | ---------------------------------------------------------------------------------------- | +| `substitutions` | | A table of substitutions to be made to the path. | +| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. | +| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. | + +`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD. + +```toml +[directory.substitutions] +"/Volumes/network/path" = "/net" +"src/com/long/java/path" = "mypath" +``` + +`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`. + +
+ +### Variables + +| Variable | Example | Description | +| --------- | --------------------- | ----------------------------------- | +| path | `"D:/Projects"` | The current directory path | +| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[directory] +truncation_length = 8 +truncation_symbol = "…/" +``` + +## Docker Context + +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default`. + +### Options + +| Option | Default | Description | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | The format for the module. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | The style for the module. | +| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | +| `disabled` | `true` | Disables the `docker_context` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------------- | ------------------------------------ | +| context | `test_context` | The current docker context | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[docker_context] +format = "via [🐋 $context](blue bold)" +``` + +## Dotnet + +The `dotnet` module shows the relevant version of the .NET Core SDK for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK. + +This module will only be shown in your prompt when one or more of the following files are present in the current directory: + +- `global.json` +- `project.json` +- `Directory.Build.props` +- `Directory.Build.targets` +- `Packages.props` +- `*.sln` +- `*.csproj` +- `*.fsproj` +- `*.xproj` + +You'll also need the .NET Core SDK installed in order to use it correctly. + +Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options. + +The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. + +### Options + +| Option | Default | Description | +| ----------- | --------------------------------------- | -------------------------------------------------------- | +| `format` | `"[$symbol$version( 🎯 $tfm)]($style) "` | The format for the module. | +| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. | +| `heuristic` | `true` | Use faster version detection to keep starship snappy. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dotnet` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------------- | ------------------------------------------------------------------ | +| version | `v3.1.201` | The version of `dotnet` sdk | +| tfm | `netstandard2.0` | The Target Framework Moniker that the current project is targeting | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[dotnet] +symbol = "🥅 " +style = "green" +heuristic = false +``` + +## Elixir + +The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. The module will be shown if any of the following conditions are met: + +- The current directory contains a `mix.exs` file. + +### Options + +| Option | Default | Description | +| ---------- | --------------------------------------------------------- | --------------------------------------------------------------- | +| `symbol` | `"💧 "` | The symbol used before displaying the version of Elixir/Erlang. | +| `style` | `"bold purple"` | The style for the module. | +| `format` | `'via [$symbol$version \(OTP $otp_version\)]($style) '` | The format for the module elixir. | +| `disabled` | `false` | Disables the `elixir` module. | + +### Variables + +| Variable | Example | Description | +| ----------- | ------- | ------------------------------------ | +| version | `v1.10` | The version of `elixir` | +| otp_version | | The otp version of `elixir` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[elixir] +symbol = "🔮 " +``` + +## Elm + +The `elm` module shows the currently installed version of Elm. The module will be shown if any of the following conditions are met: + +- The current directory contains a `elm.json` file +- The current directory contains a `elm-package.json` file +- The current directory contains a `.elm-version` file +- The current directory contains a `elm-stuff` folder +- The current directory contains a `*.elm` files + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🌳 "` | A format string representing the symbol of Elm. | +| `style` | `"cyan bold"` | The style for the module. | +| `disabled` | `false` | Disables the `elm` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.19.1` | The version of `elm` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[elm] +format = "via [ $version](cyan bold) " +``` + +## Environment Variable + +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: + +- The `variable` configuration option matches an existing environment variable +- The `variable` configuration option is not defined, but the `default` configuration option is + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------ | ---------------------------------------------------------------------------- | +| `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. | +| `disabled` | `false` | Disables the `env_var` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------------------------------------- | ------------------------------------------ | +| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | `black bold dimmed` | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[env_var] +variable = "SHELL" +default = "unknown shell" +``` + +## Erlang + +The `erlang` module shows the currently installed version of Erlang/OTP. The module will be shown if any of the following conditions are met: + +- The current directory contains a `rebar.config` file. +- The current directory contains a `erlang.mk` file. + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | -------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before displaying the version of erlang. | +| `style` | `"bold red"` | The style for the module. | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `disabled` | `false` | Disables the `erlang` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v22.1.3` | The version of `erlang` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[erlang] +format = "via [e $version](bold red) " +``` + +## Gcloud + +The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. + +### Options + +| Option | Default | Description | +| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | +| `format` | `'on [$symbol$account(\($region\))]($style) '` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. | +| `region_aliases` | | Table of region aliases to display in addition to the GCP name. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `gcloud` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ----------------- | ------------------------------------------------------------------ | +| region | `us-central1` | The current GCP region | +| account | `foo@example.com` | The current GCP profile | +| project | | The current GCP project | +| active | `default` | The active config name written in `~/.config/gcloud/active_config` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Examples + +#### Display account and project + +```toml +# ~/.config/starship.toml + +[gcloud] +format = 'on [$symbol$account(\($project\))]($style) ' +``` + +#### Display active config name only + +```toml +# ~/.config/starship.toml + +[gcloud] +format = "[$symbol$active]($style) " +style = "bold yellow" +``` + +#### Display account and aliased region + +```toml +# ~/.config/starship.toml + +[gcloud] +symbol = "️🇬️ " +[gcloud.region_aliases] +us-central1 = "uc1" +asia-northeast1 = "an1" +``` + +## Git Branch + +The `git_branch` module shows the active branch of the repo in your current directory. + +### Options + +| Option | Default | Description | +| -------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- | +| `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. | +| `symbol` | `" "` | A format string representing the symbol of git branch. | +| `style` | `"bold purple"` | The style for the module. | +| `truncation_length` | `2^63 - 1` | Truncates a git branch to X graphemes. | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use `""` for no symbol. | +| `only_attached` | `false` | Only show the branch name when not in a detached HEAD state. | +| `disabled` | `false` | Disables the `git_branch` module. | + +### Variables + +| Variable | Example | Description | +| ------------- | -------- | ---------------------------------------------------------------------------------------------------- | +| branch | `master` | The current branch name, falls back to `HEAD` if there's no current branch (e.g. git detached HEAD). | +| remote_name | `origin` | The remote name. | +| remote_branch | `master` | The name of the branch tracked on `remote_name`. | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_branch] +symbol = "🌱 " +truncation_length = 4 +truncation_symbol = "" +``` + +## Git Commit + +The `git_commit` module shows the current commit hash and also the tag (if any) of the repo in your current directory. + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------ | ----------------------------------------------------- | +| `commit_hash_length` | `7` | The length of the displayed git commit hash. | +| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | The format for the module. | +| `style` | `"bold green"` | The style for the module. | +| `only_detached` | `true` | Only show git commit hash when in detached HEAD state | +| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. | +| `tag_symbol` | `"🏷 "` | Tag symbol prefixing the info shown | +| `disabled` | `false` | Disables the `git_commit` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ----------------------------------- | +| hash | `b703eb3` | The current git commit hash | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_commit] +commit_hash_length = 4 +tag_symbol = "🔖 " +``` + +## Git State + +The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too. + +### Options + +| Option | Default | Description | +| -------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `rebase` | `"REBASING"` | A format string displayed when a `rebase` is in progress. | +| `merge` | `"MERGING"` | A format string displayed when a `merge` is in progress. | +| `revert` | `"REVERTING"` | A format string displayed when a `revert` is in progress. | +| `cherry_pick` | `"CHERRY-PICKING"` | A format string displayed when a `cherry-pick` is in progress. | +| `bisect` | `"BISECTING"` | A format string displayed when a `bisect` is in progress. | +| `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"` | The style for the module. | +| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | The format for the module. | +| `disabled` | `false` | Disables the `git_state` module. | + +### Variables + +| Variable | Example | Description | +| ---------------- | ---------- | ----------------------------------- | +| state | `REBASING` | The current state of the repo | +| progress_current | `1` | The current operation progress | +| progress_total | `2` | The total operation progress | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_state] +format = '[\($state( $progress_current of $progress_total)\)]($style) ' +cherry_pick = "[🍒 PICKING](bold red)" +``` + +## Git Status + +The `git_status` module shows symbols representing the state of the repo in your current directory. + +### Options + +| Option | Default | Description | +| ------------ | ----------------------------------------------- | ----------------------------------- | +| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` | +| `conflicted` | `"="` | This branch has merge conflicts. | +| `ahead` | `"⇡"` | The format of `ahead` | +| `behind` | `"⇣"` | The format of `behind` | +| `diverged` | `"⇕"` | The format of `diverged` | +| `untracked` | `"?"` | The format of `untracked` | +| `stashed` | `"$"` | The format of `stashed` | +| `modified` | `"!"` | The format of `modified` | +| `staged` | `"+"` | The format of `staged` | +| `renamed` | `"»"` | The format of `renamed` | +| `deleted` | `"✘"` | The format of `deleted` | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `git_status` module. | + +### Variables + +The following variables can be used in `format`: + +| Variable | Description | +| -------------- | --------------------------------------------------------------------------------------------- | +| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` | +| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo | +| `conflicted` | Displays `conflicted` when this branch has merge conflicts. | +| `untracked` | Displays `untracked` when there are untracked files in the working directory. | +| `stashed` | Displays `stashed` when a stash exists for the local repository. | +| `modified` | Displays `modified` when there are file modifications in the working directory. | +| `staged` | Displays `staged` when a new file has been added to the staging area. | +| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | +| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| style\* | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +The following variables can be used in `diverged`: + +| Variable | Description | +| -------------- | ---------------------------------------------- | +| `ahead_count` | Number of commits ahead of the tracking branch | +| `behind_count` | Number of commits behind the tracking branch | + +The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`: + +| Variable | Description | +| -------- | ------------------------ | +| `count` | Show the number of files | + +### Example + +```toml +# ~/.config/starship.toml + +[git_status] +conflicted = "🏳" +ahead = "🏎💨" +behind = "😰" +diverged = "😵" +untracked = "🤷‍" +stashed = "📦" +modified = "📝" +staged = '[++\($count\)](green)' +renamed = "👅" +deleted = "🗑" +``` + +Show ahead/behind count of the branch being tracked + +```toml +# ~/.config/starship.toml + +[git_status] +ahead = "⇡${count}" +diverged = "⇕⇡${ahead_count}⇣${behind_count}" +behind = "⇣${count}" +``` + +## Golang + +The `golang` module shows the currently installed version of Golang. The module will be shown if any of the following conditions are met: + +- The current directory contains a `go.mod` file +- The current directory contains a `go.sum` file +- The current directory contains a `glide.yaml` file +- The current directory contains a `Gopkg.yml` file +- The current directory contains a `Gopkg.lock` file +- The current directory contains a `.go-version` file +- The current directory contains a `Godeps` directory +- The current directory contains a file with the `.go` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ---------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🐹 "` | A format string representing the symbol of Go. | +| `style` | `"bold cyan"` | The style for the module. | +| `disabled` | `false` | Disables the `golang` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v1.12.1` | The version of `go` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[golang] +format = "via [🏎💨 $version](bold cyan) " +``` + +## Helm + +The `helm` module shows the currently installed version of Helm. The module will be shown if any of the following conditions are met: + +- The current directory contains a `helmfile.yaml` file +- The current directory contains a `Chart.yaml` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"⎈ "` | A format string representing the symbol of Helm. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `helm` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v3.1.1` | The version of `helm` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[helm] +format = "via [⎈ $version](bold white) " +``` + +## Hostname + +The `hostname` module shows the system hostname. + +### Options + +| Option | Default | Description | +| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `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. | +| `style` | `"bold dimmed green"` | The style for the module. | +| `disabled` | `false` | Disables the `hostname` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +format = "on [$hostname](bold red) " +trim_at = ".companyname.com" +disabled = false +``` + +## Java + +The `java` module shows the currently installed version of Java. The module will be shown if any of the following conditions are met: + +- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file +- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension + +### Options + +| Option | Default | Description | +| ---------- | -------------------------------------- | ----------------------------------------------- | +| `format` | `"via [${symbol}${version}]($style) "` | The format for the module. | +| `symbol` | `"☕ "` | A format string representing the symbol of Java | +| `style` | `"red dimmed"` | The style for the module. | +| `disabled` | `false` | Disables the `java` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| version | `v14` | The version of `java` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[java] +symbol = "🌟 " +``` + +## Jobs + +The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. + +### Options + +| Option | Default | Description | +| ----------- | ----------------------------- | ------------------------------------------------ | +| `threshold` | `1` | Show number of jobs if exceeded. | +| `format` | `"[$symbol$number]($style) "` | The format for the module. | +| `symbol` | `"✦"` | A format string representing the number of jobs. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `jobs` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| number | `1` | The number of jobs | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[jobs] +symbol = "+ " +threshold = 4 +``` + +## Julia + +The `julia` module shows the currently installed version of Julia. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Project.toml` file +- The current directory contains a `Manifest.toml` file +- The current directory contains a file with the `.jl` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"ஃ "` | A format string representing the symbol of Julia. | +| `style` | `"bold purple"` | The style for the module. | +| `disabled` | `false` | Disables the `julia` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.4.0` | The version of `julia` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[julia] +symbol = "∴ " +``` + +## Kotlin + +The `kotlin` module shows the currently installed version of Kotlin. The module will be shown if any of the following conditions are met: + +- The current directory contains a `.kt` or a `.kts` file + +### Options + +| Option | Default | Description | +| --------------- | ---------------------------------- | ----------------------------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🅺 "` | A format string representing the symbol of Kotlin. | +| `style` | `"bold blue"` | The style for the module. | +| `kotlin_binary` | `"kotlin"` | Configures the kotlin binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `kotlin` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v1.4.21` | The version of `kotlin` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[kotlin] +symbol = "🅺 " +``` + +```toml +# ~/.config/starship.toml + +[kotlin] +# Uses the Kotlin Compiler binary to get the installed version +kotlin_binary = "kotlinc" +``` + +## Kubernetes + +Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | +| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. | +| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. | +| `style` | `"cyan bold"` | The style for the module. | +| `context_aliases` | | Table of context aliases to display. | +| `disabled` | `true` | Disables the `kubernetes` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------------------- | ---------------------------------------- | +| context | `starship-cluster` | The current kubernetes context | +| namespace | `starship-namespace` | If set, the current kubernetes namespace | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[kubernetes] +format = 'on [⛵ $context \($namespace\)](dimmed green) ' +disabled = false +[kubernetes.context_aliases] +"dev.local.cluster.k8s" = "dev" +``` + +## Line Break + +The `line_break` module separates the prompt into two lines. + +### Options + +| Option | Default | Description | +| ---------- | ------- | ------------------------------------------------------------------ | +| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | + +### Example + +```toml +# ~/.config/starship.toml + +[line_break] +disabled = true +``` + +## Lua + +The `lua` module shows the currently installed version of Lua. The module will be shown if any of the following conditions are met: + +- The current directory contains a `.lua-version` file +- The current directory contains a `lua` directory +- The current directory contains a file with the `.lua` extension + +### Options + +| Option | Default | Description | +| ------------ | ---------------------------------- | -------------------------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | +| `style` | `"bold blue"` | The style for the module. | +| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `lua` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v5.4.0` | The version of `lua` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[lua] +format = "via [🌕 $version](bold blue) " +``` + +## Memory Usage + +The `memory_usage` module shows current system memory and swap usage. + +By default the swap usage is displayed if the total system swap is non-zero. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------- | --------------------------------------------- | -------------------------------------------------------- | +| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | +| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | The format for the module. | +| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | +| `style` | `"bold dimmed white"` | The style for the module. | +| `disabled` | `true` | Disables the `memory_usage` module. | + +### Variables + +| Variable | Example | Description | +| ---------------- | ------------- | ------------------------------------------------------------------ | +| ram | `31GiB/65GiB` | The usage/total RAM of the current system memory. | +| ram_pct | `48%` | The percentage of the current system memory. | +| swap\*\* | `1GiB/4GiB` | The swap memory size of the current system swap memory file. | +| swap_pct\*\* | `77%` | The swap memory percentage of the current system swap memory file. | +| symbol | `🐏` | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string \*\*: The SWAP file information is only displayed if detected on the current system + +### Example + +```toml +# ~/.config/starship.toml + +[memory_usage] +disabled = false +threshold = -1 +symbol = " " +style = "bold dimmed green" +``` + +## Mercurial Branch + +The `hg_branch` module shows the active branch of the repo in your current directory. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `style` | `"bold purple"` | The style for the module. | +| `format` | `"on [$symbol$branch]($style) "` | The format for the module. | +| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `disabled` | `true` | Disables the `hg_branch` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| branch | `master` | The active mercurial branch | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[hg_branch] +format = "on [🌱 $branch](bold purple)" +truncation_length = 4 +truncation_symbol = "" +``` + +## Nim + +The `nim` module shows the currently installed version of Nim. The module will be shown if any of the following conditions are met: + +- The current directory contains a `nim.cfg` file +- The current directory contains a file with the `.nim` extension +- The current directory contains a file with the `.nims` extension +- The current directory contains a file with the `.nimble` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module | +| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `nim` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.2.0` | The version of `nimc` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nim] +style = "yellow" +symbol = "🎣 " +``` + +## Nix-shell + +The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment. + +### Options + +| Option | Default | Description | +| ------------ | ---------------------------------------------- | ----------------------------------------------------- | +| `format` | `'via [$symbol$state( \($name\))]($style) '` | The format for the module. | +| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | +| `style` | `"bold blue"` | The style for the module. | +| `impure_msg` | `"impure"` | A format string shown when the shell is impure. | +| `pure_msg` | `"pure"` | A format string shown when the shell is pure. | +| `disabled` | `false` | Disables the `nix_shell` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| state | `pure` | The state of the nix-shell | +| name | `lorri` | The name of the nix-shell | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nix_shell] +disabled = true +impure_msg = "[impure shell](bold red)" +pure_msg = "[pure shell](bold green)" +format = 'via [☃️ $state( \($name\))](bold blue) ' +``` + +## NodeJS + +The `nodejs` module shows the currently installed version of NodeJS. The module will be shown if any of the following conditions are met: + +- The current directory contains a `package.json` file +- The current directory contains a `.node-version` file +- The current directory contains a `node_modules` directory +- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension +- The current directory contains a file with the `.ts` extension + +### Options + +| Option | Default | Description | +| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. | +| `style` | `"bold green"` | The style for the module. | +| `disabled` | `false` | Disables the `nodejs` module. | +| `not_capable_style` | `bold red` | The style for the module when an engines property in Packages.json does not match the NodeJS version. | + +###  Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v13.12.0` | The version of `node` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nodejs] +format = "via [🤖 $version](bold green) " +``` + +## OCaml + +The `ocaml` module shows the currently installed version of OCaml. The module will be shown if any of the following conditions are met: + +- The current directory contains a file with `.opam` extension or `_opam` directory +- The current directory contains a `esy.lock` directory +- The current directory contains a `dune` or `dune-project` file +- The current directory contains a `jbuild` or `jbuild-ignore` file +- The current directory contains a `.merlin` file +- The current directory contains a file with `.ml`, `.mli`, `.re` or `.rei` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format string for the module. | +| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `ocaml` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v4.10.0` | The version of `ocaml` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[ocaml] +format = "via [🐪 $version]($style) " +``` + +## OpenStack + +The `openstack` module shows the current OpenStack cloud and project. The module only active when the `OS_CLOUD` env var is set, in which case it will read `clouds.yaml` file from any of the [default locations](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files). to fetch the current project in use. + +### Options + +| Option | Default | Description | +| ---------- | --------------------------------------------------- | -------------------------------------------------------------- | +| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `OpenStack` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| cloud | `corp` | The current OpenStack cloud | +| project | `dev` | The current OpenStack project | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[openstack] +format = "on [$symbol$cloud(\\($project\\))]($style) " +style = "bold yellow" +symbol = "☁️ " +``` + +## Package Version + +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages. + +- **npm** – The `npm` package version is extracted from the `package.json` present in the current directory +- **cargo** – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory +- **poetry** – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory +- **composer** – The `composer` package version is extracted from the `composer.json` present in the current directory +- **gradle** – The `gradle` package version is extracted from the `build.gradle` present +- **julia** - The package version is extracted from the `Project.toml` present +- **mix** - The `mix` package version is extracted from the `mix.exs` present +- **helm** - The `helm` chart version is extracted from the `Chart.yaml` present +- **maven** - The `maven` package version is extracted from the `pom.xml` present +- **meson** - The `meson` package version is extracted from the `meson.build` present + +> ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. + +### Options + +| Option | Default | Description | +| ----------------- | ---------------------------------- | ---------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | +| `style` | `"bold 208"` | The style for the module. | +| `display_private` | `false` | Enable displaying version for packages marked as private. | +| `disabled` | `false` | Disables the `package` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.0.0` | The version of your package | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[package] +format = "via [🎁 $version](208 bold) " +``` + +## Perl + +The `perl` module shows the currently installed version of Perl. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Makefile.PL` or `Build.PL` file +- The current directory contains a `cpanfile` or `cpanfile.snapshot` file +- The current directory contains a `META.json` file or `META.yml` file +- The current directory contains a `.perl-version` file +- The current directory contains a `.pl`, `.pm` or `.pod` + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format string for the module. | +| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | +| `style` | `"bold 149"` | The style for the module. | +| `disabled` | `false` | Disables the `perl` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v5.26.1` | The version of `perl` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +### Example + +```toml +# ~/.config/starship.toml + +[perl] +format = "via [🦪 $version]($style) " +``` + +## PHP + +The `php` module shows the currently installed version of PHP. The module will be shown if any of the following conditions are met: + +- The current directory contains a `composer.json` file +- The current directory contains a `.php-version` file +- The current directory contains a `.php` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | +| `style` | `"147 bold"` | The style for the module. | +| `disabled` | `false` | Disables the `php` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v7.3.8` | The version of `php` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[php] +format = "via [🔹 $version](147 bold) " +``` + +## PureScript + +The `purescript` module shows the currently installed version of PureScript version. The module will be shown if any of the following conditions are met: + +- The current directory contains a `spago.dhall` file +- The current directory contains a \*.purs files + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `purescript` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `0.13.5` | The version of `purescript` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[purescript] +format = "via [$symbol$version](bold white)" +``` + +## Python + +The `python` module shows the currently installed version of Python and the current Python virtual environment if one is activated. + +If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`. + +The module will be shown if any of the following conditions are met: + +- The current directory contains a `.python-version` file +- The current directory contains a `requirements.txt` file +- The current directory contains a `pyproject.toml` file +- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true) +- The current directory contains a `Pipfile` file +- The current directory contains a `tox.ini` file +- The current directory contains a `setup.py` file +- The current directory contains a `__init__.py` file +- A virtual environment is currently activated + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | The style for the module. | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | + +::: tip + +The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used. + +The default values and order for `python_binary` was chosen to first identify the Python version in a virtualenv/conda environments (which currently still add a `python`, no matter if it points to `python3` or `python2`). This has the side effect that if you still have a system Python 2 installed, it may be picked up before any Python 3 (at least on Linux Distros that always symlink `/usr/bin/python` to Python 2). If you do not work with Python 2 anymore but cannot remove the system Python 2, changing this to `"python3"` will hide any Python version 2, see example below. + +::: + +### Variables + +| Variable | Example | Description | +| ------------ | --------------- | ------------------------------------------ | +| version | `"v3.8.1"` | The version of `python` | +| symbol | `"🐍 "` | Mirrors the value of option `symbol` | +| style | `"yellow bold"` | Mirrors the value of option `style` | +| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | +| virtualenv | `"venv"` | The current `virtualenv` name | + + +### Example + +```toml +# ~/.config/starship.toml + +[python] +symbol = "👾 " +pyenv_version_name = true +``` + +```toml +# ~/.config/starship.toml + +[python] +# Only use the `python3` binary to get the version. +python_binary = "python3" +``` + +## Ruby + +The `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Gemfile` file +- The current directory contains a `.ruby-version` file +- The current directory contains a `.rb` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `ruby` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v2.5.1` | The version of `ruby` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[ruby] +symbol = "🔺 " +``` + +## Rust + +The `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Cargo.toml` file +- The current directory contains a file with the `.rs` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `rust` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ----------------- | ------------------------------------ | +| version | `v1.43.0-nightly` | The version of `rustc` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[rust] +format = "via [⚙️ $version](red bold)" +``` + +## SHLVL + +The `shlvl` module shows the current SHLVL ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. + +### Options + +| Option | Default | Description | +| ----------- | ---------------------------- | ----------------------------------------------------------- | +| `threshold` | `2` | Display threshold. | +| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. | +| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | +| `repeat` | `false` | Causes `symbol` to be repeated by the current SHLVL amount. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `true` | Disables the `shlvl` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| shlvl | `3` | The current value of SHLVL | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[shlvl] +disabled = false +format = "$shlvl level(s) down" +threshold = 3 +``` + +## Singularity + +The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set. + +### Options + +| Option | Default | Description | +| ---------- | -------------------------------- | ------------------------------------------------ | +| `format` | `'[$symbol\[$env\]]($style) '` | The format for the module. | +| `symbol` | `""` | A format string displayed before the image name. | +| `style` | `"bold dimmed blue"` | The style for the module. | +| `disabled` | `false` | Disables the `singularity` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------ | ------------------------------------ | +| env | `centos.img` | The current singularity image | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[singularity] +format = '[📦 \[$env\]]($style) ' +``` + +## Status + +The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: + +### Options + +| Option | Default | Description | +| ----------------------- | -------------------------- | ---------------------------------------------------- | +| `format` | `[$symbol$status]($style)` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | +| `style` | `"bold red"` | The style for the module. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | + +### Variables + +| Variable | Example | Description | +| -------------- | ------- | -------------------------------------------------------------------- | +| status | `127` | The exit code of the last command | +| int | `127` | The exit code of the last command | +| common_meaning | `ERROR` | Meaning of the code if not a signal | +| signal_number | `9` | Signal number corresponding to the exit code, only if signalled | +| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled | +| maybe_int | `7` | Contains the exit code number when no meaning has been found | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml + +# ~/.config/starship.toml + +[status] +style = "bg:blue" +symbol = "🔴" +format = '[\[$symbol $status_common_meaning$status_signal_name$status_maybe_int\]]($style) ' +map_symbol = true +disabled = false + +``` + +## Swift + +The `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Package.swift` file +- The current directory contains a file with the `.swift` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | The style for the module. | +| `disabled` | `false` | Disables the `swift` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v5.2.4` | The version of `swift` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[swift] +format = "via [🏎 $version](red bold)" +``` + +## Terraform + +The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). The module will be shown if any of the following conditions are met: + +- The current directory contains a `.terraform` folder +- Current directory contains a file with the `.tf` or `.hcl` extensions + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | +| `symbol` | `"💠 "` | A format string shown before the terraform workspace. | +| `style` | `"bold 105"` | The style for the module. | +| `disabled` | `false` | Disables the `terraform` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `terraform` | +| workspace | `default` | The current terraform workspace | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +#### With Version + +```toml +# ~/.config/starship.toml + +[terraform] +format = "[🏎💨 $version$workspace]($style) " +``` + +#### Without version + +```toml +# ~/.config/starship.toml + +[terraform] +format = "[🏎💨 $workspace]($style) " +``` + +## Time + +The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `format` | `"at [$time]($style) "` | The format string for the module. | +| `use_12hr` | `false` | Enables 12 hour formatting | +| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. | +| `style` | `"bold yellow"` | The style for the module time | +| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. | +| `disabled` | `true` | Disables the `time` module. | +| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | + +If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ----------------------------------- | +| time | `13:08:10` | The current time. | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[time] +disabled = false +format = '🕙[\[ $time \]]($style) ' +time_format = "%T" +utc_time_offset = "-5" +time_range = "10:00:00-14:00:00" +``` + +## Username + +The `username` module shows active user's username. The module will be shown if any of the following conditions are met: + +- The current user is root +- The current user isn't the same as the one that is logged in +- The user is currently connected as an SSH session +- The variable `show_always` is set to true + +::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. ::: + +### Options + +| Option | Default | Description | +| ------------- | ----------------------- | ------------------------------------- | +| `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. | +| `show_always` | `false` | Always shows the `username` module. | +| `disabled` | `false` | Disables the `username` module. | + +### Variables + +| Variable | Example | Description | +| -------- | ------------ | ------------------------------------------------------------------------------------------- | +| `style` | `"red bold"` | Mirrors the value of option `style_root` when root is logged in and `style_user` otherwise. | +| `user` | `"matchai"` | The currently logged-in user ID. | + +### Example + +```toml +# ~/.config/starship.toml + +[username] +style_user = "white bold" +style_root = "black bold" +format = "user: [$user]($style) " +disabled = false +show_always = true +``` + +## Zig + +The `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met: + +- The current directory contains a `.zig` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | The style for the module. | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `disabled` | `false` | Disables the `zig` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v0.6.0` | The version of `zig` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[zig] +symbol = "⚡️ " +``` + +## Custom commands + +The `custom` modules show the output of some arbitrary commands. + +These modules will be shown if any of the following conditions are met: + +- 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 + +::: tip + +Multiple custom modules can be defined by using a `.`. + +::: + +::: tip + +The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined. + +::: + +::: tip + +[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! + +::: + +### 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` | `""` | 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. | + +### Variables + +| Variable | Description | +| --------- | -------------------------------------- | +| output | The output of shell command in `shell` | +| symbol | Mirrors the value of option `symbol` | +| style\* | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +#### Custom command shell + +`shell` accepts a non-empty list of strings, where: + +- The first string is the path to the shell to use to execute the command. +- Other following arguments are passed to the shell. + +If unset, it will fallback to STARSHIP_SHELL and then to "sh" on Linux, and "cmd /C" on Windows. + +The `command` will be passed in on 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. + +```toml +shell = ["pwsh", "-Command", "-"] +``` + +::: warning Make sure your custom shell configuration exits gracefully + +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). + +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. + +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. + +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. + +::: + +### Example + +```toml +# ~/.config/starship.toml + +[custom.foo] +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters +when = """ test "$HOME" == "$PWD" """ +format = " transcending [$output]($style)" + +[custom.time] +command = "time /T" +files = ["*.pst"] +shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +``` diff --git a/docs/ko-KR/faq/README.md b/docs/ko-KR/faq/README.md new file mode 100644 index 000000000..9bb23bf93 --- /dev/null +++ b/docs/ko-KR/faq/README.md @@ -0,0 +1,92 @@ +# 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) +- **Shell**: [Fish Shell](https://fishshell.com/) + - **Configuration**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish) + - **Prompt**: [Starship](https://starship.rs/) + +## How do I get command completion as shown in the demo GIF? + +Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions). + +## Do top level `format` and `.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, `.disabled` is the preferred way to do so for these reasons: + +- Disabling modules is more explicit than omitting them from the top level `format` +- Newly created modules will be added to the prompt as Starship is updated + +## The docs say Starship is cross-shell. Why isn't my preferred shell supported? + +The way Starship is built, it should be possible to add support for virtually any shell. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used. + +Here's a small example getting Starship working with bash: + +```sh +# Get the status code from the last command executed +STATUS=$? + +# Get the number of jobs running. +NUM_JOBS=$(jobs -p | wc -l) + +# Set the prompt to the output of `starship prompt` +PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)" +``` + +The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#Command-Duration) and to ensure that Starship is compatible with pre-installed Bash configurations. + +For a list of all flags accepted by `starship prompt`, use the following command: + +```sh +starship prompt --help +``` + +The prompt will use as much context as is provided, but no flags are "required". + +## How do I run Starship on Linux distributions with older versions of glibc? + +If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`: + +```sh +curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl +``` + +## Why don't I see a glyph symbol in my prompt? + +The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that: + +- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/). +- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice. +- You are using a [Nerd Font](https://www.nerdfonts.com/). + +To test your system, run the following commands in a terminal: + +```sh +echo -e "\xf0\x9f\x90\x8d" +echo -e "\xee\x82\xa0" +``` + +The first line should produce a [snake emoji](https://emojipedia.org/snake/), while the second should produce a [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs). + +If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose) + +## How do I uninstall Starship? + +Starship is just as easy to uninstall as it is to install in the first place. + +1. Remove any lines in your shell config (e.g. `~/.bashrc`) used to initialize Starship. +1. Delete the Starship binary. + +If Starship was installed using a package manager, please refer to their docs for uninstallation instructions. + +If Starship was installed using the `curl | bash` script, the following command will delete the binary: + +```sh +# Locate and delete the starship binary +rm "$(which starship)" +``` diff --git a/docs/ko-KR/guide/README.md b/docs/ko-KR/guide/README.md new file mode 100644 index 000000000..74b5b1e69 --- /dev/null +++ b/docs/ko-KR/guide/README.md @@ -0,0 +1,272 @@ +

+ Starship – Cross-shell prompt +

+ +

+ GitHub Actions workflow status + Crates.io version + Packaging status
+ Chat on Discord + Follow @StarshipPrompt on Twitter +

+ +

+ Website + · + Installation + · + Configuration +

+ +

+ English +   + 日本語 +   + 繁體中文 +   + Русский +   + Deutsch +   + 简体中文 +   + Español +   + Français +

+ +

+ +Starship with iTerm2 and the Snazzy theme + +**The minimal, blazing-fast, and infinitely customizable prompt for any shell!** + +- **Fast:** it's fast – _really really_ fast! 🚀 +- **Customizable:** configure every aspect of your prompt. +- **Universal:** works on any shell, on any operating system. +- **Intelligent:** shows relevant information at a glance. +- **Feature rich:** support for all your favorite tools. +- **Easy:** quick to install – start using it in minutes. + +

+Explore the Starship docs  ▶ +

+ + + +## 🚀 Installation + +### Prerequisites + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). + +### Getting Started + +1. Install the **starship** binary: + + + #### Install Latest Version + + + ##### From prebuilt binary, with Shell: + + ```sh + curl -fsSL https://starship.rs/install.sh | bash + ``` + + + ##### From source on [crates.io](https://crates.io/): + + ```sh + cargo install starship + ``` + + + #### Install via Package Manager + + + ##### With [Homebrew](https://brew.sh/): + + ```sh + brew install starship + ``` + + + ##### With [Scoop](https://scoop.sh): + + ```powershell + scoop install starship + ``` + +1. Add the init script to your shell's config file: + + + #### Bash + + Add the following to the end of `~/.bashrc`: + + ```sh + # ~/.bashrc + + eval "$(starship init bash)" + ``` + + + #### Fish + + Add the following to the end of `~/.config/fish/config.fish`: + + ```sh + # ~/.config/fish/config.fish + + starship init fish | source + ``` + + + #### Zsh + + Add the following to the end of `~/.zshrc`: + + ```sh + # ~/.zshrc + + eval "$(starship init zsh)" + ``` + + + #### PowerShell + + Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. + + ```sh + Invoke-Expression (&starship init powershell) + ``` + + + #### Ion + + Add the following to the end of `~/.config/ion/initrc`: + + ```sh + # ~/.config/ion/initrc + + eval $(starship init ion) + ``` + +## 🤝 Contributing + +We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). + +If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/). + +If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋 + +### Code Contributors + +This project exists thanks to all the people who contribute. [[Contribute](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]. + + +### Financial Contributors + +Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)] + +#### Individuals + + + +#### Organizations + +Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)] + + + + + + + + + + + + +## 💭 Inspired By + +Please check out these previous works that helped inspire the creation of starship. 🙏 + +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts. + +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript. + +- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons. + +

+
+ Starship rocket icon +

+ +## 📝 License + +Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).
This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed. diff --git a/docs/ko-KR/migrating-to-0.45.0/README.md b/docs/ko-KR/migrating-to-0.45.0/README.md new file mode 100644 index 000000000..95a847bf2 --- /dev/null +++ b/docs/ko-KR/migrating-to-0.45.0/README.md @@ -0,0 +1,267 @@ +# Migrating to v0.45.0 + +Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization. + +This guide is intended to walk you through the breaking changes. + +## `prompt_order` has been replaced by a root-level `format` + +Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship. + +Starship v0.45.0 instead accepts a `format` value, allowing for customization of the prompt outside of the modules themselves. + +**Example pre-v0.45.0 configuration** + +```toml +prompt_order = [ + "username", + "hostname", + "directory", + "git_branch", + "git_commit", + "git_state", + "git_status", + "cmd_duration", + "custom", + "line_break", + "jobs", + "battery", + "time", + "character", +] +``` + +**Example v0.45.0 configuration** + +```toml +format = """\ + $username\ + $hostname\ + $directory\ + $git_branch\ + $git_commit\ + $git_state\ + $git_status\ + $cmd_duration\ + $custom\ + $line_break\ + $jobs\ + $battery\ + $time\ + $character\ + """ +``` + +## Module `prefix` and `suffix` have been replaced by `format` + +Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered. + +Starship v0.45.0 instead accepts a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output. + +**Example pre-v0.45.0 configuration** + +```toml +[cmd_duration] +prefix = "took " +``` + +**Example v0.45.0 configuration** + +```toml +[cmd_duration] +# $duration – The command duration (e.g. "15s") +# $style – The default style of the module (e.g. "bold yellow") +format = "took [$duration]($style) " +``` + +### Affected Modules + +#### Character + +| Removed Property | Replacement | +| ----------------------- | ---------------- | +| `symbol` | `success_symbol` | +| `use_symbol_for_status` | `error_symbol` | +| `style_success` | `success_symbol` | +| `style_failure` | `error_symbol` | + +**Changes to the Default Configuration** + +```diff +[character] +-- symbol = "❯" +-- error_symbol = "✖" +-- use_symbol_for_status = true +-- vicmd_symbol = "❮" +++ success_symbol = "[❯](bold green)" +++ error_symbol = "[❯](bold red)" +++ vicmd_symbol = "[❮](bold green)" +``` + +Previously, the `use_symbol_for_status` property was used to configure the prompt to show the `error_symbol` when the last command resulted in a non-zero status code. + +With the release of v0.45.0, we now always use `error_symbol` after non-zero status codes, unifying `use_symbol_for_status` and `error_symbol` properties. + +To configure the prompt to use the older `use_symbol_for_status = true` configuration, add the following to your config file: + +```toml +[character] +error_symbol = "[✖](bold red)" +``` + +*Note:* The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples. + +#### Command Duration + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | + +**Changes to the Default Configuration** + +```diff +[cmd_duration] +-- prefix = "took " +++ format = "took [$duration]($style) " +``` + +#### Directory + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | + +**Changes to the Default Configuration** + +```diff +[directory] +-- prefix = "in " +++ format = "[$path]($style)[$read_only]($read_only_style) " +``` + +#### Environment Variable + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[env_var] +-- prefix = "" +-- suffix = "" +++ format = "with [$env_value]($style) " +``` + +#### Git Commit + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[git_commit] +-- prefix = "(" +-- suffix = ")" +++ format = '[\($hash\)]($style) ' +``` + +#### Git Status + +| Removed Property | Replacement | +| ----------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | +| `show_sync_count` | `format` | + +**Changes to the Default Configuration** + +```diff +[git_status] +-- prefix = "[" +-- suffix = "]" +-- show_sync_count = false +++ format = '([\[$all_status$ahead_behind\]]($style) )' +``` + +Previously, the `show_sync_count` property was used to configure the prompt to show the number of commits the branch was ahead or behind the remote branch. + +With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`. + +To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file: + +```toml +[git_status] +ahead = "⇡${count}" +diverged = "⇕⇡${ahead_count}⇣${behind_count}" +behind = "⇣${count}" +``` + +#### Hostname + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[hostname] +-- prefix = "" +-- suffix = "" +++ format = "[$hostname]($style) in " +``` + +#### Singularity + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `label` | `format` | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[singularity] +-- prefix = "" +-- suffix = "" +++ format = '[$symbol\[$env\]]($style) ' +``` + +#### Time + +| Removed Property | Replacement | +| ---------------- | ------------- | +| `format` | `time_format` | + +**Changes to the Default Configuration** + +```diff +[time] +-- format = "🕙[ %T ]" +++ time_format = "%T" +++ format = "at 🕙[$time]($style) " +``` + +#### Custom Commands + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[custom.example] +-- prefix = "" +-- suffix = "" +++ format = "[$symbol$output]($style) " +``` diff --git a/docs/ko-KR/presets/README.md b/docs/ko-KR/presets/README.md new file mode 100644 index 000000000..746364fa2 --- /dev/null +++ b/docs/ko-KR/presets/README.md @@ -0,0 +1,89 @@ +# Presets + +Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊 + +## Nerd Font Symbols + +This preset doesn't change anything except for the symbols used for each module. If emojis aren't your thing, this might catch your eye! + +![Screenshot of Nerd Font Symbols preset](/presets/nerd-font-symbols.png) + +### Prerequisites + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font) + +### Configuration + +```toml +[aws] +symbol = " " + +[conda] +symbol = " " + +[dart] +symbol = " " + +[directory] +read_only = " " + +[docker] +symbol = " " + +[elixir] +symbol = " " + +[elm] +symbol = " " + +[git_branch] +symbol = " " + +[golang] +symbol = " " + +[haskell] +symbol = " " + +[hg_branch] +symbol = " " + +[java] +symbol = " " + +[julia] +symbol = " " + +[memory_usage] +symbol = " " + +[nim] +symbol = " " + +[nix_shell] +symbol = " " + +[nodejs] +symbol = " " + +[package] +symbol = " " + +[perl] +symbol = " " + +[php] +symbol = " " + +[python] +symbol = " " + +[ruby] +symbol = " " + +[rust] +symbol = " " + +[swift] +symbol = "ﯣ " +``` diff --git a/docs/nl-NL/README.md b/docs/nl-NL/README.md new file mode 100644 index 000000000..4767ca0b1 --- /dev/null +++ b/docs/nl-NL/README.md @@ -0,0 +1,112 @@ +--- +home: true +heroImage: /logo.svg +heroText: +tagline: The minimal, blazing-fast, and infinitely customizable prompt for any shell! +actionText: Get Started → +actionLink: ./guide/ +features: + - + title: Compatibility First + details: Works on the most common shells on the most common operating systems. Use it everywhere! + - + title: Rust-Powered + details: Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible. + - + title: Customizable + details: Every little detail is customizable to your liking, to make this prompt as minimal or feature-rich as you'd like it to be. +footer: ISC Licensed | Copyright © 2019-present Starship Contributors +#Used for the description meta tag, for SEO +metaTitle: "Starship: Cross-Shell Prompt" +description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and PowerShell. +--- + +
+ +
+ +### Quick Install + +1. Install the **starship** binary: + + + #### Install Latest Version + + With Shell: + + ```sh + curl -fsSL https://starship.rs/install.sh | bash + ``` + + + #### Install via Package Manager + + With [Homebrew](https://brew.sh/): + + ```sh + brew install starship + ``` + + With [Scoop](https://scoop.sh): + + ```powershell + scoop install starship + ``` + +1. Add the init script to your shell's config file: + + + #### Bash + + Add the following to the end of `~/.bashrc`: + + ```sh + # ~/.bashrc + + eval "$(starship init bash)" + ``` + + + #### Fish + + Add the following to the end of `~/.config/fish/config.fish`: + + ```sh + # ~/.config/fish/config.fish + + starship init fish | source + ``` + + + #### Zsh + + Add the following to the end of `~/.zshrc`: + + ```sh + # ~/.zshrc + + eval "$(starship init zsh)" + ``` + + + #### Powershell + + Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. + + ```sh + Invoke-Expression (&starship init powershell) + ``` + + + #### Ion + + Add the following to the end of `~/.config/ion/initrc`: + + ```sh + # ~/.config/ion/initrc + + eval $(starship init ion) + ``` diff --git a/docs/nl-NL/advanced-config/README.md b/docs/nl-NL/advanced-config/README.md new file mode 100644 index 000000000..1cf6ebb78 --- /dev/null +++ b/docs/nl-NL/advanced-config/README.md @@ -0,0 +1,93 @@ +# Advanced Configuration + +While Starship is a versatile shell, sometimes you need to do more than edit `starship.toml` to get it to do certain things. This page details some of the more advanced configuration techniques used in starship. + +::: warning + +The configurations in this section are subject to change in future releases of Starship. + +::: + +## Custom pre-prompt and pre-execution Commands in Bash + +Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure: + +- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do + +```bash +function blastoff(){ + echo "🚀" +} +starship_precmd_user_func="blastoff" +``` + +- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. + +```bash +function blastoff(){ + echo "🚀" +} +trap blastoff DEBUG # Trap DEBUG *before* running starship +eval $(starship init bash) +``` + +## Change Window Title + +Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`. + +First, define a window title change function (identical in bash and zsh): + +```bash +function set_win_title(){ + echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007" +} +``` + +You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). + +In `bash`, set this function to be the precmd starship function: + +```bash +starship_precmd_user_func="set_win_title" +``` + +In `zsh`, add this to the `precmd_functions` array: + +```bash +precmd_functions+=(set_win_title) +``` + +If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. + +For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`: + +```bash +function set_win_title(){ + echo -ne "\033]0; $(basename $PWD) \007" +} +starship_precmd_user_func="set_win_title" +``` + +## Style Strings + +Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: + + - `bold` + - `underline` + - `dimmed` + - `bg:` + - `fg:` + - `` + - `none` + +where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing , though this may change in the future. The order of words in the string does not matter. + +The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. + +A color specifier can be one of the following: + + - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). + - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). + - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). + +If multiple colors are specified for foreground/background, the last one in the string will take priority. diff --git a/docs/nl-NL/config/README.md b/docs/nl-NL/config/README.md new file mode 100644 index 000000000..286375e20 --- /dev/null +++ b/docs/nl-NL/config/README.md @@ -0,0 +1,2503 @@ +# Configuration + +To get started configuring starship, create the following 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: + +```toml +# Don't print a new line at the start of the prompt +add_newline = false + +# 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" + +# Disable the package module, hiding it from the prompt completely +[package] +disabled = true +``` + +You can change default `starship.toml` file location with `STARSHIP_CONFIG` environment variable: + +```sh +export STARSHIP_CONFIG=~/.starship +``` + +Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: + +```ps1 +$ENV:STARSHIP_CONFIG = "$HOME\.starship" +``` + +### 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: + +```sh +export STARSHIP_CACHE=~/.starship/cache +``` + +Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: + +```ps1 +$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" +``` + +### Terminology + +**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of NodeJS that is currently installed on your computer, if your current directory is a NodeJS project. + +**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 NodeJS. + +By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. + +### Format Strings + +Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. + +#### Variable + +A variable contains a `$` symbol followed by the name of the variable. The name of a variable only contains letters, numbers and `_`. + +For example: + +- `$version` is a format string with a variable named `version`. +- `$git_branch$git_commit` is a format string with two variables named `git_branch` and `git_commit`. +- `$git_branch $git_commit` has the two variables separated with a space. + +#### Text Group + +A text group is made up of two different parts. + +The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it. + +In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used style the first part. + +For example: + +- `[on](red bold)` will print a string `on` with bold text colored red. +- `[⬢ $version](bold green)` will print a symbol `⬢` followed by the content of variable `version`, with bold text colored green. +- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green. + +#### Style Strings + +Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). + +- `"fg:green bg:blue"` sets green text on a blue background +- `"bg:blue fg:bright-green"` sets bright green text on a blue background +- `"bold fg:27"` sets bold text with [ANSI color](https://i.stack.imgur.com/KTSQa.png) 27 +- `"underline bg:#bf5700"` sets underlined text on a burnt orange background +- `"bold italic fg:purple"` sets bold italic purple text +- `""` explicitly disables all styling + +Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics. + +#### Conditional Format Strings + +A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. + +For example: + +- `(@$region)` will show nothing if the variable `region` is `None`, otherwise `@` followed by the value of region. +- `(some text)` will always show nothing since there are no variables wrapped in the braces. +- When `$all` is a shortcut for `\[$a$b\]`, `($all)` will show nothing only if `$a` and `$b` are both `None`. This works the same as `(\[$a$b\] )`. + +#### Escapable characters + +The following symbols have special usage in a format string. If you want to print the following symbols, you have to escape them with a backslash (`\`). + +- \$ +- \\ +- [ +- ] +- ( +- ) + +Note that `toml` has [its own escape syntax](https://github.com/toml-lang/toml#user-content-string). It is recommended to use a literal string (`''`) in your config. If you want to use a basic string (`""`), pay attention to escape the backslash `\`. + +For example, when you want to print a `$` symbol on a new line, the following configs for `format` are equivalent: + +```toml +# with basic string +format = "\n\\$" + +# with multiline basic string +format = """ + +\\$""" + +# with literal string +format = ''' + +\$''' +``` + +## Prompt + +This is the list of prompt-wide configuration options. + +### Options + +| Option | Default | Description | +| -------------- | ------------------------------ | ----------------------------------------------------- | +| `format` | [link](#default-prompt-format) | Configure the format of the prompt. | +| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | +| `add_newline` | `true` | Add a new line before the start of the prompt. | + +### Example + +```toml +# ~/.config/starship.toml + +# Use custom format +format = """ +[┌───────────────────>](bold green) +[│](bold green)$directory$rust$package +[└─>](bold green) """ + +# Wait 10 milliseconds for starship to check files under the current directory. +scan_timeout = 10 + +# Disable the newline at the start of the prompt +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. The default is as shown: + +```toml +format = "$all" + +# Which is equivalent to +format = """ +$username\ +$hostname\ +$shlvl\ +$kubernetes\ +$directory\ +$git_branch\ +$git_commit\ +$git_state\ +$git_status\ +$hg_branch\ +$docker_context\ +$package\ +$cmake\ +$dart\ +$dotnet\ +$elixir\ +$elm\ +$erlang\ +$golang\ +$helm\ +$java\ +$julia\ +$kotlin\ +$nim\ +$nodejs\ +$ocaml\ +$perl\ +$php\ +$purescript\ +$python\ +$ruby\ +$rust\ +$swift\ +$terraform\ +$zig\ +$nix_shell\ +$conda\ +$memory_usage\ +$aws\ +$gcloud\ +$openstack\ +$env_var\ +$crystal\ +$custom\ +$cmd_duration\ +$line_break\ +$lua\ +$jobs\ +$battery\ +$time\ +$status\ +$character""" +``` + +## AWS + +The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. + +When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var. + +### Options + +| Option | Default | Description | +| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | +| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | +| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `AWS` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------------- | ------------------------------------ | +| region | `ap-northeast-1` | The current AWS region | +| profile | `astronauts` | The current AWS profile | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Examples + +#### Display everything + +```toml +# ~/.config/starship.toml + +[aws] +format = 'on [$symbol$profile(\($region\))]($style) ' +style = "bold blue" +symbol = "🅰 " +[aws.region_aliases] +ap-southeast-2 = "au" +us-east-1 = "va" +``` + +#### Display region + +```toml +# ~/.config/starship.toml + +[aws] +format = "on [$symbol$region]($style) " +style = "bold blue" +symbol = "🅰 " +[aws.region_aliases] +ap-southeast-2 = "au" +us-east-1 = "va" +``` + +#### Display profile + +```toml +# ~/.config/starship.toml + +[aws] +format = "on [$symbol$profile]($style) " +style = "bold blue" +symbol = "🅰 " +``` + +## Battery + +The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. + +### Options + +| Option | Default | Description | +| -------------------- | --------------------------------- | --------------------------------------------------- | +| `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. | +| `display` | [link](#battery-display) | Display threshold and style for the module. | +| `disabled` | `false` | Disables the `battery` module. | + + +### Example + +```toml +# ~/.config/starship.toml + +[battery] +full_symbol = "🔋" +charging_symbol = "⚡️" +discharging_symbol = "💀" +``` + +### Battery Display + +The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. The default is as shown: + +```toml +[[battery.display]] +threshold = 10 +style = "bold red" +``` + +#### Options + +The `display` option is an array of the following table. + +| Option | Description | +| ----------- | ----------------------------------------------- | +| `threshold` | The upper bound for the display option. | +| `style` | The style used if the display option is in use. | + +#### Example + +```toml +[[battery.display]] # "bold red" style when capacity is between 0% and 10% +threshold = 10 +style = "bold red" + +[[battery.display]] # "bold yellow" style when capacity is between 10% and 30% +threshold = 30 +style = "bold yellow" + +# when capacity is over 30%, the battery indicator will not be displayed + +``` + +## Character + +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. + +The character will tell you whether the last command was successful or not. It can do this in two ways: + +- changing color (`red`/`green`) +- changing shape (`❯`/`✖`) + +By default it only changes color. If you also want to change it's shape take a look at [this example](#with-custom-error-shape). + +### Options + +| Option | Default | Description | +| ---------------- | ------------------- | -------------------------------------------------------------------------------- | +| `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. | +| `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. | +| `vicmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | +| `disabled` | `false` | Disables the `character` module. | + +### Variables + +| Variable | Example | Description | +| -------- | ------- | --------------------------------------------------------------------- | +| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` | + +### Examples + +#### With custom error shape + +```toml +# ~/.config/starship.toml + +[character] +success_symbol = "[➜](bold green) " +error_symbol = "[✗](bold red) " +``` + +#### Without custom error shape + +```toml +# ~/.config/starship.toml + +[character] +success_symbol = "[➜](bold green) " +error_symbol = "[➜](bold red) " +``` + +#### With custom vim shape + +```toml +# ~/.config/starship.toml + +[character] +vicmd_symbol = "[V](bold green) " +``` + +## CMake + +The `cmake` module shows the currently installed version of CMake if any of the following conditions are met: + +- The current directory contains a `CMakeLists.txt` file +- The current directory contains a `CMakeCache.txt` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | -------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `cmake` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v3.17.3` | The version of cmake | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +## Command Duration + +The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. + +::: warning Do not hook the DEBUG trap in Bash + +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. + +::: + +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. + +### Options + +| Option | Default | Description | +| -------------------- | ----------------------------- | ---------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `show_notifications` | `false` | Show desktop notifications when command completes. | +| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | + +::: tip + +Showing desktop notifications requires starship to be built with `rust-notify` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. + +::: + +### Variables + +| Variable | Example | Description | +| --------- | -------- | --------------------------------------- | +| duration | `16m40s` | The time it took to execute the command | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[cmd_duration] +min_time = 500 +format = "underwent [$duration](bold yellow)" +``` + +## Conda + +The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set. + +::: tip + +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. + +::: + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. | +| `symbol` | `"🅒 "` | The symbol used before the environment name. | +| `style` | `"bold green"` | The style for the module. | +| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `disabled` | `false` | Disables the `conda` module. | + +### Variables + +| Variable | Example | Description | +| ----------- | ------------ | ------------------------------------ | +| environment | `astronauts` | The current conda environment | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[conda] +format = "[$symbol$environment](dimmed green) " +``` + +## Crystal + +The `crystal` module shows the currently installed version of Crystal. The module will be shown if any of the following conditions are met: + +- The current directory contains a `shard.yml` file +- The current directory contains a `.cr` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | The style for the module. | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `disabled` | `false` | Disables the `crystal` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.32.1` | The version of `crystal` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[crystal] +format = "via [✨ $version](bold blue) " +``` + +## Dart + +The `dart` module shows the currently installed version of Dart. The module will be shown if any of the following conditions are met: + +- The current directory contains a file with `.dart` extension +- The current directory contains a `.dart_tool` directory +- The current directory contains a `pubspec.yaml` or `pubspec.lock` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dart` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v2.8.4` | The version of `dart` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[dart] +format = "via [🔰 $version](bold red) " +``` + +## Directory + +The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. + +When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option. + +For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | +| `style` | `"bold cyan"` | The style for the module. | +| `disabled` | `false` | Disables the `directory` module. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | + +
+This module has a few advanced configuration options that control how the directory is displayed. + +| Advanced Option | Default | Description | +| --------------------------- | ------- | ---------------------------------------------------------------------------------------- | +| `substitutions` | | A table of substitutions to be made to the path. | +| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. | +| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. | + +`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD. + +```toml +[directory.substitutions] +"/Volumes/network/path" = "/net" +"src/com/long/java/path" = "mypath" +``` + +`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`. + +
+ +### Variables + +| Variable | Example | Description | +| --------- | --------------------- | ----------------------------------- | +| path | `"D:/Projects"` | The current directory path | +| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[directory] +truncation_length = 8 +truncation_symbol = "…/" +``` + +## Docker Context + +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default`. + +### Options + +| Option | Default | Description | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | The format for the module. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | The style for the module. | +| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | +| `disabled` | `true` | Disables the `docker_context` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------------- | ------------------------------------ | +| context | `test_context` | The current docker context | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[docker_context] +format = "via [🐋 $context](blue bold)" +``` + +## Dotnet + +The `dotnet` module shows the relevant version of the .NET Core SDK for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK. + +This module will only be shown in your prompt when one or more of the following files are present in the current directory: + +- `global.json` +- `project.json` +- `Directory.Build.props` +- `Directory.Build.targets` +- `Packages.props` +- `*.sln` +- `*.csproj` +- `*.fsproj` +- `*.xproj` + +You'll also need the .NET Core SDK installed in order to use it correctly. + +Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options. + +The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. + +### Options + +| Option | Default | Description | +| ----------- | --------------------------------------- | -------------------------------------------------------- | +| `format` | `"[$symbol$version( 🎯 $tfm)]($style) "` | The format for the module. | +| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. | +| `heuristic` | `true` | Use faster version detection to keep starship snappy. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dotnet` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------------- | ------------------------------------------------------------------ | +| version | `v3.1.201` | The version of `dotnet` sdk | +| tfm | `netstandard2.0` | The Target Framework Moniker that the current project is targeting | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[dotnet] +symbol = "🥅 " +style = "green" +heuristic = false +``` + +## Elixir + +The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. The module will be shown if any of the following conditions are met: + +- The current directory contains a `mix.exs` file. + +### Options + +| Option | Default | Description | +| ---------- | --------------------------------------------------------- | --------------------------------------------------------------- | +| `symbol` | `"💧 "` | The symbol used before displaying the version of Elixir/Erlang. | +| `style` | `"bold purple"` | The style for the module. | +| `format` | `'via [$symbol$version \(OTP $otp_version\)]($style) '` | The format for the module elixir. | +| `disabled` | `false` | Disables the `elixir` module. | + +### Variables + +| Variable | Example | Description | +| ----------- | ------- | ------------------------------------ | +| version | `v1.10` | The version of `elixir` | +| otp_version | | The otp version of `elixir` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[elixir] +symbol = "🔮 " +``` + +## Elm + +The `elm` module shows the currently installed version of Elm. The module will be shown if any of the following conditions are met: + +- The current directory contains a `elm.json` file +- The current directory contains a `elm-package.json` file +- The current directory contains a `.elm-version` file +- The current directory contains a `elm-stuff` folder +- The current directory contains a `*.elm` files + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🌳 "` | A format string representing the symbol of Elm. | +| `style` | `"cyan bold"` | The style for the module. | +| `disabled` | `false` | Disables the `elm` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.19.1` | The version of `elm` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[elm] +format = "via [ $version](cyan bold) " +``` + +## Environment Variable + +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: + +- The `variable` configuration option matches an existing environment variable +- The `variable` configuration option is not defined, but the `default` configuration option is + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------ | ---------------------------------------------------------------------------- | +| `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. | +| `disabled` | `false` | Disables the `env_var` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------------------------------------- | ------------------------------------------ | +| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | `black bold dimmed` | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[env_var] +variable = "SHELL" +default = "unknown shell" +``` + +## Erlang + +The `erlang` module shows the currently installed version of Erlang/OTP. The module will be shown if any of the following conditions are met: + +- The current directory contains a `rebar.config` file. +- The current directory contains a `erlang.mk` file. + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | -------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before displaying the version of erlang. | +| `style` | `"bold red"` | The style for the module. | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `disabled` | `false` | Disables the `erlang` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v22.1.3` | The version of `erlang` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[erlang] +format = "via [e $version](bold red) " +``` + +## Gcloud + +The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. + +### Options + +| Option | Default | Description | +| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | +| `format` | `'on [$symbol$account(\($region\))]($style) '` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. | +| `region_aliases` | | Table of region aliases to display in addition to the GCP name. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `gcloud` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ----------------- | ------------------------------------------------------------------ | +| region | `us-central1` | The current GCP region | +| account | `foo@example.com` | The current GCP profile | +| project | | The current GCP project | +| active | `default` | The active config name written in `~/.config/gcloud/active_config` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Examples + +#### Display account and project + +```toml +# ~/.config/starship.toml + +[gcloud] +format = 'on [$symbol$account(\($project\))]($style) ' +``` + +#### Display active config name only + +```toml +# ~/.config/starship.toml + +[gcloud] +format = "[$symbol$active]($style) " +style = "bold yellow" +``` + +#### Display account and aliased region + +```toml +# ~/.config/starship.toml + +[gcloud] +symbol = "️🇬️ " +[gcloud.region_aliases] +us-central1 = "uc1" +asia-northeast1 = "an1" +``` + +## Git Branch + +The `git_branch` module shows the active branch of the repo in your current directory. + +### Options + +| Option | Default | Description | +| -------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- | +| `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. | +| `symbol` | `" "` | A format string representing the symbol of git branch. | +| `style` | `"bold purple"` | The style for the module. | +| `truncation_length` | `2^63 - 1` | Truncates a git branch to X graphemes. | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use `""` for no symbol. | +| `only_attached` | `false` | Only show the branch name when not in a detached HEAD state. | +| `disabled` | `false` | Disables the `git_branch` module. | + +### Variables + +| Variable | Example | Description | +| ------------- | -------- | ---------------------------------------------------------------------------------------------------- | +| branch | `master` | The current branch name, falls back to `HEAD` if there's no current branch (e.g. git detached HEAD). | +| remote_name | `origin` | The remote name. | +| remote_branch | `master` | The name of the branch tracked on `remote_name`. | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_branch] +symbol = "🌱 " +truncation_length = 4 +truncation_symbol = "" +``` + +## Git Commit + +The `git_commit` module shows the current commit hash and also the tag (if any) of the repo in your current directory. + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------ | ----------------------------------------------------- | +| `commit_hash_length` | `7` | The length of the displayed git commit hash. | +| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | The format for the module. | +| `style` | `"bold green"` | The style for the module. | +| `only_detached` | `true` | Only show git commit hash when in detached HEAD state | +| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. | +| `tag_symbol` | `"🏷 "` | Tag symbol prefixing the info shown | +| `disabled` | `false` | Disables the `git_commit` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ----------------------------------- | +| hash | `b703eb3` | The current git commit hash | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_commit] +commit_hash_length = 4 +tag_symbol = "🔖 " +``` + +## Git State + +The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too. + +### Options + +| Option | Default | Description | +| -------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `rebase` | `"REBASING"` | A format string displayed when a `rebase` is in progress. | +| `merge` | `"MERGING"` | A format string displayed when a `merge` is in progress. | +| `revert` | `"REVERTING"` | A format string displayed when a `revert` is in progress. | +| `cherry_pick` | `"CHERRY-PICKING"` | A format string displayed when a `cherry-pick` is in progress. | +| `bisect` | `"BISECTING"` | A format string displayed when a `bisect` is in progress. | +| `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"` | The style for the module. | +| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | The format for the module. | +| `disabled` | `false` | Disables the `git_state` module. | + +### Variables + +| Variable | Example | Description | +| ---------------- | ---------- | ----------------------------------- | +| state | `REBASING` | The current state of the repo | +| progress_current | `1` | The current operation progress | +| progress_total | `2` | The total operation progress | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_state] +format = '[\($state( $progress_current of $progress_total)\)]($style) ' +cherry_pick = "[🍒 PICKING](bold red)" +``` + +## Git Status + +The `git_status` module shows symbols representing the state of the repo in your current directory. + +### Options + +| Option | Default | Description | +| ------------ | ----------------------------------------------- | ----------------------------------- | +| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` | +| `conflicted` | `"="` | This branch has merge conflicts. | +| `ahead` | `"⇡"` | The format of `ahead` | +| `behind` | `"⇣"` | The format of `behind` | +| `diverged` | `"⇕"` | The format of `diverged` | +| `untracked` | `"?"` | The format of `untracked` | +| `stashed` | `"$"` | The format of `stashed` | +| `modified` | `"!"` | The format of `modified` | +| `staged` | `"+"` | The format of `staged` | +| `renamed` | `"»"` | The format of `renamed` | +| `deleted` | `"✘"` | The format of `deleted` | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `git_status` module. | + +### Variables + +The following variables can be used in `format`: + +| Variable | Description | +| -------------- | --------------------------------------------------------------------------------------------- | +| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` | +| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo | +| `conflicted` | Displays `conflicted` when this branch has merge conflicts. | +| `untracked` | Displays `untracked` when there are untracked files in the working directory. | +| `stashed` | Displays `stashed` when a stash exists for the local repository. | +| `modified` | Displays `modified` when there are file modifications in the working directory. | +| `staged` | Displays `staged` when a new file has been added to the staging area. | +| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | +| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| style\* | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +The following variables can be used in `diverged`: + +| Variable | Description | +| -------------- | ---------------------------------------------- | +| `ahead_count` | Number of commits ahead of the tracking branch | +| `behind_count` | Number of commits behind the tracking branch | + +The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`: + +| Variable | Description | +| -------- | ------------------------ | +| `count` | Show the number of files | + +### Example + +```toml +# ~/.config/starship.toml + +[git_status] +conflicted = "🏳" +ahead = "🏎💨" +behind = "😰" +diverged = "😵" +untracked = "🤷‍" +stashed = "📦" +modified = "📝" +staged = '[++\($count\)](green)' +renamed = "👅" +deleted = "🗑" +``` + +Show ahead/behind count of the branch being tracked + +```toml +# ~/.config/starship.toml + +[git_status] +ahead = "⇡${count}" +diverged = "⇕⇡${ahead_count}⇣${behind_count}" +behind = "⇣${count}" +``` + +## Golang + +The `golang` module shows the currently installed version of Golang. The module will be shown if any of the following conditions are met: + +- The current directory contains a `go.mod` file +- The current directory contains a `go.sum` file +- The current directory contains a `glide.yaml` file +- The current directory contains a `Gopkg.yml` file +- The current directory contains a `Gopkg.lock` file +- The current directory contains a `.go-version` file +- The current directory contains a `Godeps` directory +- The current directory contains a file with the `.go` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ---------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🐹 "` | A format string representing the symbol of Go. | +| `style` | `"bold cyan"` | The style for the module. | +| `disabled` | `false` | Disables the `golang` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v1.12.1` | The version of `go` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[golang] +format = "via [🏎💨 $version](bold cyan) " +``` + +## Helm + +The `helm` module shows the currently installed version of Helm. The module will be shown if any of the following conditions are met: + +- The current directory contains a `helmfile.yaml` file +- The current directory contains a `Chart.yaml` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"⎈ "` | A format string representing the symbol of Helm. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `helm` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v3.1.1` | The version of `helm` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[helm] +format = "via [⎈ $version](bold white) " +``` + +## Hostname + +The `hostname` module shows the system hostname. + +### Options + +| Option | Default | Description | +| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `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. | +| `style` | `"bold dimmed green"` | The style for the module. | +| `disabled` | `false` | Disables the `hostname` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +format = "on [$hostname](bold red) " +trim_at = ".companyname.com" +disabled = false +``` + +## Java + +The `java` module shows the currently installed version of Java. The module will be shown if any of the following conditions are met: + +- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file +- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension + +### Options + +| Option | Default | Description | +| ---------- | -------------------------------------- | ----------------------------------------------- | +| `format` | `"via [${symbol}${version}]($style) "` | The format for the module. | +| `symbol` | `"☕ "` | A format string representing the symbol of Java | +| `style` | `"red dimmed"` | The style for the module. | +| `disabled` | `false` | Disables the `java` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| version | `v14` | The version of `java` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[java] +symbol = "🌟 " +``` + +## Jobs + +The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. + +### Options + +| Option | Default | Description | +| ----------- | ----------------------------- | ------------------------------------------------ | +| `threshold` | `1` | Show number of jobs if exceeded. | +| `format` | `"[$symbol$number]($style) "` | The format for the module. | +| `symbol` | `"✦"` | A format string representing the number of jobs. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `jobs` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| number | `1` | The number of jobs | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[jobs] +symbol = "+ " +threshold = 4 +``` + +## Julia + +The `julia` module shows the currently installed version of Julia. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Project.toml` file +- The current directory contains a `Manifest.toml` file +- The current directory contains a file with the `.jl` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"ஃ "` | A format string representing the symbol of Julia. | +| `style` | `"bold purple"` | The style for the module. | +| `disabled` | `false` | Disables the `julia` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.4.0` | The version of `julia` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[julia] +symbol = "∴ " +``` + +## Kotlin + +The `kotlin` module shows the currently installed version of Kotlin. The module will be shown if any of the following conditions are met: + +- The current directory contains a `.kt` or a `.kts` file + +### Options + +| Option | Default | Description | +| --------------- | ---------------------------------- | ----------------------------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🅺 "` | A format string representing the symbol of Kotlin. | +| `style` | `"bold blue"` | The style for the module. | +| `kotlin_binary` | `"kotlin"` | Configures the kotlin binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `kotlin` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v1.4.21` | The version of `kotlin` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[kotlin] +symbol = "🅺 " +``` + +```toml +# ~/.config/starship.toml + +[kotlin] +# Uses the Kotlin Compiler binary to get the installed version +kotlin_binary = "kotlinc" +``` + +## Kubernetes + +Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | +| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. | +| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. | +| `style` | `"cyan bold"` | The style for the module. | +| `context_aliases` | | Table of context aliases to display. | +| `disabled` | `true` | Disables the `kubernetes` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------------------- | ---------------------------------------- | +| context | `starship-cluster` | The current kubernetes context | +| namespace | `starship-namespace` | If set, the current kubernetes namespace | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[kubernetes] +format = 'on [⛵ $context \($namespace\)](dimmed green) ' +disabled = false +[kubernetes.context_aliases] +"dev.local.cluster.k8s" = "dev" +``` + +## Line Break + +The `line_break` module separates the prompt into two lines. + +### Options + +| Option | Default | Description | +| ---------- | ------- | ------------------------------------------------------------------ | +| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | + +### Example + +```toml +# ~/.config/starship.toml + +[line_break] +disabled = true +``` + +## Lua + +The `lua` module shows the currently installed version of Lua. The module will be shown if any of the following conditions are met: + +- The current directory contains a `.lua-version` file +- The current directory contains a `lua` directory +- The current directory contains a file with the `.lua` extension + +### Options + +| Option | Default | Description | +| ------------ | ---------------------------------- | -------------------------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | +| `style` | `"bold blue"` | The style for the module. | +| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `lua` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v5.4.0` | The version of `lua` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[lua] +format = "via [🌕 $version](bold blue) " +``` + +## Memory Usage + +The `memory_usage` module shows current system memory and swap usage. + +By default the swap usage is displayed if the total system swap is non-zero. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------- | --------------------------------------------- | -------------------------------------------------------- | +| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | +| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | The format for the module. | +| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | +| `style` | `"bold dimmed white"` | The style for the module. | +| `disabled` | `true` | Disables the `memory_usage` module. | + +### Variables + +| Variable | Example | Description | +| ---------------- | ------------- | ------------------------------------------------------------------ | +| ram | `31GiB/65GiB` | The usage/total RAM of the current system memory. | +| ram_pct | `48%` | The percentage of the current system memory. | +| swap\*\* | `1GiB/4GiB` | The swap memory size of the current system swap memory file. | +| swap_pct\*\* | `77%` | The swap memory percentage of the current system swap memory file. | +| symbol | `🐏` | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string \*\*: The SWAP file information is only displayed if detected on the current system + +### Example + +```toml +# ~/.config/starship.toml + +[memory_usage] +disabled = false +threshold = -1 +symbol = " " +style = "bold dimmed green" +``` + +## Mercurial Branch + +The `hg_branch` module shows the active branch of the repo in your current directory. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `style` | `"bold purple"` | The style for the module. | +| `format` | `"on [$symbol$branch]($style) "` | The format for the module. | +| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `disabled` | `true` | Disables the `hg_branch` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| branch | `master` | The active mercurial branch | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[hg_branch] +format = "on [🌱 $branch](bold purple)" +truncation_length = 4 +truncation_symbol = "" +``` + +## Nim + +The `nim` module shows the currently installed version of Nim. The module will be shown if any of the following conditions are met: + +- The current directory contains a `nim.cfg` file +- The current directory contains a file with the `.nim` extension +- The current directory contains a file with the `.nims` extension +- The current directory contains a file with the `.nimble` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module | +| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `nim` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.2.0` | The version of `nimc` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nim] +style = "yellow" +symbol = "🎣 " +``` + +## Nix-shell + +The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment. + +### Options + +| Option | Default | Description | +| ------------ | ---------------------------------------------- | ----------------------------------------------------- | +| `format` | `'via [$symbol$state( \($name\))]($style) '` | The format for the module. | +| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | +| `style` | `"bold blue"` | The style for the module. | +| `impure_msg` | `"impure"` | A format string shown when the shell is impure. | +| `pure_msg` | `"pure"` | A format string shown when the shell is pure. | +| `disabled` | `false` | Disables the `nix_shell` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| state | `pure` | The state of the nix-shell | +| name | `lorri` | The name of the nix-shell | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nix_shell] +disabled = true +impure_msg = "[impure shell](bold red)" +pure_msg = "[pure shell](bold green)" +format = 'via [☃️ $state( \($name\))](bold blue) ' +``` + +## NodeJS + +The `nodejs` module shows the currently installed version of NodeJS. The module will be shown if any of the following conditions are met: + +- The current directory contains a `package.json` file +- The current directory contains a `.node-version` file +- The current directory contains a `node_modules` directory +- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension +- The current directory contains a file with the `.ts` extension + +### Options + +| Option | Default | Description | +| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. | +| `style` | `"bold green"` | The style for the module. | +| `disabled` | `false` | Disables the `nodejs` module. | +| `not_capable_style` | `bold red` | The style for the module when an engines property in Packages.json does not match the NodeJS version. | + +###  Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v13.12.0` | The version of `node` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nodejs] +format = "via [🤖 $version](bold green) " +``` + +## OCaml + +The `ocaml` module shows the currently installed version of OCaml. The module will be shown if any of the following conditions are met: + +- The current directory contains a file with `.opam` extension or `_opam` directory +- The current directory contains a `esy.lock` directory +- The current directory contains a `dune` or `dune-project` file +- The current directory contains a `jbuild` or `jbuild-ignore` file +- The current directory contains a `.merlin` file +- The current directory contains a file with `.ml`, `.mli`, `.re` or `.rei` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format string for the module. | +| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `ocaml` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v4.10.0` | The version of `ocaml` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[ocaml] +format = "via [🐪 $version]($style) " +``` + +## OpenStack + +The `openstack` module shows the current OpenStack cloud and project. The module only active when the `OS_CLOUD` env var is set, in which case it will read `clouds.yaml` file from any of the [default locations](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files). to fetch the current project in use. + +### Options + +| Option | Default | Description | +| ---------- | --------------------------------------------------- | -------------------------------------------------------------- | +| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `OpenStack` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| cloud | `corp` | The current OpenStack cloud | +| project | `dev` | The current OpenStack project | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[openstack] +format = "on [$symbol$cloud(\\($project\\))]($style) " +style = "bold yellow" +symbol = "☁️ " +``` + +## Package Version + +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages. + +- **npm** – The `npm` package version is extracted from the `package.json` present in the current directory +- **cargo** – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory +- **poetry** – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory +- **composer** – The `composer` package version is extracted from the `composer.json` present in the current directory +- **gradle** – The `gradle` package version is extracted from the `build.gradle` present +- **julia** - The package version is extracted from the `Project.toml` present +- **mix** - The `mix` package version is extracted from the `mix.exs` present +- **helm** - The `helm` chart version is extracted from the `Chart.yaml` present +- **maven** - The `maven` package version is extracted from the `pom.xml` present +- **meson** - The `meson` package version is extracted from the `meson.build` present + +> ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. + +### Options + +| Option | Default | Description | +| ----------------- | ---------------------------------- | ---------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | +| `style` | `"bold 208"` | The style for the module. | +| `display_private` | `false` | Enable displaying version for packages marked as private. | +| `disabled` | `false` | Disables the `package` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.0.0` | The version of your package | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[package] +format = "via [🎁 $version](208 bold) " +``` + +## Perl + +The `perl` module shows the currently installed version of Perl. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Makefile.PL` or `Build.PL` file +- The current directory contains a `cpanfile` or `cpanfile.snapshot` file +- The current directory contains a `META.json` file or `META.yml` file +- The current directory contains a `.perl-version` file +- The current directory contains a `.pl`, `.pm` or `.pod` + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format string for the module. | +| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | +| `style` | `"bold 149"` | The style for the module. | +| `disabled` | `false` | Disables the `perl` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v5.26.1` | The version of `perl` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +### Example + +```toml +# ~/.config/starship.toml + +[perl] +format = "via [🦪 $version]($style) " +``` + +## PHP + +The `php` module shows the currently installed version of PHP. The module will be shown if any of the following conditions are met: + +- The current directory contains a `composer.json` file +- The current directory contains a `.php-version` file +- The current directory contains a `.php` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | +| `style` | `"147 bold"` | The style for the module. | +| `disabled` | `false` | Disables the `php` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v7.3.8` | The version of `php` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[php] +format = "via [🔹 $version](147 bold) " +``` + +## PureScript + +The `purescript` module shows the currently installed version of PureScript version. The module will be shown if any of the following conditions are met: + +- The current directory contains a `spago.dhall` file +- The current directory contains a \*.purs files + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `purescript` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `0.13.5` | The version of `purescript` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[purescript] +format = "via [$symbol$version](bold white)" +``` + +## Python + +The `python` module shows the currently installed version of Python and the current Python virtual environment if one is activated. + +If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`. + +The module will be shown if any of the following conditions are met: + +- The current directory contains a `.python-version` file +- The current directory contains a `requirements.txt` file +- The current directory contains a `pyproject.toml` file +- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true) +- The current directory contains a `Pipfile` file +- The current directory contains a `tox.ini` file +- The current directory contains a `setup.py` file +- The current directory contains a `__init__.py` file +- A virtual environment is currently activated + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | The style for the module. | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | + +::: tip + +The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used. + +The default values and order for `python_binary` was chosen to first identify the Python version in a virtualenv/conda environments (which currently still add a `python`, no matter if it points to `python3` or `python2`). This has the side effect that if you still have a system Python 2 installed, it may be picked up before any Python 3 (at least on Linux Distros that always symlink `/usr/bin/python` to Python 2). If you do not work with Python 2 anymore but cannot remove the system Python 2, changing this to `"python3"` will hide any Python version 2, see example below. + +::: + +### Variables + +| Variable | Example | Description | +| ------------ | --------------- | ------------------------------------------ | +| version | `"v3.8.1"` | The version of `python` | +| symbol | `"🐍 "` | Mirrors the value of option `symbol` | +| style | `"yellow bold"` | Mirrors the value of option `style` | +| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | +| virtualenv | `"venv"` | The current `virtualenv` name | + + +### Example + +```toml +# ~/.config/starship.toml + +[python] +symbol = "👾 " +pyenv_version_name = true +``` + +```toml +# ~/.config/starship.toml + +[python] +# Only use the `python3` binary to get the version. +python_binary = "python3" +``` + +## Ruby + +The `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Gemfile` file +- The current directory contains a `.ruby-version` file +- The current directory contains a `.rb` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `ruby` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v2.5.1` | The version of `ruby` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[ruby] +symbol = "🔺 " +``` + +## Rust + +The `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Cargo.toml` file +- The current directory contains a file with the `.rs` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `rust` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ----------------- | ------------------------------------ | +| version | `v1.43.0-nightly` | The version of `rustc` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[rust] +format = "via [⚙️ $version](red bold)" +``` + +## SHLVL + +The `shlvl` module shows the current SHLVL ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. + +### Options + +| Option | Default | Description | +| ----------- | ---------------------------- | ----------------------------------------------------------- | +| `threshold` | `2` | Display threshold. | +| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. | +| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | +| `repeat` | `false` | Causes `symbol` to be repeated by the current SHLVL amount. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `true` | Disables the `shlvl` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| shlvl | `3` | The current value of SHLVL | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[shlvl] +disabled = false +format = "$shlvl level(s) down" +threshold = 3 +``` + +## Singularity + +The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set. + +### Options + +| Option | Default | Description | +| ---------- | -------------------------------- | ------------------------------------------------ | +| `format` | `'[$symbol\[$env\]]($style) '` | The format for the module. | +| `symbol` | `""` | A format string displayed before the image name. | +| `style` | `"bold dimmed blue"` | The style for the module. | +| `disabled` | `false` | Disables the `singularity` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------ | ------------------------------------ | +| env | `centos.img` | The current singularity image | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[singularity] +format = '[📦 \[$env\]]($style) ' +``` + +## Status + +The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: + +### Options + +| Option | Default | Description | +| ----------------------- | -------------------------- | ---------------------------------------------------- | +| `format` | `[$symbol$status]($style)` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | +| `style` | `"bold red"` | The style for the module. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | + +### Variables + +| Variable | Example | Description | +| -------------- | ------- | -------------------------------------------------------------------- | +| status | `127` | The exit code of the last command | +| int | `127` | The exit code of the last command | +| common_meaning | `ERROR` | Meaning of the code if not a signal | +| signal_number | `9` | Signal number corresponding to the exit code, only if signalled | +| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled | +| maybe_int | `7` | Contains the exit code number when no meaning has been found | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml + +# ~/.config/starship.toml + +[status] +style = "bg:blue" +symbol = "🔴" +format = '[\[$symbol $status_common_meaning$status_signal_name$status_maybe_int\]]($style) ' +map_symbol = true +disabled = false + +``` + +## Swift + +The `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Package.swift` file +- The current directory contains a file with the `.swift` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | The style for the module. | +| `disabled` | `false` | Disables the `swift` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v5.2.4` | The version of `swift` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[swift] +format = "via [🏎 $version](red bold)" +``` + +## Terraform + +The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). The module will be shown if any of the following conditions are met: + +- The current directory contains a `.terraform` folder +- Current directory contains a file with the `.tf` or `.hcl` extensions + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | +| `symbol` | `"💠 "` | A format string shown before the terraform workspace. | +| `style` | `"bold 105"` | The style for the module. | +| `disabled` | `false` | Disables the `terraform` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `terraform` | +| workspace | `default` | The current terraform workspace | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +#### With Version + +```toml +# ~/.config/starship.toml + +[terraform] +format = "[🏎💨 $version$workspace]($style) " +``` + +#### Without version + +```toml +# ~/.config/starship.toml + +[terraform] +format = "[🏎💨 $workspace]($style) " +``` + +## Time + +The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `format` | `"at [$time]($style) "` | The format string for the module. | +| `use_12hr` | `false` | Enables 12 hour formatting | +| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. | +| `style` | `"bold yellow"` | The style for the module time | +| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. | +| `disabled` | `true` | Disables the `time` module. | +| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | + +If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ----------------------------------- | +| time | `13:08:10` | The current time. | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[time] +disabled = false +format = '🕙[\[ $time \]]($style) ' +time_format = "%T" +utc_time_offset = "-5" +time_range = "10:00:00-14:00:00" +``` + +## Username + +The `username` module shows active user's username. The module will be shown if any of the following conditions are met: + +- The current user is root +- The current user isn't the same as the one that is logged in +- The user is currently connected as an SSH session +- The variable `show_always` is set to true + +::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. ::: + +### Options + +| Option | Default | Description | +| ------------- | ----------------------- | ------------------------------------- | +| `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. | +| `show_always` | `false` | Always shows the `username` module. | +| `disabled` | `false` | Disables the `username` module. | + +### Variables + +| Variable | Example | Description | +| -------- | ------------ | ------------------------------------------------------------------------------------------- | +| `style` | `"red bold"` | Mirrors the value of option `style_root` when root is logged in and `style_user` otherwise. | +| `user` | `"matchai"` | The currently logged-in user ID. | + +### Example + +```toml +# ~/.config/starship.toml + +[username] +style_user = "white bold" +style_root = "black bold" +format = "user: [$user]($style) " +disabled = false +show_always = true +``` + +## Zig + +The `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met: + +- The current directory contains a `.zig` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | The style for the module. | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `disabled` | `false` | Disables the `zig` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v0.6.0` | The version of `zig` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[zig] +symbol = "⚡️ " +``` + +## Custom commands + +The `custom` modules show the output of some arbitrary commands. + +These modules will be shown if any of the following conditions are met: + +- 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 + +::: tip + +Multiple custom modules can be defined by using a `.`. + +::: + +::: tip + +The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined. + +::: + +::: tip + +[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! + +::: + +### 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` | `""` | 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. | + +### Variables + +| Variable | Description | +| --------- | -------------------------------------- | +| output | The output of shell command in `shell` | +| symbol | Mirrors the value of option `symbol` | +| style\* | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +#### Custom command shell + +`shell` accepts a non-empty list of strings, where: + +- The first string is the path to the shell to use to execute the command. +- Other following arguments are passed to the shell. + +If unset, it will fallback to STARSHIP_SHELL and then to "sh" on Linux, and "cmd /C" on Windows. + +The `command` will be passed in on 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. + +```toml +shell = ["pwsh", "-Command", "-"] +``` + +::: warning Make sure your custom shell configuration exits gracefully + +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). + +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. + +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. + +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. + +::: + +### Example + +```toml +# ~/.config/starship.toml + +[custom.foo] +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters +when = """ test "$HOME" == "$PWD" """ +format = " transcending [$output]($style)" + +[custom.time] +command = "time /T" +files = ["*.pst"] +shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +``` diff --git a/docs/nl-NL/faq/README.md b/docs/nl-NL/faq/README.md new file mode 100644 index 000000000..9bb23bf93 --- /dev/null +++ b/docs/nl-NL/faq/README.md @@ -0,0 +1,92 @@ +# 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) +- **Shell**: [Fish Shell](https://fishshell.com/) + - **Configuration**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish) + - **Prompt**: [Starship](https://starship.rs/) + +## How do I get command completion as shown in the demo GIF? + +Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions). + +## Do top level `format` and `.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, `.disabled` is the preferred way to do so for these reasons: + +- Disabling modules is more explicit than omitting them from the top level `format` +- Newly created modules will be added to the prompt as Starship is updated + +## The docs say Starship is cross-shell. Why isn't my preferred shell supported? + +The way Starship is built, it should be possible to add support for virtually any shell. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used. + +Here's a small example getting Starship working with bash: + +```sh +# Get the status code from the last command executed +STATUS=$? + +# Get the number of jobs running. +NUM_JOBS=$(jobs -p | wc -l) + +# Set the prompt to the output of `starship prompt` +PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)" +``` + +The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#Command-Duration) and to ensure that Starship is compatible with pre-installed Bash configurations. + +For a list of all flags accepted by `starship prompt`, use the following command: + +```sh +starship prompt --help +``` + +The prompt will use as much context as is provided, but no flags are "required". + +## How do I run Starship on Linux distributions with older versions of glibc? + +If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`: + +```sh +curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl +``` + +## Why don't I see a glyph symbol in my prompt? + +The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that: + +- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/). +- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice. +- You are using a [Nerd Font](https://www.nerdfonts.com/). + +To test your system, run the following commands in a terminal: + +```sh +echo -e "\xf0\x9f\x90\x8d" +echo -e "\xee\x82\xa0" +``` + +The first line should produce a [snake emoji](https://emojipedia.org/snake/), while the second should produce a [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs). + +If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose) + +## How do I uninstall Starship? + +Starship is just as easy to uninstall as it is to install in the first place. + +1. Remove any lines in your shell config (e.g. `~/.bashrc`) used to initialize Starship. +1. Delete the Starship binary. + +If Starship was installed using a package manager, please refer to their docs for uninstallation instructions. + +If Starship was installed using the `curl | bash` script, the following command will delete the binary: + +```sh +# Locate and delete the starship binary +rm "$(which starship)" +``` diff --git a/docs/nl-NL/guide/README.md b/docs/nl-NL/guide/README.md new file mode 100644 index 000000000..74b5b1e69 --- /dev/null +++ b/docs/nl-NL/guide/README.md @@ -0,0 +1,272 @@ +

+ Starship – Cross-shell prompt +

+ +

+ GitHub Actions workflow status + Crates.io version + Packaging status
+ Chat on Discord + Follow @StarshipPrompt on Twitter +

+ +

+ Website + · + Installation + · + Configuration +

+ +

+ English +   + 日本語 +   + 繁體中文 +   + Русский +   + Deutsch +   + 简体中文 +   + Español +   + Français +

+ +

+ +Starship with iTerm2 and the Snazzy theme + +**The minimal, blazing-fast, and infinitely customizable prompt for any shell!** + +- **Fast:** it's fast – _really really_ fast! 🚀 +- **Customizable:** configure every aspect of your prompt. +- **Universal:** works on any shell, on any operating system. +- **Intelligent:** shows relevant information at a glance. +- **Feature rich:** support for all your favorite tools. +- **Easy:** quick to install – start using it in minutes. + +

+Explore the Starship docs  ▶ +

+ + + +## 🚀 Installation + +### Prerequisites + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). + +### Getting Started + +1. Install the **starship** binary: + + + #### Install Latest Version + + + ##### From prebuilt binary, with Shell: + + ```sh + curl -fsSL https://starship.rs/install.sh | bash + ``` + + + ##### From source on [crates.io](https://crates.io/): + + ```sh + cargo install starship + ``` + + + #### Install via Package Manager + + + ##### With [Homebrew](https://brew.sh/): + + ```sh + brew install starship + ``` + + + ##### With [Scoop](https://scoop.sh): + + ```powershell + scoop install starship + ``` + +1. Add the init script to your shell's config file: + + + #### Bash + + Add the following to the end of `~/.bashrc`: + + ```sh + # ~/.bashrc + + eval "$(starship init bash)" + ``` + + + #### Fish + + Add the following to the end of `~/.config/fish/config.fish`: + + ```sh + # ~/.config/fish/config.fish + + starship init fish | source + ``` + + + #### Zsh + + Add the following to the end of `~/.zshrc`: + + ```sh + # ~/.zshrc + + eval "$(starship init zsh)" + ``` + + + #### PowerShell + + Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. + + ```sh + Invoke-Expression (&starship init powershell) + ``` + + + #### Ion + + Add the following to the end of `~/.config/ion/initrc`: + + ```sh + # ~/.config/ion/initrc + + eval $(starship init ion) + ``` + +## 🤝 Contributing + +We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). + +If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/). + +If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋 + +### Code Contributors + +This project exists thanks to all the people who contribute. [[Contribute](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]. + + +### Financial Contributors + +Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)] + +#### Individuals + + + +#### Organizations + +Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)] + + + + + + + + + + + + +## 💭 Inspired By + +Please check out these previous works that helped inspire the creation of starship. 🙏 + +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts. + +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript. + +- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons. + +

+
+ Starship rocket icon +

+ +## 📝 License + +Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).
This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed. diff --git a/docs/nl-NL/migrating-to-0.45.0/README.md b/docs/nl-NL/migrating-to-0.45.0/README.md new file mode 100644 index 000000000..95a847bf2 --- /dev/null +++ b/docs/nl-NL/migrating-to-0.45.0/README.md @@ -0,0 +1,267 @@ +# Migrating to v0.45.0 + +Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization. + +This guide is intended to walk you through the breaking changes. + +## `prompt_order` has been replaced by a root-level `format` + +Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship. + +Starship v0.45.0 instead accepts a `format` value, allowing for customization of the prompt outside of the modules themselves. + +**Example pre-v0.45.0 configuration** + +```toml +prompt_order = [ + "username", + "hostname", + "directory", + "git_branch", + "git_commit", + "git_state", + "git_status", + "cmd_duration", + "custom", + "line_break", + "jobs", + "battery", + "time", + "character", +] +``` + +**Example v0.45.0 configuration** + +```toml +format = """\ + $username\ + $hostname\ + $directory\ + $git_branch\ + $git_commit\ + $git_state\ + $git_status\ + $cmd_duration\ + $custom\ + $line_break\ + $jobs\ + $battery\ + $time\ + $character\ + """ +``` + +## Module `prefix` and `suffix` have been replaced by `format` + +Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered. + +Starship v0.45.0 instead accepts a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output. + +**Example pre-v0.45.0 configuration** + +```toml +[cmd_duration] +prefix = "took " +``` + +**Example v0.45.0 configuration** + +```toml +[cmd_duration] +# $duration – The command duration (e.g. "15s") +# $style – The default style of the module (e.g. "bold yellow") +format = "took [$duration]($style) " +``` + +### Affected Modules + +#### Character + +| Removed Property | Replacement | +| ----------------------- | ---------------- | +| `symbol` | `success_symbol` | +| `use_symbol_for_status` | `error_symbol` | +| `style_success` | `success_symbol` | +| `style_failure` | `error_symbol` | + +**Changes to the Default Configuration** + +```diff +[character] +-- symbol = "❯" +-- error_symbol = "✖" +-- use_symbol_for_status = true +-- vicmd_symbol = "❮" +++ success_symbol = "[❯](bold green)" +++ error_symbol = "[❯](bold red)" +++ vicmd_symbol = "[❮](bold green)" +``` + +Previously, the `use_symbol_for_status` property was used to configure the prompt to show the `error_symbol` when the last command resulted in a non-zero status code. + +With the release of v0.45.0, we now always use `error_symbol` after non-zero status codes, unifying `use_symbol_for_status` and `error_symbol` properties. + +To configure the prompt to use the older `use_symbol_for_status = true` configuration, add the following to your config file: + +```toml +[character] +error_symbol = "[✖](bold red)" +``` + +*Note:* The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples. + +#### Command Duration + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | + +**Changes to the Default Configuration** + +```diff +[cmd_duration] +-- prefix = "took " +++ format = "took [$duration]($style) " +``` + +#### Directory + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | + +**Changes to the Default Configuration** + +```diff +[directory] +-- prefix = "in " +++ format = "[$path]($style)[$read_only]($read_only_style) " +``` + +#### Environment Variable + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[env_var] +-- prefix = "" +-- suffix = "" +++ format = "with [$env_value]($style) " +``` + +#### Git Commit + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[git_commit] +-- prefix = "(" +-- suffix = ")" +++ format = '[\($hash\)]($style) ' +``` + +#### Git Status + +| Removed Property | Replacement | +| ----------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | +| `show_sync_count` | `format` | + +**Changes to the Default Configuration** + +```diff +[git_status] +-- prefix = "[" +-- suffix = "]" +-- show_sync_count = false +++ format = '([\[$all_status$ahead_behind\]]($style) )' +``` + +Previously, the `show_sync_count` property was used to configure the prompt to show the number of commits the branch was ahead or behind the remote branch. + +With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`. + +To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file: + +```toml +[git_status] +ahead = "⇡${count}" +diverged = "⇕⇡${ahead_count}⇣${behind_count}" +behind = "⇣${count}" +``` + +#### Hostname + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[hostname] +-- prefix = "" +-- suffix = "" +++ format = "[$hostname]($style) in " +``` + +#### Singularity + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `label` | `format` | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[singularity] +-- prefix = "" +-- suffix = "" +++ format = '[$symbol\[$env\]]($style) ' +``` + +#### Time + +| Removed Property | Replacement | +| ---------------- | ------------- | +| `format` | `time_format` | + +**Changes to the Default Configuration** + +```diff +[time] +-- format = "🕙[ %T ]" +++ time_format = "%T" +++ format = "at 🕙[$time]($style) " +``` + +#### Custom Commands + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[custom.example] +-- prefix = "" +-- suffix = "" +++ format = "[$symbol$output]($style) " +``` diff --git a/docs/nl-NL/presets/README.md b/docs/nl-NL/presets/README.md new file mode 100644 index 000000000..746364fa2 --- /dev/null +++ b/docs/nl-NL/presets/README.md @@ -0,0 +1,89 @@ +# Presets + +Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊 + +## Nerd Font Symbols + +This preset doesn't change anything except for the symbols used for each module. If emojis aren't your thing, this might catch your eye! + +![Screenshot of Nerd Font Symbols preset](/presets/nerd-font-symbols.png) + +### Prerequisites + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font) + +### Configuration + +```toml +[aws] +symbol = " " + +[conda] +symbol = " " + +[dart] +symbol = " " + +[directory] +read_only = " " + +[docker] +symbol = " " + +[elixir] +symbol = " " + +[elm] +symbol = " " + +[git_branch] +symbol = " " + +[golang] +symbol = " " + +[haskell] +symbol = " " + +[hg_branch] +symbol = " " + +[java] +symbol = " " + +[julia] +symbol = " " + +[memory_usage] +symbol = " " + +[nim] +symbol = " " + +[nix_shell] +symbol = " " + +[nodejs] +symbol = " " + +[package] +symbol = " " + +[perl] +symbol = " " + +[php] +symbol = " " + +[python] +symbol = " " + +[ruby] +symbol = " " + +[rust] +symbol = " " + +[swift] +symbol = "ﯣ " +``` diff --git a/docs/pl-PL/README.md b/docs/pl-PL/README.md new file mode 100644 index 000000000..4767ca0b1 --- /dev/null +++ b/docs/pl-PL/README.md @@ -0,0 +1,112 @@ +--- +home: true +heroImage: /logo.svg +heroText: +tagline: The minimal, blazing-fast, and infinitely customizable prompt for any shell! +actionText: Get Started → +actionLink: ./guide/ +features: + - + title: Compatibility First + details: Works on the most common shells on the most common operating systems. Use it everywhere! + - + title: Rust-Powered + details: Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible. + - + title: Customizable + details: Every little detail is customizable to your liking, to make this prompt as minimal or feature-rich as you'd like it to be. +footer: ISC Licensed | Copyright © 2019-present Starship Contributors +#Used for the description meta tag, for SEO +metaTitle: "Starship: Cross-Shell Prompt" +description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and PowerShell. +--- + +
+ +
+ +### Quick Install + +1. Install the **starship** binary: + + + #### Install Latest Version + + With Shell: + + ```sh + curl -fsSL https://starship.rs/install.sh | bash + ``` + + + #### Install via Package Manager + + With [Homebrew](https://brew.sh/): + + ```sh + brew install starship + ``` + + With [Scoop](https://scoop.sh): + + ```powershell + scoop install starship + ``` + +1. Add the init script to your shell's config file: + + + #### Bash + + Add the following to the end of `~/.bashrc`: + + ```sh + # ~/.bashrc + + eval "$(starship init bash)" + ``` + + + #### Fish + + Add the following to the end of `~/.config/fish/config.fish`: + + ```sh + # ~/.config/fish/config.fish + + starship init fish | source + ``` + + + #### Zsh + + Add the following to the end of `~/.zshrc`: + + ```sh + # ~/.zshrc + + eval "$(starship init zsh)" + ``` + + + #### Powershell + + Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. + + ```sh + Invoke-Expression (&starship init powershell) + ``` + + + #### Ion + + Add the following to the end of `~/.config/ion/initrc`: + + ```sh + # ~/.config/ion/initrc + + eval $(starship init ion) + ``` diff --git a/docs/pl-PL/advanced-config/README.md b/docs/pl-PL/advanced-config/README.md new file mode 100644 index 000000000..1cf6ebb78 --- /dev/null +++ b/docs/pl-PL/advanced-config/README.md @@ -0,0 +1,93 @@ +# Advanced Configuration + +While Starship is a versatile shell, sometimes you need to do more than edit `starship.toml` to get it to do certain things. This page details some of the more advanced configuration techniques used in starship. + +::: warning + +The configurations in this section are subject to change in future releases of Starship. + +::: + +## Custom pre-prompt and pre-execution Commands in Bash + +Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure: + +- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do + +```bash +function blastoff(){ + echo "🚀" +} +starship_precmd_user_func="blastoff" +``` + +- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. + +```bash +function blastoff(){ + echo "🚀" +} +trap blastoff DEBUG # Trap DEBUG *before* running starship +eval $(starship init bash) +``` + +## Change Window Title + +Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`. + +First, define a window title change function (identical in bash and zsh): + +```bash +function set_win_title(){ + echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007" +} +``` + +You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). + +In `bash`, set this function to be the precmd starship function: + +```bash +starship_precmd_user_func="set_win_title" +``` + +In `zsh`, add this to the `precmd_functions` array: + +```bash +precmd_functions+=(set_win_title) +``` + +If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. + +For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`: + +```bash +function set_win_title(){ + echo -ne "\033]0; $(basename $PWD) \007" +} +starship_precmd_user_func="set_win_title" +``` + +## Style Strings + +Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: + + - `bold` + - `underline` + - `dimmed` + - `bg:` + - `fg:` + - `` + - `none` + +where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing , though this may change in the future. The order of words in the string does not matter. + +The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. + +A color specifier can be one of the following: + + - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). + - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). + - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). + +If multiple colors are specified for foreground/background, the last one in the string will take priority. diff --git a/docs/pl-PL/config/README.md b/docs/pl-PL/config/README.md new file mode 100644 index 000000000..286375e20 --- /dev/null +++ b/docs/pl-PL/config/README.md @@ -0,0 +1,2503 @@ +# Configuration + +To get started configuring starship, create the following 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: + +```toml +# Don't print a new line at the start of the prompt +add_newline = false + +# 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" + +# Disable the package module, hiding it from the prompt completely +[package] +disabled = true +``` + +You can change default `starship.toml` file location with `STARSHIP_CONFIG` environment variable: + +```sh +export STARSHIP_CONFIG=~/.starship +``` + +Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: + +```ps1 +$ENV:STARSHIP_CONFIG = "$HOME\.starship" +``` + +### 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: + +```sh +export STARSHIP_CACHE=~/.starship/cache +``` + +Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: + +```ps1 +$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" +``` + +### Terminology + +**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of NodeJS that is currently installed on your computer, if your current directory is a NodeJS project. + +**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 NodeJS. + +By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. + +### Format Strings + +Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. + +#### Variable + +A variable contains a `$` symbol followed by the name of the variable. The name of a variable only contains letters, numbers and `_`. + +For example: + +- `$version` is a format string with a variable named `version`. +- `$git_branch$git_commit` is a format string with two variables named `git_branch` and `git_commit`. +- `$git_branch $git_commit` has the two variables separated with a space. + +#### Text Group + +A text group is made up of two different parts. + +The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it. + +In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used style the first part. + +For example: + +- `[on](red bold)` will print a string `on` with bold text colored red. +- `[⬢ $version](bold green)` will print a symbol `⬢` followed by the content of variable `version`, with bold text colored green. +- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green. + +#### Style Strings + +Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). + +- `"fg:green bg:blue"` sets green text on a blue background +- `"bg:blue fg:bright-green"` sets bright green text on a blue background +- `"bold fg:27"` sets bold text with [ANSI color](https://i.stack.imgur.com/KTSQa.png) 27 +- `"underline bg:#bf5700"` sets underlined text on a burnt orange background +- `"bold italic fg:purple"` sets bold italic purple text +- `""` explicitly disables all styling + +Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics. + +#### Conditional Format Strings + +A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. + +For example: + +- `(@$region)` will show nothing if the variable `region` is `None`, otherwise `@` followed by the value of region. +- `(some text)` will always show nothing since there are no variables wrapped in the braces. +- When `$all` is a shortcut for `\[$a$b\]`, `($all)` will show nothing only if `$a` and `$b` are both `None`. This works the same as `(\[$a$b\] )`. + +#### Escapable characters + +The following symbols have special usage in a format string. If you want to print the following symbols, you have to escape them with a backslash (`\`). + +- \$ +- \\ +- [ +- ] +- ( +- ) + +Note that `toml` has [its own escape syntax](https://github.com/toml-lang/toml#user-content-string). It is recommended to use a literal string (`''`) in your config. If you want to use a basic string (`""`), pay attention to escape the backslash `\`. + +For example, when you want to print a `$` symbol on a new line, the following configs for `format` are equivalent: + +```toml +# with basic string +format = "\n\\$" + +# with multiline basic string +format = """ + +\\$""" + +# with literal string +format = ''' + +\$''' +``` + +## Prompt + +This is the list of prompt-wide configuration options. + +### Options + +| Option | Default | Description | +| -------------- | ------------------------------ | ----------------------------------------------------- | +| `format` | [link](#default-prompt-format) | Configure the format of the prompt. | +| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | +| `add_newline` | `true` | Add a new line before the start of the prompt. | + +### Example + +```toml +# ~/.config/starship.toml + +# Use custom format +format = """ +[┌───────────────────>](bold green) +[│](bold green)$directory$rust$package +[└─>](bold green) """ + +# Wait 10 milliseconds for starship to check files under the current directory. +scan_timeout = 10 + +# Disable the newline at the start of the prompt +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. The default is as shown: + +```toml +format = "$all" + +# Which is equivalent to +format = """ +$username\ +$hostname\ +$shlvl\ +$kubernetes\ +$directory\ +$git_branch\ +$git_commit\ +$git_state\ +$git_status\ +$hg_branch\ +$docker_context\ +$package\ +$cmake\ +$dart\ +$dotnet\ +$elixir\ +$elm\ +$erlang\ +$golang\ +$helm\ +$java\ +$julia\ +$kotlin\ +$nim\ +$nodejs\ +$ocaml\ +$perl\ +$php\ +$purescript\ +$python\ +$ruby\ +$rust\ +$swift\ +$terraform\ +$zig\ +$nix_shell\ +$conda\ +$memory_usage\ +$aws\ +$gcloud\ +$openstack\ +$env_var\ +$crystal\ +$custom\ +$cmd_duration\ +$line_break\ +$lua\ +$jobs\ +$battery\ +$time\ +$status\ +$character""" +``` + +## AWS + +The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. + +When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var. + +### Options + +| Option | Default | Description | +| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | +| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | +| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `AWS` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------------- | ------------------------------------ | +| region | `ap-northeast-1` | The current AWS region | +| profile | `astronauts` | The current AWS profile | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Examples + +#### Display everything + +```toml +# ~/.config/starship.toml + +[aws] +format = 'on [$symbol$profile(\($region\))]($style) ' +style = "bold blue" +symbol = "🅰 " +[aws.region_aliases] +ap-southeast-2 = "au" +us-east-1 = "va" +``` + +#### Display region + +```toml +# ~/.config/starship.toml + +[aws] +format = "on [$symbol$region]($style) " +style = "bold blue" +symbol = "🅰 " +[aws.region_aliases] +ap-southeast-2 = "au" +us-east-1 = "va" +``` + +#### Display profile + +```toml +# ~/.config/starship.toml + +[aws] +format = "on [$symbol$profile]($style) " +style = "bold blue" +symbol = "🅰 " +``` + +## Battery + +The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. + +### Options + +| Option | Default | Description | +| -------------------- | --------------------------------- | --------------------------------------------------- | +| `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. | +| `display` | [link](#battery-display) | Display threshold and style for the module. | +| `disabled` | `false` | Disables the `battery` module. | + + +### Example + +```toml +# ~/.config/starship.toml + +[battery] +full_symbol = "🔋" +charging_symbol = "⚡️" +discharging_symbol = "💀" +``` + +### Battery Display + +The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. The default is as shown: + +```toml +[[battery.display]] +threshold = 10 +style = "bold red" +``` + +#### Options + +The `display` option is an array of the following table. + +| Option | Description | +| ----------- | ----------------------------------------------- | +| `threshold` | The upper bound for the display option. | +| `style` | The style used if the display option is in use. | + +#### Example + +```toml +[[battery.display]] # "bold red" style when capacity is between 0% and 10% +threshold = 10 +style = "bold red" + +[[battery.display]] # "bold yellow" style when capacity is between 10% and 30% +threshold = 30 +style = "bold yellow" + +# when capacity is over 30%, the battery indicator will not be displayed + +``` + +## Character + +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. + +The character will tell you whether the last command was successful or not. It can do this in two ways: + +- changing color (`red`/`green`) +- changing shape (`❯`/`✖`) + +By default it only changes color. If you also want to change it's shape take a look at [this example](#with-custom-error-shape). + +### Options + +| Option | Default | Description | +| ---------------- | ------------------- | -------------------------------------------------------------------------------- | +| `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. | +| `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. | +| `vicmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | +| `disabled` | `false` | Disables the `character` module. | + +### Variables + +| Variable | Example | Description | +| -------- | ------- | --------------------------------------------------------------------- | +| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` | + +### Examples + +#### With custom error shape + +```toml +# ~/.config/starship.toml + +[character] +success_symbol = "[➜](bold green) " +error_symbol = "[✗](bold red) " +``` + +#### Without custom error shape + +```toml +# ~/.config/starship.toml + +[character] +success_symbol = "[➜](bold green) " +error_symbol = "[➜](bold red) " +``` + +#### With custom vim shape + +```toml +# ~/.config/starship.toml + +[character] +vicmd_symbol = "[V](bold green) " +``` + +## CMake + +The `cmake` module shows the currently installed version of CMake if any of the following conditions are met: + +- The current directory contains a `CMakeLists.txt` file +- The current directory contains a `CMakeCache.txt` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | -------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `cmake` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v3.17.3` | The version of cmake | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +## Command Duration + +The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. + +::: warning Do not hook the DEBUG trap in Bash + +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. + +::: + +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. + +### Options + +| Option | Default | Description | +| -------------------- | ----------------------------- | ---------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `show_notifications` | `false` | Show desktop notifications when command completes. | +| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | + +::: tip + +Showing desktop notifications requires starship to be built with `rust-notify` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. + +::: + +### Variables + +| Variable | Example | Description | +| --------- | -------- | --------------------------------------- | +| duration | `16m40s` | The time it took to execute the command | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[cmd_duration] +min_time = 500 +format = "underwent [$duration](bold yellow)" +``` + +## Conda + +The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set. + +::: tip + +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. + +::: + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. | +| `symbol` | `"🅒 "` | The symbol used before the environment name. | +| `style` | `"bold green"` | The style for the module. | +| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `disabled` | `false` | Disables the `conda` module. | + +### Variables + +| Variable | Example | Description | +| ----------- | ------------ | ------------------------------------ | +| environment | `astronauts` | The current conda environment | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[conda] +format = "[$symbol$environment](dimmed green) " +``` + +## Crystal + +The `crystal` module shows the currently installed version of Crystal. The module will be shown if any of the following conditions are met: + +- The current directory contains a `shard.yml` file +- The current directory contains a `.cr` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | The style for the module. | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `disabled` | `false` | Disables the `crystal` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.32.1` | The version of `crystal` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[crystal] +format = "via [✨ $version](bold blue) " +``` + +## Dart + +The `dart` module shows the currently installed version of Dart. The module will be shown if any of the following conditions are met: + +- The current directory contains a file with `.dart` extension +- The current directory contains a `.dart_tool` directory +- The current directory contains a `pubspec.yaml` or `pubspec.lock` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dart` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v2.8.4` | The version of `dart` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[dart] +format = "via [🔰 $version](bold red) " +``` + +## Directory + +The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. + +When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option. + +For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | +| `style` | `"bold cyan"` | The style for the module. | +| `disabled` | `false` | Disables the `directory` module. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | + +
+This module has a few advanced configuration options that control how the directory is displayed. + +| Advanced Option | Default | Description | +| --------------------------- | ------- | ---------------------------------------------------------------------------------------- | +| `substitutions` | | A table of substitutions to be made to the path. | +| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. | +| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. | + +`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD. + +```toml +[directory.substitutions] +"/Volumes/network/path" = "/net" +"src/com/long/java/path" = "mypath" +``` + +`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`. + +
+ +### Variables + +| Variable | Example | Description | +| --------- | --------------------- | ----------------------------------- | +| path | `"D:/Projects"` | The current directory path | +| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[directory] +truncation_length = 8 +truncation_symbol = "…/" +``` + +## Docker Context + +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default`. + +### Options + +| Option | Default | Description | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | The format for the module. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | The style for the module. | +| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | +| `disabled` | `true` | Disables the `docker_context` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------------- | ------------------------------------ | +| context | `test_context` | The current docker context | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[docker_context] +format = "via [🐋 $context](blue bold)" +``` + +## Dotnet + +The `dotnet` module shows the relevant version of the .NET Core SDK for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK. + +This module will only be shown in your prompt when one or more of the following files are present in the current directory: + +- `global.json` +- `project.json` +- `Directory.Build.props` +- `Directory.Build.targets` +- `Packages.props` +- `*.sln` +- `*.csproj` +- `*.fsproj` +- `*.xproj` + +You'll also need the .NET Core SDK installed in order to use it correctly. + +Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options. + +The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. + +### Options + +| Option | Default | Description | +| ----------- | --------------------------------------- | -------------------------------------------------------- | +| `format` | `"[$symbol$version( 🎯 $tfm)]($style) "` | The format for the module. | +| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. | +| `heuristic` | `true` | Use faster version detection to keep starship snappy. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dotnet` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------------- | ------------------------------------------------------------------ | +| version | `v3.1.201` | The version of `dotnet` sdk | +| tfm | `netstandard2.0` | The Target Framework Moniker that the current project is targeting | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[dotnet] +symbol = "🥅 " +style = "green" +heuristic = false +``` + +## Elixir + +The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. The module will be shown if any of the following conditions are met: + +- The current directory contains a `mix.exs` file. + +### Options + +| Option | Default | Description | +| ---------- | --------------------------------------------------------- | --------------------------------------------------------------- | +| `symbol` | `"💧 "` | The symbol used before displaying the version of Elixir/Erlang. | +| `style` | `"bold purple"` | The style for the module. | +| `format` | `'via [$symbol$version \(OTP $otp_version\)]($style) '` | The format for the module elixir. | +| `disabled` | `false` | Disables the `elixir` module. | + +### Variables + +| Variable | Example | Description | +| ----------- | ------- | ------------------------------------ | +| version | `v1.10` | The version of `elixir` | +| otp_version | | The otp version of `elixir` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[elixir] +symbol = "🔮 " +``` + +## Elm + +The `elm` module shows the currently installed version of Elm. The module will be shown if any of the following conditions are met: + +- The current directory contains a `elm.json` file +- The current directory contains a `elm-package.json` file +- The current directory contains a `.elm-version` file +- The current directory contains a `elm-stuff` folder +- The current directory contains a `*.elm` files + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🌳 "` | A format string representing the symbol of Elm. | +| `style` | `"cyan bold"` | The style for the module. | +| `disabled` | `false` | Disables the `elm` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.19.1` | The version of `elm` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[elm] +format = "via [ $version](cyan bold) " +``` + +## Environment Variable + +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: + +- The `variable` configuration option matches an existing environment variable +- The `variable` configuration option is not defined, but the `default` configuration option is + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------ | ---------------------------------------------------------------------------- | +| `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. | +| `disabled` | `false` | Disables the `env_var` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------------------------------------- | ------------------------------------------ | +| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | `black bold dimmed` | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[env_var] +variable = "SHELL" +default = "unknown shell" +``` + +## Erlang + +The `erlang` module shows the currently installed version of Erlang/OTP. The module will be shown if any of the following conditions are met: + +- The current directory contains a `rebar.config` file. +- The current directory contains a `erlang.mk` file. + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | -------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before displaying the version of erlang. | +| `style` | `"bold red"` | The style for the module. | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `disabled` | `false` | Disables the `erlang` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v22.1.3` | The version of `erlang` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[erlang] +format = "via [e $version](bold red) " +``` + +## Gcloud + +The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. + +### Options + +| Option | Default | Description | +| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | +| `format` | `'on [$symbol$account(\($region\))]($style) '` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. | +| `region_aliases` | | Table of region aliases to display in addition to the GCP name. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `gcloud` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ----------------- | ------------------------------------------------------------------ | +| region | `us-central1` | The current GCP region | +| account | `foo@example.com` | The current GCP profile | +| project | | The current GCP project | +| active | `default` | The active config name written in `~/.config/gcloud/active_config` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Examples + +#### Display account and project + +```toml +# ~/.config/starship.toml + +[gcloud] +format = 'on [$symbol$account(\($project\))]($style) ' +``` + +#### Display active config name only + +```toml +# ~/.config/starship.toml + +[gcloud] +format = "[$symbol$active]($style) " +style = "bold yellow" +``` + +#### Display account and aliased region + +```toml +# ~/.config/starship.toml + +[gcloud] +symbol = "️🇬️ " +[gcloud.region_aliases] +us-central1 = "uc1" +asia-northeast1 = "an1" +``` + +## Git Branch + +The `git_branch` module shows the active branch of the repo in your current directory. + +### Options + +| Option | Default | Description | +| -------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- | +| `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. | +| `symbol` | `" "` | A format string representing the symbol of git branch. | +| `style` | `"bold purple"` | The style for the module. | +| `truncation_length` | `2^63 - 1` | Truncates a git branch to X graphemes. | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use `""` for no symbol. | +| `only_attached` | `false` | Only show the branch name when not in a detached HEAD state. | +| `disabled` | `false` | Disables the `git_branch` module. | + +### Variables + +| Variable | Example | Description | +| ------------- | -------- | ---------------------------------------------------------------------------------------------------- | +| branch | `master` | The current branch name, falls back to `HEAD` if there's no current branch (e.g. git detached HEAD). | +| remote_name | `origin` | The remote name. | +| remote_branch | `master` | The name of the branch tracked on `remote_name`. | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_branch] +symbol = "🌱 " +truncation_length = 4 +truncation_symbol = "" +``` + +## Git Commit + +The `git_commit` module shows the current commit hash and also the tag (if any) of the repo in your current directory. + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------ | ----------------------------------------------------- | +| `commit_hash_length` | `7` | The length of the displayed git commit hash. | +| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | The format for the module. | +| `style` | `"bold green"` | The style for the module. | +| `only_detached` | `true` | Only show git commit hash when in detached HEAD state | +| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. | +| `tag_symbol` | `"🏷 "` | Tag symbol prefixing the info shown | +| `disabled` | `false` | Disables the `git_commit` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ----------------------------------- | +| hash | `b703eb3` | The current git commit hash | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_commit] +commit_hash_length = 4 +tag_symbol = "🔖 " +``` + +## Git State + +The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too. + +### Options + +| Option | Default | Description | +| -------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `rebase` | `"REBASING"` | A format string displayed when a `rebase` is in progress. | +| `merge` | `"MERGING"` | A format string displayed when a `merge` is in progress. | +| `revert` | `"REVERTING"` | A format string displayed when a `revert` is in progress. | +| `cherry_pick` | `"CHERRY-PICKING"` | A format string displayed when a `cherry-pick` is in progress. | +| `bisect` | `"BISECTING"` | A format string displayed when a `bisect` is in progress. | +| `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"` | The style for the module. | +| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | The format for the module. | +| `disabled` | `false` | Disables the `git_state` module. | + +### Variables + +| Variable | Example | Description | +| ---------------- | ---------- | ----------------------------------- | +| state | `REBASING` | The current state of the repo | +| progress_current | `1` | The current operation progress | +| progress_total | `2` | The total operation progress | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_state] +format = '[\($state( $progress_current of $progress_total)\)]($style) ' +cherry_pick = "[🍒 PICKING](bold red)" +``` + +## Git Status + +The `git_status` module shows symbols representing the state of the repo in your current directory. + +### Options + +| Option | Default | Description | +| ------------ | ----------------------------------------------- | ----------------------------------- | +| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` | +| `conflicted` | `"="` | This branch has merge conflicts. | +| `ahead` | `"⇡"` | The format of `ahead` | +| `behind` | `"⇣"` | The format of `behind` | +| `diverged` | `"⇕"` | The format of `diverged` | +| `untracked` | `"?"` | The format of `untracked` | +| `stashed` | `"$"` | The format of `stashed` | +| `modified` | `"!"` | The format of `modified` | +| `staged` | `"+"` | The format of `staged` | +| `renamed` | `"»"` | The format of `renamed` | +| `deleted` | `"✘"` | The format of `deleted` | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `git_status` module. | + +### Variables + +The following variables can be used in `format`: + +| Variable | Description | +| -------------- | --------------------------------------------------------------------------------------------- | +| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` | +| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo | +| `conflicted` | Displays `conflicted` when this branch has merge conflicts. | +| `untracked` | Displays `untracked` when there are untracked files in the working directory. | +| `stashed` | Displays `stashed` when a stash exists for the local repository. | +| `modified` | Displays `modified` when there are file modifications in the working directory. | +| `staged` | Displays `staged` when a new file has been added to the staging area. | +| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | +| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| style\* | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +The following variables can be used in `diverged`: + +| Variable | Description | +| -------------- | ---------------------------------------------- | +| `ahead_count` | Number of commits ahead of the tracking branch | +| `behind_count` | Number of commits behind the tracking branch | + +The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`: + +| Variable | Description | +| -------- | ------------------------ | +| `count` | Show the number of files | + +### Example + +```toml +# ~/.config/starship.toml + +[git_status] +conflicted = "🏳" +ahead = "🏎💨" +behind = "😰" +diverged = "😵" +untracked = "🤷‍" +stashed = "📦" +modified = "📝" +staged = '[++\($count\)](green)' +renamed = "👅" +deleted = "🗑" +``` + +Show ahead/behind count of the branch being tracked + +```toml +# ~/.config/starship.toml + +[git_status] +ahead = "⇡${count}" +diverged = "⇕⇡${ahead_count}⇣${behind_count}" +behind = "⇣${count}" +``` + +## Golang + +The `golang` module shows the currently installed version of Golang. The module will be shown if any of the following conditions are met: + +- The current directory contains a `go.mod` file +- The current directory contains a `go.sum` file +- The current directory contains a `glide.yaml` file +- The current directory contains a `Gopkg.yml` file +- The current directory contains a `Gopkg.lock` file +- The current directory contains a `.go-version` file +- The current directory contains a `Godeps` directory +- The current directory contains a file with the `.go` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ---------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🐹 "` | A format string representing the symbol of Go. | +| `style` | `"bold cyan"` | The style for the module. | +| `disabled` | `false` | Disables the `golang` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v1.12.1` | The version of `go` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[golang] +format = "via [🏎💨 $version](bold cyan) " +``` + +## Helm + +The `helm` module shows the currently installed version of Helm. The module will be shown if any of the following conditions are met: + +- The current directory contains a `helmfile.yaml` file +- The current directory contains a `Chart.yaml` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"⎈ "` | A format string representing the symbol of Helm. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `helm` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v3.1.1` | The version of `helm` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[helm] +format = "via [⎈ $version](bold white) " +``` + +## Hostname + +The `hostname` module shows the system hostname. + +### Options + +| Option | Default | Description | +| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `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. | +| `style` | `"bold dimmed green"` | The style for the module. | +| `disabled` | `false` | Disables the `hostname` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +format = "on [$hostname](bold red) " +trim_at = ".companyname.com" +disabled = false +``` + +## Java + +The `java` module shows the currently installed version of Java. The module will be shown if any of the following conditions are met: + +- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file +- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension + +### Options + +| Option | Default | Description | +| ---------- | -------------------------------------- | ----------------------------------------------- | +| `format` | `"via [${symbol}${version}]($style) "` | The format for the module. | +| `symbol` | `"☕ "` | A format string representing the symbol of Java | +| `style` | `"red dimmed"` | The style for the module. | +| `disabled` | `false` | Disables the `java` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| version | `v14` | The version of `java` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[java] +symbol = "🌟 " +``` + +## Jobs + +The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. + +### Options + +| Option | Default | Description | +| ----------- | ----------------------------- | ------------------------------------------------ | +| `threshold` | `1` | Show number of jobs if exceeded. | +| `format` | `"[$symbol$number]($style) "` | The format for the module. | +| `symbol` | `"✦"` | A format string representing the number of jobs. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `jobs` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| number | `1` | The number of jobs | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[jobs] +symbol = "+ " +threshold = 4 +``` + +## Julia + +The `julia` module shows the currently installed version of Julia. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Project.toml` file +- The current directory contains a `Manifest.toml` file +- The current directory contains a file with the `.jl` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"ஃ "` | A format string representing the symbol of Julia. | +| `style` | `"bold purple"` | The style for the module. | +| `disabled` | `false` | Disables the `julia` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.4.0` | The version of `julia` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[julia] +symbol = "∴ " +``` + +## Kotlin + +The `kotlin` module shows the currently installed version of Kotlin. The module will be shown if any of the following conditions are met: + +- The current directory contains a `.kt` or a `.kts` file + +### Options + +| Option | Default | Description | +| --------------- | ---------------------------------- | ----------------------------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🅺 "` | A format string representing the symbol of Kotlin. | +| `style` | `"bold blue"` | The style for the module. | +| `kotlin_binary` | `"kotlin"` | Configures the kotlin binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `kotlin` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v1.4.21` | The version of `kotlin` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[kotlin] +symbol = "🅺 " +``` + +```toml +# ~/.config/starship.toml + +[kotlin] +# Uses the Kotlin Compiler binary to get the installed version +kotlin_binary = "kotlinc" +``` + +## Kubernetes + +Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | +| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. | +| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. | +| `style` | `"cyan bold"` | The style for the module. | +| `context_aliases` | | Table of context aliases to display. | +| `disabled` | `true` | Disables the `kubernetes` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------------------- | ---------------------------------------- | +| context | `starship-cluster` | The current kubernetes context | +| namespace | `starship-namespace` | If set, the current kubernetes namespace | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[kubernetes] +format = 'on [⛵ $context \($namespace\)](dimmed green) ' +disabled = false +[kubernetes.context_aliases] +"dev.local.cluster.k8s" = "dev" +``` + +## Line Break + +The `line_break` module separates the prompt into two lines. + +### Options + +| Option | Default | Description | +| ---------- | ------- | ------------------------------------------------------------------ | +| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | + +### Example + +```toml +# ~/.config/starship.toml + +[line_break] +disabled = true +``` + +## Lua + +The `lua` module shows the currently installed version of Lua. The module will be shown if any of the following conditions are met: + +- The current directory contains a `.lua-version` file +- The current directory contains a `lua` directory +- The current directory contains a file with the `.lua` extension + +### Options + +| Option | Default | Description | +| ------------ | ---------------------------------- | -------------------------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | +| `style` | `"bold blue"` | The style for the module. | +| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `lua` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v5.4.0` | The version of `lua` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[lua] +format = "via [🌕 $version](bold blue) " +``` + +## Memory Usage + +The `memory_usage` module shows current system memory and swap usage. + +By default the swap usage is displayed if the total system swap is non-zero. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------- | --------------------------------------------- | -------------------------------------------------------- | +| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | +| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | The format for the module. | +| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | +| `style` | `"bold dimmed white"` | The style for the module. | +| `disabled` | `true` | Disables the `memory_usage` module. | + +### Variables + +| Variable | Example | Description | +| ---------------- | ------------- | ------------------------------------------------------------------ | +| ram | `31GiB/65GiB` | The usage/total RAM of the current system memory. | +| ram_pct | `48%` | The percentage of the current system memory. | +| swap\*\* | `1GiB/4GiB` | The swap memory size of the current system swap memory file. | +| swap_pct\*\* | `77%` | The swap memory percentage of the current system swap memory file. | +| symbol | `🐏` | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string \*\*: The SWAP file information is only displayed if detected on the current system + +### Example + +```toml +# ~/.config/starship.toml + +[memory_usage] +disabled = false +threshold = -1 +symbol = " " +style = "bold dimmed green" +``` + +## Mercurial Branch + +The `hg_branch` module shows the active branch of the repo in your current directory. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `style` | `"bold purple"` | The style for the module. | +| `format` | `"on [$symbol$branch]($style) "` | The format for the module. | +| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `disabled` | `true` | Disables the `hg_branch` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| branch | `master` | The active mercurial branch | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[hg_branch] +format = "on [🌱 $branch](bold purple)" +truncation_length = 4 +truncation_symbol = "" +``` + +## Nim + +The `nim` module shows the currently installed version of Nim. The module will be shown if any of the following conditions are met: + +- The current directory contains a `nim.cfg` file +- The current directory contains a file with the `.nim` extension +- The current directory contains a file with the `.nims` extension +- The current directory contains a file with the `.nimble` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module | +| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `nim` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.2.0` | The version of `nimc` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nim] +style = "yellow" +symbol = "🎣 " +``` + +## Nix-shell + +The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment. + +### Options + +| Option | Default | Description | +| ------------ | ---------------------------------------------- | ----------------------------------------------------- | +| `format` | `'via [$symbol$state( \($name\))]($style) '` | The format for the module. | +| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | +| `style` | `"bold blue"` | The style for the module. | +| `impure_msg` | `"impure"` | A format string shown when the shell is impure. | +| `pure_msg` | `"pure"` | A format string shown when the shell is pure. | +| `disabled` | `false` | Disables the `nix_shell` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| state | `pure` | The state of the nix-shell | +| name | `lorri` | The name of the nix-shell | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nix_shell] +disabled = true +impure_msg = "[impure shell](bold red)" +pure_msg = "[pure shell](bold green)" +format = 'via [☃️ $state( \($name\))](bold blue) ' +``` + +## NodeJS + +The `nodejs` module shows the currently installed version of NodeJS. The module will be shown if any of the following conditions are met: + +- The current directory contains a `package.json` file +- The current directory contains a `.node-version` file +- The current directory contains a `node_modules` directory +- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension +- The current directory contains a file with the `.ts` extension + +### Options + +| Option | Default | Description | +| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. | +| `style` | `"bold green"` | The style for the module. | +| `disabled` | `false` | Disables the `nodejs` module. | +| `not_capable_style` | `bold red` | The style for the module when an engines property in Packages.json does not match the NodeJS version. | + +###  Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v13.12.0` | The version of `node` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nodejs] +format = "via [🤖 $version](bold green) " +``` + +## OCaml + +The `ocaml` module shows the currently installed version of OCaml. The module will be shown if any of the following conditions are met: + +- The current directory contains a file with `.opam` extension or `_opam` directory +- The current directory contains a `esy.lock` directory +- The current directory contains a `dune` or `dune-project` file +- The current directory contains a `jbuild` or `jbuild-ignore` file +- The current directory contains a `.merlin` file +- The current directory contains a file with `.ml`, `.mli`, `.re` or `.rei` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format string for the module. | +| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `ocaml` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v4.10.0` | The version of `ocaml` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[ocaml] +format = "via [🐪 $version]($style) " +``` + +## OpenStack + +The `openstack` module shows the current OpenStack cloud and project. The module only active when the `OS_CLOUD` env var is set, in which case it will read `clouds.yaml` file from any of the [default locations](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files). to fetch the current project in use. + +### Options + +| Option | Default | Description | +| ---------- | --------------------------------------------------- | -------------------------------------------------------------- | +| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `OpenStack` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| cloud | `corp` | The current OpenStack cloud | +| project | `dev` | The current OpenStack project | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[openstack] +format = "on [$symbol$cloud(\\($project\\))]($style) " +style = "bold yellow" +symbol = "☁️ " +``` + +## Package Version + +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages. + +- **npm** – The `npm` package version is extracted from the `package.json` present in the current directory +- **cargo** – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory +- **poetry** – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory +- **composer** – The `composer` package version is extracted from the `composer.json` present in the current directory +- **gradle** – The `gradle` package version is extracted from the `build.gradle` present +- **julia** - The package version is extracted from the `Project.toml` present +- **mix** - The `mix` package version is extracted from the `mix.exs` present +- **helm** - The `helm` chart version is extracted from the `Chart.yaml` present +- **maven** - The `maven` package version is extracted from the `pom.xml` present +- **meson** - The `meson` package version is extracted from the `meson.build` present + +> ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. + +### Options + +| Option | Default | Description | +| ----------------- | ---------------------------------- | ---------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | +| `style` | `"bold 208"` | The style for the module. | +| `display_private` | `false` | Enable displaying version for packages marked as private. | +| `disabled` | `false` | Disables the `package` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.0.0` | The version of your package | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[package] +format = "via [🎁 $version](208 bold) " +``` + +## Perl + +The `perl` module shows the currently installed version of Perl. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Makefile.PL` or `Build.PL` file +- The current directory contains a `cpanfile` or `cpanfile.snapshot` file +- The current directory contains a `META.json` file or `META.yml` file +- The current directory contains a `.perl-version` file +- The current directory contains a `.pl`, `.pm` or `.pod` + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format string for the module. | +| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | +| `style` | `"bold 149"` | The style for the module. | +| `disabled` | `false` | Disables the `perl` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v5.26.1` | The version of `perl` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +### Example + +```toml +# ~/.config/starship.toml + +[perl] +format = "via [🦪 $version]($style) " +``` + +## PHP + +The `php` module shows the currently installed version of PHP. The module will be shown if any of the following conditions are met: + +- The current directory contains a `composer.json` file +- The current directory contains a `.php-version` file +- The current directory contains a `.php` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | +| `style` | `"147 bold"` | The style for the module. | +| `disabled` | `false` | Disables the `php` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v7.3.8` | The version of `php` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[php] +format = "via [🔹 $version](147 bold) " +``` + +## PureScript + +The `purescript` module shows the currently installed version of PureScript version. The module will be shown if any of the following conditions are met: + +- The current directory contains a `spago.dhall` file +- The current directory contains a \*.purs files + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `purescript` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `0.13.5` | The version of `purescript` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[purescript] +format = "via [$symbol$version](bold white)" +``` + +## Python + +The `python` module shows the currently installed version of Python and the current Python virtual environment if one is activated. + +If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`. + +The module will be shown if any of the following conditions are met: + +- The current directory contains a `.python-version` file +- The current directory contains a `requirements.txt` file +- The current directory contains a `pyproject.toml` file +- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true) +- The current directory contains a `Pipfile` file +- The current directory contains a `tox.ini` file +- The current directory contains a `setup.py` file +- The current directory contains a `__init__.py` file +- A virtual environment is currently activated + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | The style for the module. | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | + +::: tip + +The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used. + +The default values and order for `python_binary` was chosen to first identify the Python version in a virtualenv/conda environments (which currently still add a `python`, no matter if it points to `python3` or `python2`). This has the side effect that if you still have a system Python 2 installed, it may be picked up before any Python 3 (at least on Linux Distros that always symlink `/usr/bin/python` to Python 2). If you do not work with Python 2 anymore but cannot remove the system Python 2, changing this to `"python3"` will hide any Python version 2, see example below. + +::: + +### Variables + +| Variable | Example | Description | +| ------------ | --------------- | ------------------------------------------ | +| version | `"v3.8.1"` | The version of `python` | +| symbol | `"🐍 "` | Mirrors the value of option `symbol` | +| style | `"yellow bold"` | Mirrors the value of option `style` | +| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | +| virtualenv | `"venv"` | The current `virtualenv` name | + + +### Example + +```toml +# ~/.config/starship.toml + +[python] +symbol = "👾 " +pyenv_version_name = true +``` + +```toml +# ~/.config/starship.toml + +[python] +# Only use the `python3` binary to get the version. +python_binary = "python3" +``` + +## Ruby + +The `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Gemfile` file +- The current directory contains a `.ruby-version` file +- The current directory contains a `.rb` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `ruby` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v2.5.1` | The version of `ruby` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[ruby] +symbol = "🔺 " +``` + +## Rust + +The `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Cargo.toml` file +- The current directory contains a file with the `.rs` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `rust` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ----------------- | ------------------------------------ | +| version | `v1.43.0-nightly` | The version of `rustc` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[rust] +format = "via [⚙️ $version](red bold)" +``` + +## SHLVL + +The `shlvl` module shows the current SHLVL ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. + +### Options + +| Option | Default | Description | +| ----------- | ---------------------------- | ----------------------------------------------------------- | +| `threshold` | `2` | Display threshold. | +| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. | +| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | +| `repeat` | `false` | Causes `symbol` to be repeated by the current SHLVL amount. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `true` | Disables the `shlvl` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| shlvl | `3` | The current value of SHLVL | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[shlvl] +disabled = false +format = "$shlvl level(s) down" +threshold = 3 +``` + +## Singularity + +The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set. + +### Options + +| Option | Default | Description | +| ---------- | -------------------------------- | ------------------------------------------------ | +| `format` | `'[$symbol\[$env\]]($style) '` | The format for the module. | +| `symbol` | `""` | A format string displayed before the image name. | +| `style` | `"bold dimmed blue"` | The style for the module. | +| `disabled` | `false` | Disables the `singularity` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------ | ------------------------------------ | +| env | `centos.img` | The current singularity image | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[singularity] +format = '[📦 \[$env\]]($style) ' +``` + +## Status + +The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: + +### Options + +| Option | Default | Description | +| ----------------------- | -------------------------- | ---------------------------------------------------- | +| `format` | `[$symbol$status]($style)` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | +| `style` | `"bold red"` | The style for the module. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | + +### Variables + +| Variable | Example | Description | +| -------------- | ------- | -------------------------------------------------------------------- | +| status | `127` | The exit code of the last command | +| int | `127` | The exit code of the last command | +| common_meaning | `ERROR` | Meaning of the code if not a signal | +| signal_number | `9` | Signal number corresponding to the exit code, only if signalled | +| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled | +| maybe_int | `7` | Contains the exit code number when no meaning has been found | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml + +# ~/.config/starship.toml + +[status] +style = "bg:blue" +symbol = "🔴" +format = '[\[$symbol $status_common_meaning$status_signal_name$status_maybe_int\]]($style) ' +map_symbol = true +disabled = false + +``` + +## Swift + +The `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Package.swift` file +- The current directory contains a file with the `.swift` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | The style for the module. | +| `disabled` | `false` | Disables the `swift` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v5.2.4` | The version of `swift` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[swift] +format = "via [🏎 $version](red bold)" +``` + +## Terraform + +The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). The module will be shown if any of the following conditions are met: + +- The current directory contains a `.terraform` folder +- Current directory contains a file with the `.tf` or `.hcl` extensions + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | +| `symbol` | `"💠 "` | A format string shown before the terraform workspace. | +| `style` | `"bold 105"` | The style for the module. | +| `disabled` | `false` | Disables the `terraform` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `terraform` | +| workspace | `default` | The current terraform workspace | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +#### With Version + +```toml +# ~/.config/starship.toml + +[terraform] +format = "[🏎💨 $version$workspace]($style) " +``` + +#### Without version + +```toml +# ~/.config/starship.toml + +[terraform] +format = "[🏎💨 $workspace]($style) " +``` + +## Time + +The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `format` | `"at [$time]($style) "` | The format string for the module. | +| `use_12hr` | `false` | Enables 12 hour formatting | +| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. | +| `style` | `"bold yellow"` | The style for the module time | +| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. | +| `disabled` | `true` | Disables the `time` module. | +| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | + +If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ----------------------------------- | +| time | `13:08:10` | The current time. | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[time] +disabled = false +format = '🕙[\[ $time \]]($style) ' +time_format = "%T" +utc_time_offset = "-5" +time_range = "10:00:00-14:00:00" +``` + +## Username + +The `username` module shows active user's username. The module will be shown if any of the following conditions are met: + +- The current user is root +- The current user isn't the same as the one that is logged in +- The user is currently connected as an SSH session +- The variable `show_always` is set to true + +::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. ::: + +### Options + +| Option | Default | Description | +| ------------- | ----------------------- | ------------------------------------- | +| `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. | +| `show_always` | `false` | Always shows the `username` module. | +| `disabled` | `false` | Disables the `username` module. | + +### Variables + +| Variable | Example | Description | +| -------- | ------------ | ------------------------------------------------------------------------------------------- | +| `style` | `"red bold"` | Mirrors the value of option `style_root` when root is logged in and `style_user` otherwise. | +| `user` | `"matchai"` | The currently logged-in user ID. | + +### Example + +```toml +# ~/.config/starship.toml + +[username] +style_user = "white bold" +style_root = "black bold" +format = "user: [$user]($style) " +disabled = false +show_always = true +``` + +## Zig + +The `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met: + +- The current directory contains a `.zig` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | The style for the module. | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `disabled` | `false` | Disables the `zig` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v0.6.0` | The version of `zig` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[zig] +symbol = "⚡️ " +``` + +## Custom commands + +The `custom` modules show the output of some arbitrary commands. + +These modules will be shown if any of the following conditions are met: + +- 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 + +::: tip + +Multiple custom modules can be defined by using a `.`. + +::: + +::: tip + +The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined. + +::: + +::: tip + +[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! + +::: + +### 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` | `""` | 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. | + +### Variables + +| Variable | Description | +| --------- | -------------------------------------- | +| output | The output of shell command in `shell` | +| symbol | Mirrors the value of option `symbol` | +| style\* | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +#### Custom command shell + +`shell` accepts a non-empty list of strings, where: + +- The first string is the path to the shell to use to execute the command. +- Other following arguments are passed to the shell. + +If unset, it will fallback to STARSHIP_SHELL and then to "sh" on Linux, and "cmd /C" on Windows. + +The `command` will be passed in on 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. + +```toml +shell = ["pwsh", "-Command", "-"] +``` + +::: warning Make sure your custom shell configuration exits gracefully + +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). + +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. + +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. + +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. + +::: + +### Example + +```toml +# ~/.config/starship.toml + +[custom.foo] +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters +when = """ test "$HOME" == "$PWD" """ +format = " transcending [$output]($style)" + +[custom.time] +command = "time /T" +files = ["*.pst"] +shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +``` diff --git a/docs/pl-PL/faq/README.md b/docs/pl-PL/faq/README.md new file mode 100644 index 000000000..9bb23bf93 --- /dev/null +++ b/docs/pl-PL/faq/README.md @@ -0,0 +1,92 @@ +# 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) +- **Shell**: [Fish Shell](https://fishshell.com/) + - **Configuration**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish) + - **Prompt**: [Starship](https://starship.rs/) + +## How do I get command completion as shown in the demo GIF? + +Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions). + +## Do top level `format` and `.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, `.disabled` is the preferred way to do so for these reasons: + +- Disabling modules is more explicit than omitting them from the top level `format` +- Newly created modules will be added to the prompt as Starship is updated + +## The docs say Starship is cross-shell. Why isn't my preferred shell supported? + +The way Starship is built, it should be possible to add support for virtually any shell. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used. + +Here's a small example getting Starship working with bash: + +```sh +# Get the status code from the last command executed +STATUS=$? + +# Get the number of jobs running. +NUM_JOBS=$(jobs -p | wc -l) + +# Set the prompt to the output of `starship prompt` +PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)" +``` + +The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#Command-Duration) and to ensure that Starship is compatible with pre-installed Bash configurations. + +For a list of all flags accepted by `starship prompt`, use the following command: + +```sh +starship prompt --help +``` + +The prompt will use as much context as is provided, but no flags are "required". + +## How do I run Starship on Linux distributions with older versions of glibc? + +If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`: + +```sh +curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl +``` + +## Why don't I see a glyph symbol in my prompt? + +The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that: + +- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/). +- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice. +- You are using a [Nerd Font](https://www.nerdfonts.com/). + +To test your system, run the following commands in a terminal: + +```sh +echo -e "\xf0\x9f\x90\x8d" +echo -e "\xee\x82\xa0" +``` + +The first line should produce a [snake emoji](https://emojipedia.org/snake/), while the second should produce a [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs). + +If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose) + +## How do I uninstall Starship? + +Starship is just as easy to uninstall as it is to install in the first place. + +1. Remove any lines in your shell config (e.g. `~/.bashrc`) used to initialize Starship. +1. Delete the Starship binary. + +If Starship was installed using a package manager, please refer to their docs for uninstallation instructions. + +If Starship was installed using the `curl | bash` script, the following command will delete the binary: + +```sh +# Locate and delete the starship binary +rm "$(which starship)" +``` diff --git a/docs/pl-PL/guide/README.md b/docs/pl-PL/guide/README.md new file mode 100644 index 000000000..74b5b1e69 --- /dev/null +++ b/docs/pl-PL/guide/README.md @@ -0,0 +1,272 @@ +

+ Starship – Cross-shell prompt +

+ +

+ GitHub Actions workflow status + Crates.io version + Packaging status
+ Chat on Discord + Follow @StarshipPrompt on Twitter +

+ +

+ Website + · + Installation + · + Configuration +

+ +

+ English +   + 日本語 +   + 繁體中文 +   + Русский +   + Deutsch +   + 简体中文 +   + Español +   + Français +

+ +

+ +Starship with iTerm2 and the Snazzy theme + +**The minimal, blazing-fast, and infinitely customizable prompt for any shell!** + +- **Fast:** it's fast – _really really_ fast! 🚀 +- **Customizable:** configure every aspect of your prompt. +- **Universal:** works on any shell, on any operating system. +- **Intelligent:** shows relevant information at a glance. +- **Feature rich:** support for all your favorite tools. +- **Easy:** quick to install – start using it in minutes. + +

+Explore the Starship docs  ▶ +

+ + + +## 🚀 Installation + +### Prerequisites + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). + +### Getting Started + +1. Install the **starship** binary: + + + #### Install Latest Version + + + ##### From prebuilt binary, with Shell: + + ```sh + curl -fsSL https://starship.rs/install.sh | bash + ``` + + + ##### From source on [crates.io](https://crates.io/): + + ```sh + cargo install starship + ``` + + + #### Install via Package Manager + + + ##### With [Homebrew](https://brew.sh/): + + ```sh + brew install starship + ``` + + + ##### With [Scoop](https://scoop.sh): + + ```powershell + scoop install starship + ``` + +1. Add the init script to your shell's config file: + + + #### Bash + + Add the following to the end of `~/.bashrc`: + + ```sh + # ~/.bashrc + + eval "$(starship init bash)" + ``` + + + #### Fish + + Add the following to the end of `~/.config/fish/config.fish`: + + ```sh + # ~/.config/fish/config.fish + + starship init fish | source + ``` + + + #### Zsh + + Add the following to the end of `~/.zshrc`: + + ```sh + # ~/.zshrc + + eval "$(starship init zsh)" + ``` + + + #### PowerShell + + Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. + + ```sh + Invoke-Expression (&starship init powershell) + ``` + + + #### Ion + + Add the following to the end of `~/.config/ion/initrc`: + + ```sh + # ~/.config/ion/initrc + + eval $(starship init ion) + ``` + +## 🤝 Contributing + +We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). + +If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/). + +If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋 + +### Code Contributors + +This project exists thanks to all the people who contribute. [[Contribute](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]. + + +### Financial Contributors + +Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)] + +#### Individuals + + + +#### Organizations + +Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)] + + + + + + + + + + + + +## 💭 Inspired By + +Please check out these previous works that helped inspire the creation of starship. 🙏 + +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts. + +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript. + +- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons. + +

+
+ Starship rocket icon +

+ +## 📝 License + +Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).
This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed. diff --git a/docs/pl-PL/migrating-to-0.45.0/README.md b/docs/pl-PL/migrating-to-0.45.0/README.md new file mode 100644 index 000000000..95a847bf2 --- /dev/null +++ b/docs/pl-PL/migrating-to-0.45.0/README.md @@ -0,0 +1,267 @@ +# Migrating to v0.45.0 + +Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization. + +This guide is intended to walk you through the breaking changes. + +## `prompt_order` has been replaced by a root-level `format` + +Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship. + +Starship v0.45.0 instead accepts a `format` value, allowing for customization of the prompt outside of the modules themselves. + +**Example pre-v0.45.0 configuration** + +```toml +prompt_order = [ + "username", + "hostname", + "directory", + "git_branch", + "git_commit", + "git_state", + "git_status", + "cmd_duration", + "custom", + "line_break", + "jobs", + "battery", + "time", + "character", +] +``` + +**Example v0.45.0 configuration** + +```toml +format = """\ + $username\ + $hostname\ + $directory\ + $git_branch\ + $git_commit\ + $git_state\ + $git_status\ + $cmd_duration\ + $custom\ + $line_break\ + $jobs\ + $battery\ + $time\ + $character\ + """ +``` + +## Module `prefix` and `suffix` have been replaced by `format` + +Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered. + +Starship v0.45.0 instead accepts a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output. + +**Example pre-v0.45.0 configuration** + +```toml +[cmd_duration] +prefix = "took " +``` + +**Example v0.45.0 configuration** + +```toml +[cmd_duration] +# $duration – The command duration (e.g. "15s") +# $style – The default style of the module (e.g. "bold yellow") +format = "took [$duration]($style) " +``` + +### Affected Modules + +#### Character + +| Removed Property | Replacement | +| ----------------------- | ---------------- | +| `symbol` | `success_symbol` | +| `use_symbol_for_status` | `error_symbol` | +| `style_success` | `success_symbol` | +| `style_failure` | `error_symbol` | + +**Changes to the Default Configuration** + +```diff +[character] +-- symbol = "❯" +-- error_symbol = "✖" +-- use_symbol_for_status = true +-- vicmd_symbol = "❮" +++ success_symbol = "[❯](bold green)" +++ error_symbol = "[❯](bold red)" +++ vicmd_symbol = "[❮](bold green)" +``` + +Previously, the `use_symbol_for_status` property was used to configure the prompt to show the `error_symbol` when the last command resulted in a non-zero status code. + +With the release of v0.45.0, we now always use `error_symbol` after non-zero status codes, unifying `use_symbol_for_status` and `error_symbol` properties. + +To configure the prompt to use the older `use_symbol_for_status = true` configuration, add the following to your config file: + +```toml +[character] +error_symbol = "[✖](bold red)" +``` + +*Note:* The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples. + +#### Command Duration + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | + +**Changes to the Default Configuration** + +```diff +[cmd_duration] +-- prefix = "took " +++ format = "took [$duration]($style) " +``` + +#### Directory + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | + +**Changes to the Default Configuration** + +```diff +[directory] +-- prefix = "in " +++ format = "[$path]($style)[$read_only]($read_only_style) " +``` + +#### Environment Variable + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[env_var] +-- prefix = "" +-- suffix = "" +++ format = "with [$env_value]($style) " +``` + +#### Git Commit + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[git_commit] +-- prefix = "(" +-- suffix = ")" +++ format = '[\($hash\)]($style) ' +``` + +#### Git Status + +| Removed Property | Replacement | +| ----------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | +| `show_sync_count` | `format` | + +**Changes to the Default Configuration** + +```diff +[git_status] +-- prefix = "[" +-- suffix = "]" +-- show_sync_count = false +++ format = '([\[$all_status$ahead_behind\]]($style) )' +``` + +Previously, the `show_sync_count` property was used to configure the prompt to show the number of commits the branch was ahead or behind the remote branch. + +With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`. + +To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file: + +```toml +[git_status] +ahead = "⇡${count}" +diverged = "⇕⇡${ahead_count}⇣${behind_count}" +behind = "⇣${count}" +``` + +#### Hostname + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[hostname] +-- prefix = "" +-- suffix = "" +++ format = "[$hostname]($style) in " +``` + +#### Singularity + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `label` | `format` | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[singularity] +-- prefix = "" +-- suffix = "" +++ format = '[$symbol\[$env\]]($style) ' +``` + +#### Time + +| Removed Property | Replacement | +| ---------------- | ------------- | +| `format` | `time_format` | + +**Changes to the Default Configuration** + +```diff +[time] +-- format = "🕙[ %T ]" +++ time_format = "%T" +++ format = "at 🕙[$time]($style) " +``` + +#### Custom Commands + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[custom.example] +-- prefix = "" +-- suffix = "" +++ format = "[$symbol$output]($style) " +``` diff --git a/docs/pl-PL/presets/README.md b/docs/pl-PL/presets/README.md new file mode 100644 index 000000000..746364fa2 --- /dev/null +++ b/docs/pl-PL/presets/README.md @@ -0,0 +1,89 @@ +# Presets + +Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊 + +## Nerd Font Symbols + +This preset doesn't change anything except for the symbols used for each module. If emojis aren't your thing, this might catch your eye! + +![Screenshot of Nerd Font Symbols preset](/presets/nerd-font-symbols.png) + +### Prerequisites + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font) + +### Configuration + +```toml +[aws] +symbol = " " + +[conda] +symbol = " " + +[dart] +symbol = " " + +[directory] +read_only = " " + +[docker] +symbol = " " + +[elixir] +symbol = " " + +[elm] +symbol = " " + +[git_branch] +symbol = " " + +[golang] +symbol = " " + +[haskell] +symbol = " " + +[hg_branch] +symbol = " " + +[java] +symbol = " " + +[julia] +symbol = " " + +[memory_usage] +symbol = " " + +[nim] +symbol = " " + +[nix_shell] +symbol = " " + +[nodejs] +symbol = " " + +[package] +symbol = " " + +[perl] +symbol = " " + +[php] +symbol = " " + +[python] +symbol = " " + +[ruby] +symbol = " " + +[rust] +symbol = " " + +[swift] +symbol = "ﯣ " +``` diff --git a/docs/pt-BR/advanced-config/README.md b/docs/pt-BR/advanced-config/README.md index 6f8ea5955..b8773c3e0 100644 --- a/docs/pt-BR/advanced-config/README.md +++ b/docs/pt-BR/advanced-config/README.md @@ -82,7 +82,7 @@ Style strings are a list of words, separated by whitespace. The words are not ca where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing , though this may change in the future. The order of words in the string does not matter. -The `none` token overrides all other tokens in a string, so that e.g. `fg:red none fg:blue` will still create a string with no styling. It may become an error to use `none` in conjunction with other tokens in the future. +The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. A color specifier can be one of the following: diff --git a/docs/pt-BR/config/README.md b/docs/pt-BR/config/README.md index 3a9e08df6..994928c5c 100644 --- a/docs/pt-BR/config/README.md +++ b/docs/pt-BR/config/README.md @@ -51,7 +51,7 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" **Módulo**: Um componente no prompt que fornece informações baseado no contexto do seu SO. Por exemplo, o módulo "nodejs" mostra a versão do NodeJS instalado no seu computador, se o diretório atual for um projeto NodeJS. -**Variable**: Smaller sub-components that contains information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of NodeJS. +**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 NodeJS. By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. @@ -197,6 +197,7 @@ $golang\ $helm\ $java\ $julia\ +$kotlin\ $nim\ $nodejs\ $ocaml\ @@ -217,8 +218,8 @@ $gcloud\ $openstack\ $env_var\ $crystal\ -$cmd_duration\ $custom\ +$cmd_duration\ $line_break\ $lua\ $jobs\ @@ -302,26 +303,17 @@ The `battery` module shows how charged the device's battery is and its current c ### Opções -| Option | 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. | -| `format` | `"[$symbol$percentage]($style) "` | The format for the module. | -| `display` | [link](#battery-display) | Display threshold and style for the module. | -| `disabled` | `false` | Disables the `battery` module. | +| Option | 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. | +| `display` | [link](#battery-display) | Display threshold and style for the module. | +| `disabled` | `false` | Disables the `battery` module. | -
-There are also options for some uncommon battery states. - -| Variável | Descrição | -| ---------------- | --------------------------------------------------- | -| `unknown_symbol` | The symbol shown when the battery state is unknown. | -| `empty_symbol` | The symbol shown when the battery state is empty. | - -Note: Battery indicator will be hidden if the status is `unknown` or `empty` unless you specify the option in the config. - -
### Exemplo @@ -387,7 +379,7 @@ By default it only changes color. If you also want to change it's shape take a l | `success_symbol` | `"[❯](bold green)"` | The format string used before the text input if the previous command succeeded. | | `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. | | `vicmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | -| `disabled` | `false` | Desabilita o módulo `character`. | +| `disabled` | `false` | Disables the `character` module. | ### Variables @@ -456,7 +448,7 @@ The `cmake` module shows the currently installed version of CMake if any of the 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. -::: warning Não utilize o DEBUG-trap no Bash +::: warning Do not hook the DEBUG trap in Bash If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. @@ -513,14 +505,14 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c ### Opções -| Option | 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` | `"[$symbol$environment]($style) "` | The format for the module. | -| `ignore_base` | `true` | Ignores `base` environment when activated. | -| `disabled` | `false` | Disables the `conda` module. | +| Option | 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. | +| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `disabled` | `false` | Disables the `conda` module. | ### Variables @@ -730,13 +722,13 @@ The module will also show the Target Framework Moniker ( ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. @@ -1920,16 +1958,24 @@ The module will be shown if any of the following conditions are met: ### Opções -| Option | Padrão | Descrição | -| -------------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | O estilo do módulo. | -| `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | -| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | -| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. | -| `disabled` | `false` | Disables the `python` module. | +| Option | Padrão | Descrição | +| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | O estilo do módulo. | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | + +::: tip + +The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used. + +The default values and order for `python_binary` was chosen to first identify the Python version in a virtualenv/conda environments (which currently still add a `python`, no matter if it points to `python3` or `python2`). This has the side effect that if you still have a system Python 2 installed, it may be picked up before any Python 3 (at least on Linux Distros that always symlink `/usr/bin/python` to Python 2). If you do not work with Python 2 anymore but cannot remove the system Python 2, changing this to `"python3"` will hide any Python version 2, see example below. + +::: ### Variables @@ -1952,14 +1998,11 @@ symbol = "👾 " pyenv_version_name = true ``` -Using the `python3` binary to get the version. - -Note - The `python_binary` variable changes the binary that Starship executes to get the version of Python, it doesn't change the arguments that are used. - ```toml # ~/.config/starship.toml [python] +# Only use the `python3` binary to get the version. python_binary = "python3" ``` @@ -2040,13 +2083,14 @@ The `shlvl` module shows the current SHLVL ("shell level") environment variable, ### Opções -| Option | Padrão | Descrição | -| ----------- | ---------------------------- | --------------------------------------- | -| `threshold` | `2` | Display threshold. | -| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. | -| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | -| `style` | `"bold yellow"` | O estilo do módulo. | -| `disabled` | `true` | Disables the `shlvl` module. | +| Option | Padrão | Descrição | +| ----------- | ---------------------------- | ----------------------------------------------------------- | +| `threshold` | `2` | Display threshold. | +| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. | +| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | +| `repeat` | `false` | Causes `symbol` to be repeated by the current SHLVL amount. | +| `style` | `"bold yellow"` | O estilo do módulo. | +| `disabled` | `true` | Disables the `shlvl` module. | ### Variables @@ -2111,20 +2155,31 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Opções -| Option | Padrão | Descrição | -| ---------- | -------------------------- | ------------------------------------------------------ | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | A format string representing the symbol for the status | -| `style` | `"bold red"` | O estilo do módulo. | -| `disabled` | `true` | Disables the `status` module. | +| Option | Padrão | Descrição | +| ----------------------- | -------------------------- | ---------------------------------------------------- | +| `format` | `[$symbol$status]($style)` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | +| `style` | `"bold red"` | O estilo do módulo. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### Variables -| Variável | Exemplo | Descrição | -| --------- | ------- | ------------------------------------ | -| status | `127` | The exit code of the last command | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variável | Exemplo | Descrição | +| -------------- | ------- | -------------------------------------------------------------------- | +| status | `127` | The exit code of the last command | +| int | `127` | The exit code of the last command | +| common_meaning | `ERROR` | Meaning of the code if not a signal | +| signal_number | `9` | Signal number corresponding to the exit code, only if signalled | +| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled | +| maybe_int | `7` | Contains the exit code number when no meaning has been found | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | \*: This variable can only be used as a part of a style string @@ -2136,8 +2191,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y [status] style = "bg:blue" -symbol = "💣 " -format = '[\[$symbol$status\]]($style) ' +symbol = "🔴" +format = '[\[$symbol $status_common_meaning$status_signal_name$status_maybe_int\]]($style) ' +map_symbol = true disabled = false ``` @@ -2279,6 +2335,8 @@ The `username` module shows active user's username. The module will be shown if - The user is currently connected as an SSH session - The variable `show_always` is set to true +::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. ::: + ### Opções | Option | Padrão | Descrição | diff --git a/docs/pt-BR/faq/README.md b/docs/pt-BR/faq/README.md index 1d05fec1f..9bb23bf93 100644 --- a/docs/pt-BR/faq/README.md +++ b/docs/pt-BR/faq/README.md @@ -12,7 +12,7 @@ ## How do I get command completion as shown in the demo GIF? -Completion support 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). +Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions). ## Do top level `format` and `.disabled` do the same thing? @@ -21,7 +21,7 @@ Yes, they can both be used to disable modules in the prompt. If all you plan to - Disabling modules is more explicit than omitting them from the top level `format` - Newly created modules will be added to the prompt as Starship is updated -## The docs say Starship is cross-shell, but it doesn't support X shell. Why? +## 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. diff --git a/docs/pt-BR/guide/README.md b/docs/pt-BR/guide/README.md index cab6216c9..8d8d07b2a 100644 --- a/docs/pt-BR/guide/README.md +++ b/docs/pt-BR/guide/README.md @@ -79,13 +79,15 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png" alt="简体中文" />   - Español   - - **O prompt minimalista, extremamente rápido e infinitamente personalizável para qualquer shell!** - - **Rápido:** É rápido – _muito muito_ rápido! 🚀 - **Personalizável:** Configure todos os detalhes do seu prompt. - **Universal:** Funciona em qualquer shell, em qualquer sistema operacional. @@ -199,7 +199,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. + Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. ```sh Invoke-Expression (&starship init powershell) @@ -220,6 +220,8 @@ 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ê está interessado em ajudar contribuindo com o projeto, dê uma olhada no nosso [Guia de Contribuição](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Além disso, sinta-se à vontade para entrar no nosso [servidor no Discord](https://discord.gg/8Jzqu3T) e dizer oi. 👋 ### Contribuidores de código diff --git a/docs/pt-BR/presets/README.md b/docs/pt-BR/presets/README.md index 94e98e602..80a18c3d8 100644 --- a/docs/pt-BR/presets/README.md +++ b/docs/pt-BR/presets/README.md @@ -18,17 +18,15 @@ Essa predefinição não altera nada exceto os símbolos usados para cada módul [aws] symbol = " " -[battery] -full_symbol = "" -charging_symbol = "" -discharging_symbol = "" - [conda] symbol = " " [dart] symbol = " " +[directory] +read_only = " " + [docker] symbol = " " diff --git a/docs/pt-PT/advanced-config/README.md b/docs/pt-PT/advanced-config/README.md index 2b11f18ae..1cf6ebb78 100644 --- a/docs/pt-PT/advanced-config/README.md +++ b/docs/pt-PT/advanced-config/README.md @@ -82,7 +82,7 @@ Style strings are a list of words, separated by whitespace. The words are not ca where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing , though this may change in the future. The order of words in the string does not matter. -The `none` token overrides all other tokens in a string, so that e.g. `fg:red none fg:blue` will still create a string with no styling. It may become an error to use `none` in conjunction with other tokens in the future. +The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. A color specifier can be one of the following: diff --git a/docs/pt-PT/config/README.md b/docs/pt-PT/config/README.md index 03a9619bb..286375e20 100644 --- a/docs/pt-PT/config/README.md +++ b/docs/pt-PT/config/README.md @@ -51,7 +51,7 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" **Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of NodeJS that is currently installed on your computer, if your current directory is a NodeJS project. -**Variable**: Smaller sub-components that contains information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of NodeJS. +**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 NodeJS. By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. @@ -197,6 +197,7 @@ $golang\ $helm\ $java\ $julia\ +$kotlin\ $nim\ $nodejs\ $ocaml\ @@ -217,8 +218,8 @@ $gcloud\ $openstack\ $env_var\ $crystal\ -$cmd_duration\ $custom\ +$cmd_duration\ $line_break\ $lua\ $jobs\ @@ -302,26 +303,17 @@ The `battery` module shows how charged the device's battery is and its current c ### Options -| Option | Default | Description | -| -------------------- | --------------------------------- | ------------------------------------------------- | -| `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. | -| `format` | `"[$symbol$percentage]($style) "` | The format for the module. | -| `display` | [link](#battery-display) | Display threshold and style for the module. | -| `disabled` | `false` | Disables the `battery` module. | +| Option | Default | Description | +| -------------------- | --------------------------------- | --------------------------------------------------- | +| `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. | +| `display` | [link](#battery-display) | Display threshold and style for the module. | +| `disabled` | `false` | Disables the `battery` module. | -
-There are also options for some uncommon battery states. - -| Variable | Description | -| ---------------- | --------------------------------------------------- | -| `unknown_symbol` | The symbol shown when the battery state is unknown. | -| `empty_symbol` | The symbol shown when the battery state is empty. | - -Note: Battery indicator will be hidden if the status is `unknown` or `empty` unless you specify the option in the config. - -
### Example @@ -513,14 +505,14 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c ### Options -| Option | Default | Description | -| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. | -| `symbol` | `"🅒 "` | The symbol used before the environment name. | -| `style` | `"bold green"` | The style for the module. | -| `format` | `"[$symbol$environment]($style) "` | The format for the module. | -| `ignore_base` | `true` | Ignores `base` environment when activated. | -| `disabled` | `false` | Disables the `conda` module. | +| Option | Default | Description | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. | +| `symbol` | `"🅒 "` | The symbol used before the environment name. | +| `style` | `"bold green"` | The style for the module. | +| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `disabled` | `false` | Disables the `conda` module. | ### Variables @@ -730,13 +722,13 @@ The module will also show the Target Framework Moniker ( ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. @@ -1920,16 +1958,24 @@ The module will be shown if any of the following conditions are met: ### Options -| Option | Default | Description | -| -------------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | The style for the module. | -| `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | -| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | -| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. | -| `disabled` | `false` | Disables the `python` module. | +| Option | Default | Description | +| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | The style for the module. | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | + +::: tip + +The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used. + +The default values and order for `python_binary` was chosen to first identify the Python version in a virtualenv/conda environments (which currently still add a `python`, no matter if it points to `python3` or `python2`). This has the side effect that if you still have a system Python 2 installed, it may be picked up before any Python 3 (at least on Linux Distros that always symlink `/usr/bin/python` to Python 2). If you do not work with Python 2 anymore but cannot remove the system Python 2, changing this to `"python3"` will hide any Python version 2, see example below. + +::: ### Variables @@ -1952,14 +1998,11 @@ symbol = "👾 " pyenv_version_name = true ``` -Using the `python3` binary to get the version. - -Note - The `python_binary` variable changes the binary that Starship executes to get the version of Python, it doesn't change the arguments that are used. - ```toml # ~/.config/starship.toml [python] +# Only use the `python3` binary to get the version. python_binary = "python3" ``` @@ -2040,13 +2083,14 @@ The `shlvl` module shows the current SHLVL ("shell level") environment variable, ### Options -| Option | Default | Description | -| ----------- | ---------------------------- | --------------------------------------- | -| `threshold` | `2` | Display threshold. | -| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. | -| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `true` | Disables the `shlvl` module. | +| Option | Default | Description | +| ----------- | ---------------------------- | ----------------------------------------------------------- | +| `threshold` | `2` | Display threshold. | +| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. | +| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | +| `repeat` | `false` | Causes `symbol` to be repeated by the current SHLVL amount. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `true` | Disables the `shlvl` module. | ### Variables @@ -2111,20 +2155,31 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ---------- | -------------------------- | ------------------------------------------------------ | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | A format string representing the symbol for the status | -| `style` | `"bold red"` | The style for the module. | -| `disabled` | `true` | Disables the `status` module. | +| Option | Default | Description | +| ----------------------- | -------------------------- | ---------------------------------------------------- | +| `format` | `[$symbol$status]($style)` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | +| `style` | `"bold red"` | The style for the module. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### Variables -| Variable | Example | Description | -| --------- | ------- | ------------------------------------ | -| status | `127` | The exit code of the last command | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | Description | +| -------------- | ------- | -------------------------------------------------------------------- | +| status | `127` | The exit code of the last command | +| int | `127` | The exit code of the last command | +| common_meaning | `ERROR` | Meaning of the code if not a signal | +| signal_number | `9` | Signal number corresponding to the exit code, only if signalled | +| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled | +| maybe_int | `7` | Contains the exit code number when no meaning has been found | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | \*: This variable can only be used as a part of a style string @@ -2136,8 +2191,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y [status] style = "bg:blue" -symbol = "💣 " -format = '[\[$symbol$status\]]($style) ' +symbol = "🔴" +format = '[\[$symbol $status_common_meaning$status_signal_name$status_maybe_int\]]($style) ' +map_symbol = true disabled = false ``` @@ -2279,6 +2335,8 @@ The `username` module shows active user's username. The module will be shown if - The user is currently connected as an SSH session - The variable `show_always` is set to true +::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. ::: + ### Options | Option | Default | Description | diff --git a/docs/pt-PT/faq/README.md b/docs/pt-PT/faq/README.md index 1d05fec1f..9bb23bf93 100644 --- a/docs/pt-PT/faq/README.md +++ b/docs/pt-PT/faq/README.md @@ -12,7 +12,7 @@ ## How do I get command completion as shown in the demo GIF? -Completion support 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). +Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions). ## Do top level `format` and `.disabled` do the same thing? @@ -21,7 +21,7 @@ Yes, they can both be used to disable modules in the prompt. If all you plan to - Disabling modules is more explicit than omitting them from the top level `format` - Newly created modules will be added to the prompt as Starship is updated -## The docs say Starship is cross-shell, but it doesn't support X shell. Why? +## 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. diff --git a/docs/pt-PT/guide/README.md b/docs/pt-PT/guide/README.md index 6134aa2a9..74b5b1e69 100644 --- a/docs/pt-PT/guide/README.md +++ b/docs/pt-PT/guide/README.md @@ -79,13 +79,15 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png" alt="简体中文" />
  - Español   - - **The minimal, blazing-fast, and infinitely customizable prompt for any shell!** - - **Fast:** it's fast – _really really_ fast! 🚀 - **Customizable:** configure every aspect of your prompt. - **Universal:** works on any shell, on any operating system. @@ -199,7 +199,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. + Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. ```sh Invoke-Expression (&starship init powershell) @@ -220,6 +220,8 @@ We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). +If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/). + If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋 ### Code Contributors diff --git a/docs/pt-PT/presets/README.md b/docs/pt-PT/presets/README.md index 1476c0b43..746364fa2 100644 --- a/docs/pt-PT/presets/README.md +++ b/docs/pt-PT/presets/README.md @@ -18,17 +18,15 @@ This preset doesn't change anything except for the symbols used for each module. [aws] symbol = " " -[battery] -full_symbol = "" -charging_symbol = "" -discharging_symbol = "" - [conda] symbol = " " [dart] symbol = " " +[directory] +read_only = " " + [docker] symbol = " " diff --git a/docs/ru-RU/advanced-config/README.md b/docs/ru-RU/advanced-config/README.md index 5dca3d3a7..c6399c2f1 100644 --- a/docs/ru-RU/advanced-config/README.md +++ b/docs/ru-RU/advanced-config/README.md @@ -82,7 +82,7 @@ starship_precmd_user_func="set_win_title" где `` является цветовым спецификатором (обсуждается ниже). `fg:` и `` в настоящее время делают одно и то же, хотя это может измениться в будущем. Порядок слов в строке не имеет значения. -Токен `none` переопределяет все остальные токены в строке, например `fg:red none fg:blue` все равно создаст строку без стиля. Использование `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` в сочетании с другими токенами может стать ошибкой в будущем. Цветовой спецификатор может быть одним из следующих: diff --git a/docs/ru-RU/config/README.md b/docs/ru-RU/config/README.md index c43888e1b..1e29d10ed 100644 --- a/docs/ru-RU/config/README.md +++ b/docs/ru-RU/config/README.md @@ -51,7 +51,7 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" **Модуль**: Компонент строки, дающий информацию на основе контекстной информации вашей ОС. Например, модуль "nodejs" показывает установленную версию NodeJS на вашем компьютере, если вы находитесь в директории проекта NodeJS. -**Переменные**: Маленькие подкомпоненты, содержащие информацию, предоставленную модулем. Например, переменная "version" в модуле "nodejs" содержит текущую версию NodeJS. +**Variable**: Smaller sub-components that contain information provided by the module. Например, переменная "version" в модуле "nodejs" содержит текущую версию NodeJS. По традициям, большинство модулей имеют префикс цвета терминала по умолчанию (например, `через` в "узлах") и пустое пространство как суффикс. @@ -162,13 +162,13 @@ format = """ # Подождите 10 милисекунд пока starship прочитает файлы в этой директории. scan_timeout = 10 -# Выключить новую строку в начале запроса +# Выключить новую строку в начале подсказки (prompt) add_newline = false ``` ### Формат оболочки по умолчанию -The default `format` is used to define the format of the prompt, if empty or no `format` is provided. Значение по умолчанию: +Формат по умолчанию `format` используется для определения формата подсказки (prompt), если `format` пустой или отсутствует. Значение по умолчанию: ```toml format = "$all" @@ -197,6 +197,7 @@ $golang\ $helm\ $java\ $julia\ +$kotlin\ $nim\ $nodejs\ $ocaml\ @@ -217,8 +218,8 @@ $gcloud\ $openstack\ $env_var\ $crystal\ -$cmd_duration\ $custom\ +$cmd_duration\ $line_break\ $lua\ $jobs\ @@ -238,7 +239,7 @@ $character""" | Параметр | По умолчанию | Описание | | ---------------- | ------------------------------------------------ | -------------------------------------------------------------- | -| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. | +| `format` | `'on [$symbol$profile(\($region\))]($style) '` | Формат модуля. | | `symbol` | `"☁️ "` | Символ перед отображением текущего профиля AWS. | | `region_aliases` | | Таблица региона псевдонимов, отображаемая вместе с именем AWS. | | `style` | `"bold yellow"` | Стиль модуля. | @@ -248,16 +249,16 @@ $character""" | Переменная | Пример | Описание | | ---------- | ---------------- | ------------------------------------ | -| регион | `ap-northeast-1` | The current AWS region | -| профиль | `астронавты` | The current AWS profile | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| регион | `ap-northeast-1` | Текущий регион AWS | +| профиль | `astronauts` | Текущий профиль AWS | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style -### Examples +### Примеры -#### Display everything +#### Отобразить все ```toml # ~/.config/starship.toml @@ -271,7 +272,7 @@ ap-southeast-2 = "au" us-east-1 = "va" ``` -#### Display region +#### Отобразить регион ```toml # ~/.config/starship.toml @@ -285,7 +286,7 @@ ap-southeast-2 = "au" us-east-1 = "va" ``` -#### Display profile +#### Отобразить профиль ```toml # ~/.config/starship.toml @@ -302,26 +303,17 @@ symbol = "🅰 " ### Опции -| Параметр | По умолчанию | Описание | -| -------------------- | --------------------------------- | ----------------------------------------------- | -| `full_symbol` | `"•"` | Символ, отображаемый при полной батарее. | -| `charging_symbol` | `"⇡"` | Символ, показываемый при зарядке аккумулятора. | -| `discharging_symbol` | `"⇣"` | Символ, показываемый при разрядке аккумулятора. | -| `format` | `"[$symbol$percentage]($style) "` | The format for the module. | -| `display` | [ссылка](#battery-display) | Порог отображения и стиль для модуля. | -| `disabled` | `false` | Отключает модуль `battery`. | +| Параметр | По умолчанию | Описание | +| -------------------- | --------------------------------- | --------------------------------------------------- | +| `full_symbol` | `""` | Символ, отображаемый при полной батарее. | +| `charging_symbol` | `""` | Символ, показываемый при зарядке аккумулятора. | +| `discharging_symbol` | `""` | Символ, показываемый при разрядке аккумулятора. | +| `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) "` | Формат модуля. | +| `display` | [ссылка](#battery-display) | Display threshold and style for the module. | +| `disabled` | `false` | Disables the `battery` module. | -
-Также, есть опции для некоторых нетипичных состояний батареи. - -| Переменная | Описание | -| ---------------- | ------------------------------------------------------- | -| `unknown_symbol` | Символ, отображаемый при неизвестном состоянии батареи. | -| `empty_symbol` | Символ, отображаемый при пустом состоянии батареи. | - -Примечание: Индикатор батареи будет скрыт при состоянии `unknown` или `empty`, если вы не указали параметр в настройках. - -
### Пример @@ -336,7 +328,7 @@ discharging_symbol = "💀" ### Отображение батареи -Параметр `display` используется для определения того, когда индикатор батареи должен быть показан (threshhold) и как он выглядит (style). Если `display` не предоставлено. Значение по умолчанию: +The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. Значение по умолчанию: ```toml [[battery.display]] @@ -346,12 +338,12 @@ style = "bold red" #### Опции -Опция `display` представляет собой массив следующей таблицы. +The `display` option is an array of the following table. -| Параметр | Описание | -| ----------- | -------------------------------------------------------- | -| `threshold` | Верхняя граница опции отображения. | -| `style` | Используемый стиль, если используется опция отображения. | +| Параметр | Описание | +| ----------- | ----------------------------------------------- | +| `threshold` | The upper bound for the display option. | +| `style` | The style used if the display option is in use. | #### Пример @@ -370,9 +362,9 @@ style = "bold yellow" ## Символ -Модуль `character` показывает символ (обычно, стрелка) рядом с вводимым текстом в терминале. +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. -Символ показывает, была ли последняя команда успешной или нет. It can do this in two ways: +The character will tell you whether the last command was successful or not. It can do this in two ways: - changing color (`red`/`green`) - changing shape (`❯`/`✖`) @@ -387,7 +379,7 @@ By default it only changes color. If you also want to change it's shape take a l | `success_symbol` | `"[❯](bold green)"` | The format string used before the text input if the previous command succeeded. | | `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. | | `vicmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | -| `disabled` | `false` | Отключает модуль `character`. | +| `disabled` | `false` | Disables the `character` module. | ### Переменные @@ -395,7 +387,7 @@ By default it only changes color. If you also want to change it's shape take a l | ---------- | ------ | --------------------------------------------------------------------- | | symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` | -### Examples +### Примеры #### With custom error shape @@ -437,7 +429,7 @@ The `cmake` module shows the currently installed version of CMake if any of the | Параметр | По умолчанию | Описание | | ---------- | ---------------------------------- | -------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `format` | `"via [$symbol$version]($style) "` | Формат модуля. | | `symbol` | `"喝 "` | The symbol used before the version of cmake. | | `style` | `"bold blue"` | Стиль модуля. | | `disabled` | `false` | Disables the `cmake` module. | @@ -447,34 +439,34 @@ The `cmake` module shows the currently installed version of CMake if any of the | Переменная | Пример | Описание | | ---------- | --------- | ------------------------------------ | | version | `v3.17.3` | The version of cmake | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ## Длительность команды -Модуль `cmd_duration` показывает время исполнения последней команды. Модуль будет показан только, если команда заняла более двух секунд, или если задан параметр `min_time`. +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. -::: warning Не подключайте ловушку DEBUG к Bash +::: warning Do not hook the DEBUG trap in Bash -Если вы испоьзуете Starship в `bash`, не подключайте ловушку `DEBUG` после запуска `eval $(starship init $0)`, иначе этот модуль сломается. +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. ::: -Пользователи Bash, которым нужна функциональность, подобная preexec, могут использовать [фреймворк bash_preexec от rcaloras](https://github.com/rcaloras/bash-preexec). Просто определите массивы `preexec_functions` и `precmd_functions` перед запуском `eval $(starship init $0)`, а затем продолжайте нормально. +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. ### Опции -| Параметр | По умолчанию | Описание | -| -------------------- | ----------------------------- | -------------------------------------------------------------------- | -| `min_time` | `2_000` | Кратчайшая продолжительность для показа времени (в миллисекундах). | -| `show_milliseconds` | `false` | Показывать миллисекунды в дополнение к секундам в продолжительности. | -| `format` | `"took [$duration]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | Стиль модуля. | -| `disabled` | `false` | Отключает модуль `cmd_duration`. | -| `show_notifications` | `false` | Show desktop notifications when command completes. | -| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | +| Параметр | По умолчанию | Описание | +| -------------------- | ----------------------------- | ---------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | Формат модуля. | +| `style` | `"bold yellow"` | Стиль модуля. | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `show_notifications` | `false` | Show desktop notifications when command completes. | +| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | ::: tip @@ -487,9 +479,9 @@ Showing desktop notifications requires starship to be built with `rust-notify` s | Переменная | Пример | Описание | | ---------- | -------- | --------------------------------------- | | duration | `16m40s` | The time it took to execute the command | -| style\* | | Mirrors the value of option `style` | +| style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -513,24 +505,24 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c ### Опции -| Параметр | По умолчанию | Описание | -| ------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `truncation_length` | `1` | Количество каталогов, в которых путь к окружению должен быть усечен, если окружение было создано через `conda create -p [path]`. `0` означает без усечения. Также смотрите модуль [`directory`](#directory). | -| `symbol` | `"🅒 "` | Символ перед названием окружения. | -| `style` | `"bold green"` | Стиль модуля. | -| `format` | `"[$symbol$environment]($style) "` | The format for the module. | -| `ignore_base` | `true` | Ignores `base` environment when activated. | -| `disabled` | `false` | Отключает модуль `conda`. | +| Параметр | По умолчанию | Описание | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. | +| `symbol` | `"🅒 "` | The symbol used before the environment name. | +| `style` | `"bold green"` | Стиль модуля. | +| `format` | `"via [$symbol$environment]($style) "` | Формат модуля. | +| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `disabled` | `false` | Disables the `conda` module. | ### Переменные | Переменная | Пример | Описание | | ----------- | ------------ | ------------------------------------ | -| environment | `астронавты` | The current conda environment | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| environment | `astronauts` | The current conda environment | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -543,29 +535,29 @@ format = "[$symbol$environment](dimmed green) " ## Crystal -The `crystal` module shows the currently installed version of Crystal. The module will be shown if any of the following conditions are met: +The `crystal` module shows the currently installed version of Crystal. Модуль будет показан, если любое из следующих условий соблюдено: - Текущий каталог содержит файл `shard.yml` - Текущий каталог содержит файл `.cr` ### Опции -| Параметр | По умолчанию | Описание | -| ---------- | ---------------------------------- | ------------------------------------------------------- | -| `symbol` | `"🔮 "` | Символ, используемый перед отображением версии crystal. | -| `style` | `"bold red"` | Стиль модуля. | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `disabled` | `false` | Отключает модуль `crystal`. | +| Параметр | По умолчанию | Описание | +| ---------- | ---------------------------------- | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | Стиль модуля. | +| `format` | `"via [$symbol$version]($style) "` | Формат модуля. | +| `disabled` | `false` | Disables the `crystal` module. | ### Переменные | Переменная | Пример | Описание | | ---------- | --------- | ------------------------------------ | | version | `v0.32.1` | The version of `crystal` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -578,7 +570,7 @@ format = "via [✨ $version](bold blue) " ## Dart -The `dart` module shows the currently installed version of Dart. The module will be shown if any of the following conditions are met: +The `dart` module shows the currently installed version of Dart. Модуль будет показан, если любое из следующих условий соблюдено: - The current directory contains a file with `.dart` extension - The current directory contains a `.dart_tool` directory @@ -588,7 +580,7 @@ The `dart` module shows the currently installed version of Dart. The module will | Параметр | По умолчанию | Описание | | ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `format` | `"via [$symbol$version]($style) "` | Формат модуля. | | `symbol` | `"🎯 "` | A format string representing the symbol of Dart | | `style` | `"bold blue"` | Стиль модуля. | | `disabled` | `false` | Disables the `dart` module. | @@ -598,10 +590,10 @@ The `dart` module shows the currently installed version of Dart. The module will | Переменная | Пример | Описание | | ---------- | -------- | ------------------------------------ | | version | `v2.8.4` | The version of `dart` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -622,25 +614,25 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Опции -| Параметр | По умолчанию | Описание | -| ------------------- | -------------------------------------------------- | ---------------------------------------------------------------------------- | -| `truncation_length` | `3` | Количество родительских папок, к которым должен быть усечен текущий каталог. | -| `truncate_to_repo` | `true` | Следует или нет обрезать до корня репозитория git, в котором вы находитесь. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | -| `style` | `"bold cyan"` | Стиль модуля. | -| `disabled` | `false` | Отключает модуль `directory`. | -| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | -| `read_only_style` | `"red"` | The style for the read only symbol. | -| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | +| Параметр | По умолчанию | Описание | +| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | Формат модуля. | +| `style` | `"bold cyan"` | Стиль модуля. | +| `disabled` | `false` | Disables the `directory` module. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
This module has a few advanced configuration options that control how the directory is displayed. -| Advanced Option | По умолчанию | Описание | -| --------------------------- | ------------ | --------------------------------------------------------------------------------- | -| `substitutions` | | A table of substitutions to be made to the path. | -| `fish_style_pwd_dir_length` | `0` | Количество символов, используемых при использовании логики создания пути из fish. | -| `use_logical_path` | `true` | Отображает логический путь от оболочки (`PWD`) вместо пути от ОС. | +| Advanced Option | По умолчанию | Описание | +| --------------------------- | ------------ | ---------------------------------------------------------------------------------------- | +| `substitutions` | | A table of substitutions to be made to the path. | +| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. | +| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. | `substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD. @@ -659,9 +651,9 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | Переменная | Пример | Описание | | ---------- | --------------------- | ----------------------------------- | | path | `"D:/Projects"` | The current directory path | -| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | +| style\* | `"black bold dimmed"` | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -681,7 +673,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | Параметр | По умолчанию | Описание | | ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | +| `format` | `"via [$symbol$context]($style) "` | Формат модуля. | | `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | | `style` | `"blue bold"` | Стиль модуля. | | `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | @@ -692,10 +684,10 @@ The `docker_context` module shows the currently active [Docker context](https:// | Переменная | Пример | Описание | | ---------- | -------------- | ------------------------------------ | | context | `test_context` | The current docker context | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -730,13 +722,13 @@ The module will also show the Target Framework Moniker ( ⚠ Показана версия пакета, исходный код которого находится в текущем каталоге, а не в менеджере пакетов. @@ -1768,7 +1806,7 @@ The `package` module is shown when the current directory is the repository for a | Параметр | По умолчанию | Описание | | ----------------- | ---------------------------------- | ---------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `format` | `"via [$symbol$version]($style) "` | Формат модуля. | | `symbol` | `"📦 "` | The symbol used before displaying the version the package. | | `style` | `"bold 208"` | Стиль модуля. | | `display_private` | `false` | Enable displaying version for packages marked as private. | @@ -1779,10 +1817,10 @@ The `package` module is shown when the current directory is the repository for a | Переменная | Пример | Описание | | ---------- | -------- | ------------------------------------ | | version | `v1.0.0` | The version of your package | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -1795,7 +1833,7 @@ format = "via [🎁 $version](208 bold) " ## Perl -The `perl` module shows the currently installed version of Perl. The module will be shown if any of the following conditions are met: +The `perl` module shows the currently installed version of Perl. Модуль будет показан, если любое из следующих условий соблюдено: - The current directory contains a `Makefile.PL` or `Build.PL` file - The current directory contains a `cpanfile` or `cpanfile.snapshot` file @@ -1817,8 +1855,8 @@ The `perl` module shows the currently installed version of Perl. The module will | Переменная | Пример | Описание | | ---------- | --------- | ------------------------------------ | | version | `v5.26.1` | The version of `perl` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | ### Пример @@ -1831,7 +1869,7 @@ format = "via [🦪 $version]($style) " ## PHP -The `php` module shows the currently installed version of PHP. The module will be shown if any of the following conditions are met: +The `php` module shows the currently installed version of PHP. Модуль будет показан, если любое из следующих условий соблюдено: - The current directory contains a `composer.json` file - The current directory contains a `.php-version` file @@ -1841,7 +1879,7 @@ The `php` module shows the currently installed version of PHP. The module will b | Параметр | По умолчанию | Описание | | ---------- | ---------------------------------- | ----------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `format` | `"via [$symbol$version]($style) "` | Формат модуля. | | `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | | `style` | `"147 bold"` | Стиль модуля. | | `disabled` | `false` | Disables the `php` module. | @@ -1851,10 +1889,10 @@ The `php` module shows the currently installed version of PHP. The module will b | Переменная | Пример | Описание | | ---------- | -------- | ------------------------------------ | | version | `v7.3.8` | The version of `php` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -1867,7 +1905,7 @@ format = "via [🔹 $version](147 bold) " ## PureScript -The `purescript` module shows the currently installed version of PureScript version. The module will be shown if any of the following conditions are met: +The `purescript` module shows the currently installed version of PureScript version. Модуль будет показан, если любое из следующих условий соблюдено: - The current directory contains a `spago.dhall` file - The current directory contains a \*.purs files @@ -1876,7 +1914,7 @@ The `purescript` module shows the currently installed version of PureScript vers | Параметр | По умолчанию | Описание | | ---------- | ---------------------------------- | ------------------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `format` | `"via [$symbol$version]($style) "` | Формат модуля. | | `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | | `style` | `"bold white"` | Стиль модуля. | | `disabled` | `false` | Disables the `purescript` module. | @@ -1886,10 +1924,10 @@ The `purescript` module shows the currently installed version of PureScript vers | Переменная | Пример | Описание | | ---------- | -------- | ------------------------------------ | | version | `0.13.5` | The version of `purescript` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -1906,7 +1944,7 @@ The `python` module shows the currently installed version of Python and the curr If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`. -The module will be shown if any of the following conditions are met: +Модуль будет показан, если любое из следующих условий соблюдено: - The current directory contains a `.python-version` file - The current directory contains a `requirements.txt` file @@ -1920,24 +1958,32 @@ The module will be shown if any of the following conditions are met: ### Опции -| Параметр | По умолчанию | Описание | -| -------------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | Стиль модуля. | -| `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | -| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | -| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. | -| `disabled` | `false` | Disables the `python` module. | +| Параметр | По умолчанию | Описание | +| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | Формат модуля. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | Стиль модуля. | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | + +::: tip + +The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used. + +The default values and order for `python_binary` was chosen to first identify the Python version in a virtualenv/conda environments (which currently still add a `python`, no matter if it points to `python3` or `python2`). This has the side effect that if you still have a system Python 2 installed, it may be picked up before any Python 3 (at least on Linux Distros that always symlink `/usr/bin/python` to Python 2). If you do not work with Python 2 anymore but cannot remove the system Python 2, changing this to `"python3"` will hide any Python version 2, see example below. + +::: ### Переменные | Переменная | Пример | Описание | | ------------ | --------------- | ------------------------------------------ | | version | `"v3.8.1"` | The version of `python` | -| symbol | `"🐍 "` | Mirrors the value of option `symbol` | -| style | `"yellow bold"` | Mirrors the value of option `style` | +| symbol | `"🐍 "` | Отражает значение параметра `symbol` | +| style | `"yellow bold"` | Отражает значение параметра `style` | | pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | | virtualenv | `"venv"` | The current `virtualenv` name | @@ -1952,20 +1998,17 @@ symbol = "👾 " pyenv_version_name = true ``` -Using the `python3` binary to get the version. - -Note - The `python_binary` variable changes the binary that Starship executes to get the version of Python, it doesn't change the arguments that are used. - ```toml # ~/.config/starship.toml [python] +# Only use the `python3` binary to get the version. python_binary = "python3" ``` ## Ruby -The `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met: +The `ruby` module shows the currently installed version of Ruby. Модуль будет показан, если любое из следующих условий соблюдено: - The current directory contains a `Gemfile` file - The current directory contains a `.ruby-version` file @@ -1975,7 +2018,7 @@ The `ruby` module shows the currently installed version of Ruby. The module will | Параметр | По умолчанию | Описание | | ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `format` | `"via [$symbol$version]($style) "` | Формат модуля. | | `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | | `style` | `"bold red"` | Стиль модуля. | | `disabled` | `false` | Disables the `ruby` module. | @@ -1985,10 +2028,10 @@ The `ruby` module shows the currently installed version of Ruby. The module will | Переменная | Пример | Описание | | ---------- | -------- | ------------------------------------ | | version | `v2.5.1` | The version of `ruby` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2001,7 +2044,7 @@ symbol = "🔺 " ## Rust -The `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met: +The `rust` module shows the currently installed version of Rust. Модуль будет показан, если любое из следующих условий соблюдено: - The current directory contains a `Cargo.toml` file - The current directory contains a file with the `.rs` extension @@ -2010,7 +2053,7 @@ The `rust` module shows the currently installed version of Rust. The module will | Параметр | По умолчанию | Описание | | ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `format` | `"via [$symbol$version]($style) "` | Формат модуля. | | `symbol` | `"🦀 "` | A format string representing the symbol of Rust | | `style` | `"bold red"` | Стиль модуля. | | `disabled` | `false` | Disables the `rust` module. | @@ -2020,10 +2063,10 @@ The `rust` module shows the currently installed version of Rust. The module will | Переменная | Пример | Описание | | ---------- | ----------------- | ------------------------------------ | | version | `v1.43.0-nightly` | The version of `rustc` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2040,23 +2083,24 @@ The `shlvl` module shows the current SHLVL ("shell level") environment variable, ### Опции -| Параметр | По умолчанию | Описание | -| ----------- | ---------------------------- | --------------------------------------- | -| `threshold` | `2` | Display threshold. | -| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. | -| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | -| `style` | `"bold yellow"` | Стиль модуля. | -| `disabled` | `true` | Disables the `shlvl` module. | +| Параметр | По умолчанию | Описание | +| ----------- | ---------------------------- | ----------------------------------------------------------- | +| `threshold` | `2` | Display threshold. | +| `format` | `"[$symbol$shlvl]($style) "` | Формат модуля. | +| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | +| `repeat` | `false` | Causes `symbol` to be repeated by the current SHLVL amount. | +| `style` | `"bold yellow"` | Стиль модуля. | +| `disabled` | `true` | Disables the `shlvl` module. | ### Переменные | Переменная | Пример | Описание | | ---------- | ------ | ------------------------------------ | | shlvl | `3` | The current value of SHLVL | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2077,7 +2121,7 @@ The `singularity` module shows the current singularity image, if inside a contai | Параметр | По умолчанию | Описание | | ---------- | -------------------------------- | ------------------------------------------------ | -| `format` | `'[$symbol\[$env\]]($style) '` | The format for the module. | +| `format` | `'[$symbol\[$env\]]($style) '` | Формат модуля. | | `symbol` | `""` | A format string displayed before the image name. | | `style` | `"bold dimmed blue"` | Стиль модуля. | | `disabled` | `false` | Disables the `singularity` module. | @@ -2087,10 +2131,10 @@ The `singularity` module shows the current singularity image, if inside a contai | Переменная | Пример | Описание | | ---------- | ------------ | ------------------------------------ | | env | `centos.img` | The current singularity image | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2111,22 +2155,33 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Опции -| Параметр | По умолчанию | Описание | -| ---------- | -------------------------- | ------------------------------------------------------ | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | A format string representing the symbol for the status | -| `style` | `"bold red"` | Стиль модуля. | -| `disabled` | `true` | Disables the `status` module. | +| Параметр | По умолчанию | Описание | +| ----------------------- | -------------------------- | ---------------------------------------------------- | +| `format` | `[$symbol$status]($style)` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | +| `style` | `"bold red"` | Стиль модуля. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### Переменные -| Переменная | Пример | Описание | -| ---------- | ------ | ------------------------------------ | -| status | `127` | The exit code of the last command | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Переменная | Пример | Описание | +| -------------- | ------- | -------------------------------------------------------------------- | +| status | `127` | The exit code of the last command | +| int | `127` | The exit code of the last command | +| common_meaning | `ERROR` | Meaning of the code if not a signal | +| signal_number | `9` | Signal number corresponding to the exit code, only if signalled | +| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled | +| maybe_int | `7` | Contains the exit code number when no meaning has been found | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2136,15 +2191,16 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y [status] style = "bg:blue" -symbol = "💣 " -format = '[\[$symbol$status\]]($style) ' +symbol = "🔴" +format = '[\[$symbol $status_common_meaning$status_signal_name$status_maybe_int\]]($style) ' +map_symbol = true disabled = false ``` ## Swift -The `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met: +The `swift` module shows the currently installed version of Swift. Модуль будет показан, если любое из следующих условий соблюдено: - The current directory contains a `Package.swift` file - The current directory contains a file with the `.swift` extension @@ -2153,7 +2209,7 @@ The `swift` module shows the currently installed version of Swift. The module wi | Параметр | По умолчанию | Описание | | ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `format` | `"via [$symbol$version]($style) "` | Формат модуля. | | `symbol` | `"🐦 "` | A format string representing the symbol of Swift | | `style` | `"bold 202"` | Стиль модуля. | | `disabled` | `false` | Disables the `swift` module. | @@ -2163,10 +2219,10 @@ The `swift` module shows the currently installed version of Swift. The module wi | Переменная | Пример | Описание | | ---------- | -------- | ------------------------------------ | | version | `v5.2.4` | The version of `swift` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2179,7 +2235,7 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). The module will be shown if any of the following conditions are met: +The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). Модуль будет показан, если любое из следующих условий соблюдено: - The current directory contains a `.terraform` folder - Current directory contains a file with the `.tf` or `.hcl` extensions @@ -2199,10 +2255,10 @@ The `terraform` module shows the currently selected terraform workspace and vers | ---------- | ---------- | ------------------------------------ | | version | `v0.12.24` | The version of `terraform` | | workspace | `default` | The current terraform workspace | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2253,9 +2309,9 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | Переменная | Пример | Описание | | ---------- | ---------- | ----------------------------------- | | time | `13:08:10` | The current time. | -| style\* | | Mirrors the value of option `style` | +| style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2272,20 +2328,22 @@ time_range = "10:00:00-14:00:00" ## Username -The `username` module shows active user's username. The module will be shown if any of the following conditions are met: +The `username` module shows active user's username. Модуль будет показан, если любое из следующих условий соблюдено: - The current user is root - The current user isn't the same as the one that is logged in - The user is currently connected as an SSH session - The variable `show_always` is set to true +::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. ::: + ### Опции | Параметр | По умолчанию | Описание | | ------------- | ----------------------- | ------------------------------------- | | `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 "` | Формат модуля. | | `show_always` | `false` | Always shows the `username` module. | | `disabled` | `false` | Disables the `username` module. | @@ -2311,7 +2369,7 @@ show_always = true ## Zig -The `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met: +The `zig` module shows the currently installed version of Zig. Модуль будет показан, если любое из следующих условий соблюдено: - The current directory contains a `.zig` file @@ -2321,7 +2379,7 @@ The `zig` module shows the currently installed version of Zig. The module will b | ---------- | ---------------------------------- | ----------------------------------------------------- | | `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | | `style` | `"bold yellow"` | Стиль модуля. | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `format` | `"via [$symbol$version]($style) "` | Формат модуля. | | `disabled` | `false` | Disables the `zig` module. | ### Переменные @@ -2329,10 +2387,10 @@ The `zig` module shows the currently installed version of Zig. The module will b | Переменная | Пример | Описание | | ---------- | -------- | ------------------------------------ | | version | `v0.6.0` | The version of `zig` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2385,7 +2443,7 @@ The order in which custom modules are shown can be individually set by including | `extensions` | `[]` | The extensions that will be searched in the working directory for a match. | | `symbol` | `""` | The symbol used before displaying the command output. | | `style` | `"bold green"` | Стиль модуля. | -| `format` | `"[$symbol$output]($style) "` | The format for the module. | +| `format` | `"[$symbol$output]($style) "` | Формат модуля. | | `disabled` | `false` | Disables this `custom` module. | ### Переменные @@ -2393,10 +2451,10 @@ The order in which custom modules are shown can be individually set by including | Переменная | Описание | | ---------- | -------------------------------------- | | output | The output of shell command in `shell` | -| symbol | Mirrors the value of option `symbol` | -| style\* | Mirrors the value of option `style` | +| symbol | Отражает значение параметра `symbol` | +| style\* | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style #### Custom command shell diff --git a/docs/ru-RU/faq/README.md b/docs/ru-RU/faq/README.md index 0c1d6a2b2..89dbd79b4 100644 --- a/docs/ru-RU/faq/README.md +++ b/docs/ru-RU/faq/README.md @@ -12,7 +12,7 @@ ## How do I get command completion as shown in the demo GIF? -Completion support 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). +Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions). ## Do top level `format` and `.disabled` do the same thing? @@ -21,7 +21,7 @@ Completion support is provided by your shell of choice. In the case of the demo, - Disabling modules is more explicit than omitting them from the top level `format` - Новосозданные модули будут добавлены в подсказку по мере обновления Starship -## В документации написано, что Starship - для многих оболочек, но он не поддерживает оболочку X. Почему? +## The docs say Starship is cross-shell. Why isn't my preferred shell supported? Starship устроен так, что есть возможность добавить поддержку практически любой оболочки. Бинарный файл Starship не зависит от оболочки и не имеет состояния, так что если ваша оболочка поддерживает расширение подстрок и настройку подсказки, то Starship может быть использован. diff --git a/docs/ru-RU/guide/README.md b/docs/ru-RU/guide/README.md index d5bc90b2d..3a2a2896d 100644 --- a/docs/ru-RU/guide/README.md +++ b/docs/ru-RU/guide/README.md @@ -79,13 +79,15 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png" alt="简体中文" />   - Español   - - **Минималистичная, быстрая и бесконечно настраиваемая командная строка для любой оболочки!** - - **Быстрая:** она быстрая – _очень-очень_ быстрая! 🚀 - **Настраиваемая:** настройте каждый элемент вашей командной строки. - **Универсальная:** работает с любой оболочкой, на любой операционной системе. @@ -199,7 +199,7 @@ #### PowerShell - Добавьте следующее в конец `Microsoft.PowerShell_profile.ps1`. Вы можете проверить местоположение этого файла, запросив переменную `$PROFILE` в PowerShell. Обычно он находится в `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` или `~/.config/powershell/Microsoft.PowerShell_profile.ps1` на -Nix. + Добавьте следующее в конец `Microsoft.PowerShell_profile.ps1`. Вы можете проверить местоположение этого файла, запросив переменную `$PROFILE` в PowerShell. Обычно он находится в `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` или `~/.config/powershell/Microsoft.PowerShell_profile.ps1` на -Nix. ```sh Invoke-Expression (&starship init powershell) @@ -220,6 +220,8 @@ Мы всегда ищем помощь людей **всех уровней навыков**! Если вы хотите облегчить свой путь к проекту, посмотрите хорошие первые ошибки ([first good issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)). +Если Вы свободно владеете иностранным языком отличным от английского, мы высоко оценим любую помощь в переводе нашей документации на другие языки и поддержании ее в актуальном состоянии. Если вы хотите помочь, переводы могут быть сделаны на платформе [Starship Crowdin](https://translate.starship.rs/). + Если вы хотите помочь в создании Starship, пожалуйста, ознакомьтесь с нашим [Руководством по содействию](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Кроме того, заходите на наш [Discord сервер](https://discord.gg/8Jzqu3T) и поздоровайтесь. 👋 ### Соавторы кода @@ -267,4 +269,4 @@ ## 📝 Лицензия -Авторское право © 2019-настоящее, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).
Этот проект [ISC](https://github.com/starship/starship/blob/master/LICENSE) лицензирован. +Авторское право © 2019-настоящее, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).
Этот проект лицензирован под лицензией [ISC](https://github.com/starship/starship/blob/master/LICENSE). diff --git a/docs/ru-RU/presets/README.md b/docs/ru-RU/presets/README.md index f4eef0d69..57d5334ed 100644 --- a/docs/ru-RU/presets/README.md +++ b/docs/ru-RU/presets/README.md @@ -18,17 +18,15 @@ [aws] symbol = " " -[battery] -full_symbol = "" -charging_symbol = "" -discharging_symbol = "" - [conda] symbol = " " [dart] symbol = " " +[directory] +read_only = " " + [docker] symbol = " " diff --git a/docs/tr-TR/README.md b/docs/tr-TR/README.md new file mode 100644 index 000000000..4767ca0b1 --- /dev/null +++ b/docs/tr-TR/README.md @@ -0,0 +1,112 @@ +--- +home: true +heroImage: /logo.svg +heroText: +tagline: The minimal, blazing-fast, and infinitely customizable prompt for any shell! +actionText: Get Started → +actionLink: ./guide/ +features: + - + title: Compatibility First + details: Works on the most common shells on the most common operating systems. Use it everywhere! + - + title: Rust-Powered + details: Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible. + - + title: Customizable + details: Every little detail is customizable to your liking, to make this prompt as minimal or feature-rich as you'd like it to be. +footer: ISC Licensed | Copyright © 2019-present Starship Contributors +#Used for the description meta tag, for SEO +metaTitle: "Starship: Cross-Shell Prompt" +description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and PowerShell. +--- + +
+ +
+ +### Quick Install + +1. Install the **starship** binary: + + + #### Install Latest Version + + With Shell: + + ```sh + curl -fsSL https://starship.rs/install.sh | bash + ``` + + + #### Install via Package Manager + + With [Homebrew](https://brew.sh/): + + ```sh + brew install starship + ``` + + With [Scoop](https://scoop.sh): + + ```powershell + scoop install starship + ``` + +1. Add the init script to your shell's config file: + + + #### Bash + + Add the following to the end of `~/.bashrc`: + + ```sh + # ~/.bashrc + + eval "$(starship init bash)" + ``` + + + #### Fish + + Add the following to the end of `~/.config/fish/config.fish`: + + ```sh + # ~/.config/fish/config.fish + + starship init fish | source + ``` + + + #### Zsh + + Add the following to the end of `~/.zshrc`: + + ```sh + # ~/.zshrc + + eval "$(starship init zsh)" + ``` + + + #### Powershell + + Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. + + ```sh + Invoke-Expression (&starship init powershell) + ``` + + + #### Ion + + Add the following to the end of `~/.config/ion/initrc`: + + ```sh + # ~/.config/ion/initrc + + eval $(starship init ion) + ``` diff --git a/docs/tr-TR/advanced-config/README.md b/docs/tr-TR/advanced-config/README.md new file mode 100644 index 000000000..1cf6ebb78 --- /dev/null +++ b/docs/tr-TR/advanced-config/README.md @@ -0,0 +1,93 @@ +# Advanced Configuration + +While Starship is a versatile shell, sometimes you need to do more than edit `starship.toml` to get it to do certain things. This page details some of the more advanced configuration techniques used in starship. + +::: warning + +The configurations in this section are subject to change in future releases of Starship. + +::: + +## Custom pre-prompt and pre-execution Commands in Bash + +Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure: + +- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do + +```bash +function blastoff(){ + echo "🚀" +} +starship_precmd_user_func="blastoff" +``` + +- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. + +```bash +function blastoff(){ + echo "🚀" +} +trap blastoff DEBUG # Trap DEBUG *before* running starship +eval $(starship init bash) +``` + +## Change Window Title + +Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`. + +First, define a window title change function (identical in bash and zsh): + +```bash +function set_win_title(){ + echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007" +} +``` + +You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). + +In `bash`, set this function to be the precmd starship function: + +```bash +starship_precmd_user_func="set_win_title" +``` + +In `zsh`, add this to the `precmd_functions` array: + +```bash +precmd_functions+=(set_win_title) +``` + +If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. + +For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`: + +```bash +function set_win_title(){ + echo -ne "\033]0; $(basename $PWD) \007" +} +starship_precmd_user_func="set_win_title" +``` + +## Style Strings + +Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: + + - `bold` + - `underline` + - `dimmed` + - `bg:` + - `fg:` + - `` + - `none` + +where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing , though this may change in the future. The order of words in the string does not matter. + +The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. + +A color specifier can be one of the following: + + - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). + - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). + - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). + +If multiple colors are specified for foreground/background, the last one in the string will take priority. diff --git a/docs/tr-TR/config/README.md b/docs/tr-TR/config/README.md new file mode 100644 index 000000000..286375e20 --- /dev/null +++ b/docs/tr-TR/config/README.md @@ -0,0 +1,2503 @@ +# Configuration + +To get started configuring starship, create the following 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: + +```toml +# Don't print a new line at the start of the prompt +add_newline = false + +# 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" + +# Disable the package module, hiding it from the prompt completely +[package] +disabled = true +``` + +You can change default `starship.toml` file location with `STARSHIP_CONFIG` environment variable: + +```sh +export STARSHIP_CONFIG=~/.starship +``` + +Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: + +```ps1 +$ENV:STARSHIP_CONFIG = "$HOME\.starship" +``` + +### 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: + +```sh +export STARSHIP_CACHE=~/.starship/cache +``` + +Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: + +```ps1 +$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" +``` + +### Terminology + +**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of NodeJS that is currently installed on your computer, if your current directory is a NodeJS project. + +**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 NodeJS. + +By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. + +### Format Strings + +Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. + +#### Variable + +A variable contains a `$` symbol followed by the name of the variable. The name of a variable only contains letters, numbers and `_`. + +For example: + +- `$version` is a format string with a variable named `version`. +- `$git_branch$git_commit` is a format string with two variables named `git_branch` and `git_commit`. +- `$git_branch $git_commit` has the two variables separated with a space. + +#### Text Group + +A text group is made up of two different parts. + +The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it. + +In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used style the first part. + +For example: + +- `[on](red bold)` will print a string `on` with bold text colored red. +- `[⬢ $version](bold green)` will print a symbol `⬢` followed by the content of variable `version`, with bold text colored green. +- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green. + +#### Style Strings + +Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). + +- `"fg:green bg:blue"` sets green text on a blue background +- `"bg:blue fg:bright-green"` sets bright green text on a blue background +- `"bold fg:27"` sets bold text with [ANSI color](https://i.stack.imgur.com/KTSQa.png) 27 +- `"underline bg:#bf5700"` sets underlined text on a burnt orange background +- `"bold italic fg:purple"` sets bold italic purple text +- `""` explicitly disables all styling + +Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics. + +#### Conditional Format Strings + +A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. + +For example: + +- `(@$region)` will show nothing if the variable `region` is `None`, otherwise `@` followed by the value of region. +- `(some text)` will always show nothing since there are no variables wrapped in the braces. +- When `$all` is a shortcut for `\[$a$b\]`, `($all)` will show nothing only if `$a` and `$b` are both `None`. This works the same as `(\[$a$b\] )`. + +#### Escapable characters + +The following symbols have special usage in a format string. If you want to print the following symbols, you have to escape them with a backslash (`\`). + +- \$ +- \\ +- [ +- ] +- ( +- ) + +Note that `toml` has [its own escape syntax](https://github.com/toml-lang/toml#user-content-string). It is recommended to use a literal string (`''`) in your config. If you want to use a basic string (`""`), pay attention to escape the backslash `\`. + +For example, when you want to print a `$` symbol on a new line, the following configs for `format` are equivalent: + +```toml +# with basic string +format = "\n\\$" + +# with multiline basic string +format = """ + +\\$""" + +# with literal string +format = ''' + +\$''' +``` + +## Prompt + +This is the list of prompt-wide configuration options. + +### Options + +| Option | Default | Description | +| -------------- | ------------------------------ | ----------------------------------------------------- | +| `format` | [link](#default-prompt-format) | Configure the format of the prompt. | +| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | +| `add_newline` | `true` | Add a new line before the start of the prompt. | + +### Example + +```toml +# ~/.config/starship.toml + +# Use custom format +format = """ +[┌───────────────────>](bold green) +[│](bold green)$directory$rust$package +[└─>](bold green) """ + +# Wait 10 milliseconds for starship to check files under the current directory. +scan_timeout = 10 + +# Disable the newline at the start of the prompt +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. The default is as shown: + +```toml +format = "$all" + +# Which is equivalent to +format = """ +$username\ +$hostname\ +$shlvl\ +$kubernetes\ +$directory\ +$git_branch\ +$git_commit\ +$git_state\ +$git_status\ +$hg_branch\ +$docker_context\ +$package\ +$cmake\ +$dart\ +$dotnet\ +$elixir\ +$elm\ +$erlang\ +$golang\ +$helm\ +$java\ +$julia\ +$kotlin\ +$nim\ +$nodejs\ +$ocaml\ +$perl\ +$php\ +$purescript\ +$python\ +$ruby\ +$rust\ +$swift\ +$terraform\ +$zig\ +$nix_shell\ +$conda\ +$memory_usage\ +$aws\ +$gcloud\ +$openstack\ +$env_var\ +$crystal\ +$custom\ +$cmd_duration\ +$line_break\ +$lua\ +$jobs\ +$battery\ +$time\ +$status\ +$character""" +``` + +## AWS + +The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. + +When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var. + +### Options + +| Option | Default | Description | +| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | +| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | +| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `AWS` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------------- | ------------------------------------ | +| region | `ap-northeast-1` | The current AWS region | +| profile | `astronauts` | The current AWS profile | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Examples + +#### Display everything + +```toml +# ~/.config/starship.toml + +[aws] +format = 'on [$symbol$profile(\($region\))]($style) ' +style = "bold blue" +symbol = "🅰 " +[aws.region_aliases] +ap-southeast-2 = "au" +us-east-1 = "va" +``` + +#### Display region + +```toml +# ~/.config/starship.toml + +[aws] +format = "on [$symbol$region]($style) " +style = "bold blue" +symbol = "🅰 " +[aws.region_aliases] +ap-southeast-2 = "au" +us-east-1 = "va" +``` + +#### Display profile + +```toml +# ~/.config/starship.toml + +[aws] +format = "on [$symbol$profile]($style) " +style = "bold blue" +symbol = "🅰 " +``` + +## Battery + +The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. + +### Options + +| Option | Default | Description | +| -------------------- | --------------------------------- | --------------------------------------------------- | +| `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. | +| `display` | [link](#battery-display) | Display threshold and style for the module. | +| `disabled` | `false` | Disables the `battery` module. | + + +### Example + +```toml +# ~/.config/starship.toml + +[battery] +full_symbol = "🔋" +charging_symbol = "⚡️" +discharging_symbol = "💀" +``` + +### Battery Display + +The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. The default is as shown: + +```toml +[[battery.display]] +threshold = 10 +style = "bold red" +``` + +#### Options + +The `display` option is an array of the following table. + +| Option | Description | +| ----------- | ----------------------------------------------- | +| `threshold` | The upper bound for the display option. | +| `style` | The style used if the display option is in use. | + +#### Example + +```toml +[[battery.display]] # "bold red" style when capacity is between 0% and 10% +threshold = 10 +style = "bold red" + +[[battery.display]] # "bold yellow" style when capacity is between 10% and 30% +threshold = 30 +style = "bold yellow" + +# when capacity is over 30%, the battery indicator will not be displayed + +``` + +## Character + +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. + +The character will tell you whether the last command was successful or not. It can do this in two ways: + +- changing color (`red`/`green`) +- changing shape (`❯`/`✖`) + +By default it only changes color. If you also want to change it's shape take a look at [this example](#with-custom-error-shape). + +### Options + +| Option | Default | Description | +| ---------------- | ------------------- | -------------------------------------------------------------------------------- | +| `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. | +| `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. | +| `vicmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | +| `disabled` | `false` | Disables the `character` module. | + +### Variables + +| Variable | Example | Description | +| -------- | ------- | --------------------------------------------------------------------- | +| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` | + +### Examples + +#### With custom error shape + +```toml +# ~/.config/starship.toml + +[character] +success_symbol = "[➜](bold green) " +error_symbol = "[✗](bold red) " +``` + +#### Without custom error shape + +```toml +# ~/.config/starship.toml + +[character] +success_symbol = "[➜](bold green) " +error_symbol = "[➜](bold red) " +``` + +#### With custom vim shape + +```toml +# ~/.config/starship.toml + +[character] +vicmd_symbol = "[V](bold green) " +``` + +## CMake + +The `cmake` module shows the currently installed version of CMake if any of the following conditions are met: + +- The current directory contains a `CMakeLists.txt` file +- The current directory contains a `CMakeCache.txt` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | -------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `cmake` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v3.17.3` | The version of cmake | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +## Command Duration + +The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. + +::: warning Do not hook the DEBUG trap in Bash + +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. + +::: + +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. + +### Options + +| Option | Default | Description | +| -------------------- | ----------------------------- | ---------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `show_notifications` | `false` | Show desktop notifications when command completes. | +| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | + +::: tip + +Showing desktop notifications requires starship to be built with `rust-notify` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. + +::: + +### Variables + +| Variable | Example | Description | +| --------- | -------- | --------------------------------------- | +| duration | `16m40s` | The time it took to execute the command | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[cmd_duration] +min_time = 500 +format = "underwent [$duration](bold yellow)" +``` + +## Conda + +The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set. + +::: tip + +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. + +::: + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. | +| `symbol` | `"🅒 "` | The symbol used before the environment name. | +| `style` | `"bold green"` | The style for the module. | +| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `disabled` | `false` | Disables the `conda` module. | + +### Variables + +| Variable | Example | Description | +| ----------- | ------------ | ------------------------------------ | +| environment | `astronauts` | The current conda environment | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[conda] +format = "[$symbol$environment](dimmed green) " +``` + +## Crystal + +The `crystal` module shows the currently installed version of Crystal. The module will be shown if any of the following conditions are met: + +- The current directory contains a `shard.yml` file +- The current directory contains a `.cr` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | The style for the module. | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `disabled` | `false` | Disables the `crystal` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.32.1` | The version of `crystal` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[crystal] +format = "via [✨ $version](bold blue) " +``` + +## Dart + +The `dart` module shows the currently installed version of Dart. The module will be shown if any of the following conditions are met: + +- The current directory contains a file with `.dart` extension +- The current directory contains a `.dart_tool` directory +- The current directory contains a `pubspec.yaml` or `pubspec.lock` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dart` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v2.8.4` | The version of `dart` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[dart] +format = "via [🔰 $version](bold red) " +``` + +## Directory + +The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. + +When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option. + +For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | +| `style` | `"bold cyan"` | The style for the module. | +| `disabled` | `false` | Disables the `directory` module. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | + +
+This module has a few advanced configuration options that control how the directory is displayed. + +| Advanced Option | Default | Description | +| --------------------------- | ------- | ---------------------------------------------------------------------------------------- | +| `substitutions` | | A table of substitutions to be made to the path. | +| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. | +| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. | + +`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD. + +```toml +[directory.substitutions] +"/Volumes/network/path" = "/net" +"src/com/long/java/path" = "mypath" +``` + +`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`. + +
+ +### Variables + +| Variable | Example | Description | +| --------- | --------------------- | ----------------------------------- | +| path | `"D:/Projects"` | The current directory path | +| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[directory] +truncation_length = 8 +truncation_symbol = "…/" +``` + +## Docker Context + +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default`. + +### Options + +| Option | Default | Description | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | The format for the module. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | The style for the module. | +| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | +| `disabled` | `true` | Disables the `docker_context` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------------- | ------------------------------------ | +| context | `test_context` | The current docker context | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[docker_context] +format = "via [🐋 $context](blue bold)" +``` + +## Dotnet + +The `dotnet` module shows the relevant version of the .NET Core SDK for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK. + +This module will only be shown in your prompt when one or more of the following files are present in the current directory: + +- `global.json` +- `project.json` +- `Directory.Build.props` +- `Directory.Build.targets` +- `Packages.props` +- `*.sln` +- `*.csproj` +- `*.fsproj` +- `*.xproj` + +You'll also need the .NET Core SDK installed in order to use it correctly. + +Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options. + +The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. + +### Options + +| Option | Default | Description | +| ----------- | --------------------------------------- | -------------------------------------------------------- | +| `format` | `"[$symbol$version( 🎯 $tfm)]($style) "` | The format for the module. | +| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. | +| `heuristic` | `true` | Use faster version detection to keep starship snappy. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dotnet` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------------- | ------------------------------------------------------------------ | +| version | `v3.1.201` | The version of `dotnet` sdk | +| tfm | `netstandard2.0` | The Target Framework Moniker that the current project is targeting | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[dotnet] +symbol = "🥅 " +style = "green" +heuristic = false +``` + +## Elixir + +The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. The module will be shown if any of the following conditions are met: + +- The current directory contains a `mix.exs` file. + +### Options + +| Option | Default | Description | +| ---------- | --------------------------------------------------------- | --------------------------------------------------------------- | +| `symbol` | `"💧 "` | The symbol used before displaying the version of Elixir/Erlang. | +| `style` | `"bold purple"` | The style for the module. | +| `format` | `'via [$symbol$version \(OTP $otp_version\)]($style) '` | The format for the module elixir. | +| `disabled` | `false` | Disables the `elixir` module. | + +### Variables + +| Variable | Example | Description | +| ----------- | ------- | ------------------------------------ | +| version | `v1.10` | The version of `elixir` | +| otp_version | | The otp version of `elixir` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[elixir] +symbol = "🔮 " +``` + +## Elm + +The `elm` module shows the currently installed version of Elm. The module will be shown if any of the following conditions are met: + +- The current directory contains a `elm.json` file +- The current directory contains a `elm-package.json` file +- The current directory contains a `.elm-version` file +- The current directory contains a `elm-stuff` folder +- The current directory contains a `*.elm` files + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🌳 "` | A format string representing the symbol of Elm. | +| `style` | `"cyan bold"` | The style for the module. | +| `disabled` | `false` | Disables the `elm` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.19.1` | The version of `elm` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[elm] +format = "via [ $version](cyan bold) " +``` + +## Environment Variable + +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: + +- The `variable` configuration option matches an existing environment variable +- The `variable` configuration option is not defined, but the `default` configuration option is + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------ | ---------------------------------------------------------------------------- | +| `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. | +| `disabled` | `false` | Disables the `env_var` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------------------------------------- | ------------------------------------------ | +| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | `black bold dimmed` | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[env_var] +variable = "SHELL" +default = "unknown shell" +``` + +## Erlang + +The `erlang` module shows the currently installed version of Erlang/OTP. The module will be shown if any of the following conditions are met: + +- The current directory contains a `rebar.config` file. +- The current directory contains a `erlang.mk` file. + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | -------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before displaying the version of erlang. | +| `style` | `"bold red"` | The style for the module. | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `disabled` | `false` | Disables the `erlang` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v22.1.3` | The version of `erlang` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[erlang] +format = "via [e $version](bold red) " +``` + +## Gcloud + +The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. + +### Options + +| Option | Default | Description | +| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | +| `format` | `'on [$symbol$account(\($region\))]($style) '` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. | +| `region_aliases` | | Table of region aliases to display in addition to the GCP name. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `gcloud` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ----------------- | ------------------------------------------------------------------ | +| region | `us-central1` | The current GCP region | +| account | `foo@example.com` | The current GCP profile | +| project | | The current GCP project | +| active | `default` | The active config name written in `~/.config/gcloud/active_config` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Examples + +#### Display account and project + +```toml +# ~/.config/starship.toml + +[gcloud] +format = 'on [$symbol$account(\($project\))]($style) ' +``` + +#### Display active config name only + +```toml +# ~/.config/starship.toml + +[gcloud] +format = "[$symbol$active]($style) " +style = "bold yellow" +``` + +#### Display account and aliased region + +```toml +# ~/.config/starship.toml + +[gcloud] +symbol = "️🇬️ " +[gcloud.region_aliases] +us-central1 = "uc1" +asia-northeast1 = "an1" +``` + +## Git Branch + +The `git_branch` module shows the active branch of the repo in your current directory. + +### Options + +| Option | Default | Description | +| -------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- | +| `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. | +| `symbol` | `" "` | A format string representing the symbol of git branch. | +| `style` | `"bold purple"` | The style for the module. | +| `truncation_length` | `2^63 - 1` | Truncates a git branch to X graphemes. | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use `""` for no symbol. | +| `only_attached` | `false` | Only show the branch name when not in a detached HEAD state. | +| `disabled` | `false` | Disables the `git_branch` module. | + +### Variables + +| Variable | Example | Description | +| ------------- | -------- | ---------------------------------------------------------------------------------------------------- | +| branch | `master` | The current branch name, falls back to `HEAD` if there's no current branch (e.g. git detached HEAD). | +| remote_name | `origin` | The remote name. | +| remote_branch | `master` | The name of the branch tracked on `remote_name`. | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_branch] +symbol = "🌱 " +truncation_length = 4 +truncation_symbol = "" +``` + +## Git Commit + +The `git_commit` module shows the current commit hash and also the tag (if any) of the repo in your current directory. + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------ | ----------------------------------------------------- | +| `commit_hash_length` | `7` | The length of the displayed git commit hash. | +| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | The format for the module. | +| `style` | `"bold green"` | The style for the module. | +| `only_detached` | `true` | Only show git commit hash when in detached HEAD state | +| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. | +| `tag_symbol` | `"🏷 "` | Tag symbol prefixing the info shown | +| `disabled` | `false` | Disables the `git_commit` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ----------------------------------- | +| hash | `b703eb3` | The current git commit hash | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_commit] +commit_hash_length = 4 +tag_symbol = "🔖 " +``` + +## Git State + +The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too. + +### Options + +| Option | Default | Description | +| -------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `rebase` | `"REBASING"` | A format string displayed when a `rebase` is in progress. | +| `merge` | `"MERGING"` | A format string displayed when a `merge` is in progress. | +| `revert` | `"REVERTING"` | A format string displayed when a `revert` is in progress. | +| `cherry_pick` | `"CHERRY-PICKING"` | A format string displayed when a `cherry-pick` is in progress. | +| `bisect` | `"BISECTING"` | A format string displayed when a `bisect` is in progress. | +| `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"` | The style for the module. | +| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | The format for the module. | +| `disabled` | `false` | Disables the `git_state` module. | + +### Variables + +| Variable | Example | Description | +| ---------------- | ---------- | ----------------------------------- | +| state | `REBASING` | The current state of the repo | +| progress_current | `1` | The current operation progress | +| progress_total | `2` | The total operation progress | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_state] +format = '[\($state( $progress_current of $progress_total)\)]($style) ' +cherry_pick = "[🍒 PICKING](bold red)" +``` + +## Git Status + +The `git_status` module shows symbols representing the state of the repo in your current directory. + +### Options + +| Option | Default | Description | +| ------------ | ----------------------------------------------- | ----------------------------------- | +| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` | +| `conflicted` | `"="` | This branch has merge conflicts. | +| `ahead` | `"⇡"` | The format of `ahead` | +| `behind` | `"⇣"` | The format of `behind` | +| `diverged` | `"⇕"` | The format of `diverged` | +| `untracked` | `"?"` | The format of `untracked` | +| `stashed` | `"$"` | The format of `stashed` | +| `modified` | `"!"` | The format of `modified` | +| `staged` | `"+"` | The format of `staged` | +| `renamed` | `"»"` | The format of `renamed` | +| `deleted` | `"✘"` | The format of `deleted` | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `git_status` module. | + +### Variables + +The following variables can be used in `format`: + +| Variable | Description | +| -------------- | --------------------------------------------------------------------------------------------- | +| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` | +| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo | +| `conflicted` | Displays `conflicted` when this branch has merge conflicts. | +| `untracked` | Displays `untracked` when there are untracked files in the working directory. | +| `stashed` | Displays `stashed` when a stash exists for the local repository. | +| `modified` | Displays `modified` when there are file modifications in the working directory. | +| `staged` | Displays `staged` when a new file has been added to the staging area. | +| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | +| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| style\* | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +The following variables can be used in `diverged`: + +| Variable | Description | +| -------------- | ---------------------------------------------- | +| `ahead_count` | Number of commits ahead of the tracking branch | +| `behind_count` | Number of commits behind the tracking branch | + +The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`: + +| Variable | Description | +| -------- | ------------------------ | +| `count` | Show the number of files | + +### Example + +```toml +# ~/.config/starship.toml + +[git_status] +conflicted = "🏳" +ahead = "🏎💨" +behind = "😰" +diverged = "😵" +untracked = "🤷‍" +stashed = "📦" +modified = "📝" +staged = '[++\($count\)](green)' +renamed = "👅" +deleted = "🗑" +``` + +Show ahead/behind count of the branch being tracked + +```toml +# ~/.config/starship.toml + +[git_status] +ahead = "⇡${count}" +diverged = "⇕⇡${ahead_count}⇣${behind_count}" +behind = "⇣${count}" +``` + +## Golang + +The `golang` module shows the currently installed version of Golang. The module will be shown if any of the following conditions are met: + +- The current directory contains a `go.mod` file +- The current directory contains a `go.sum` file +- The current directory contains a `glide.yaml` file +- The current directory contains a `Gopkg.yml` file +- The current directory contains a `Gopkg.lock` file +- The current directory contains a `.go-version` file +- The current directory contains a `Godeps` directory +- The current directory contains a file with the `.go` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ---------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🐹 "` | A format string representing the symbol of Go. | +| `style` | `"bold cyan"` | The style for the module. | +| `disabled` | `false` | Disables the `golang` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v1.12.1` | The version of `go` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[golang] +format = "via [🏎💨 $version](bold cyan) " +``` + +## Helm + +The `helm` module shows the currently installed version of Helm. The module will be shown if any of the following conditions are met: + +- The current directory contains a `helmfile.yaml` file +- The current directory contains a `Chart.yaml` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"⎈ "` | A format string representing the symbol of Helm. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `helm` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v3.1.1` | The version of `helm` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[helm] +format = "via [⎈ $version](bold white) " +``` + +## Hostname + +The `hostname` module shows the system hostname. + +### Options + +| Option | Default | Description | +| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `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. | +| `style` | `"bold dimmed green"` | The style for the module. | +| `disabled` | `false` | Disables the `hostname` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +format = "on [$hostname](bold red) " +trim_at = ".companyname.com" +disabled = false +``` + +## Java + +The `java` module shows the currently installed version of Java. The module will be shown if any of the following conditions are met: + +- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file +- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension + +### Options + +| Option | Default | Description | +| ---------- | -------------------------------------- | ----------------------------------------------- | +| `format` | `"via [${symbol}${version}]($style) "` | The format for the module. | +| `symbol` | `"☕ "` | A format string representing the symbol of Java | +| `style` | `"red dimmed"` | The style for the module. | +| `disabled` | `false` | Disables the `java` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| version | `v14` | The version of `java` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[java] +symbol = "🌟 " +``` + +## Jobs + +The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. + +### Options + +| Option | Default | Description | +| ----------- | ----------------------------- | ------------------------------------------------ | +| `threshold` | `1` | Show number of jobs if exceeded. | +| `format` | `"[$symbol$number]($style) "` | The format for the module. | +| `symbol` | `"✦"` | A format string representing the number of jobs. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `jobs` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| number | `1` | The number of jobs | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[jobs] +symbol = "+ " +threshold = 4 +``` + +## Julia + +The `julia` module shows the currently installed version of Julia. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Project.toml` file +- The current directory contains a `Manifest.toml` file +- The current directory contains a file with the `.jl` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"ஃ "` | A format string representing the symbol of Julia. | +| `style` | `"bold purple"` | The style for the module. | +| `disabled` | `false` | Disables the `julia` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.4.0` | The version of `julia` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[julia] +symbol = "∴ " +``` + +## Kotlin + +The `kotlin` module shows the currently installed version of Kotlin. The module will be shown if any of the following conditions are met: + +- The current directory contains a `.kt` or a `.kts` file + +### Options + +| Option | Default | Description | +| --------------- | ---------------------------------- | ----------------------------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🅺 "` | A format string representing the symbol of Kotlin. | +| `style` | `"bold blue"` | The style for the module. | +| `kotlin_binary` | `"kotlin"` | Configures the kotlin binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `kotlin` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v1.4.21` | The version of `kotlin` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[kotlin] +symbol = "🅺 " +``` + +```toml +# ~/.config/starship.toml + +[kotlin] +# Uses the Kotlin Compiler binary to get the installed version +kotlin_binary = "kotlinc" +``` + +## Kubernetes + +Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | +| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. | +| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. | +| `style` | `"cyan bold"` | The style for the module. | +| `context_aliases` | | Table of context aliases to display. | +| `disabled` | `true` | Disables the `kubernetes` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------------------- | ---------------------------------------- | +| context | `starship-cluster` | The current kubernetes context | +| namespace | `starship-namespace` | If set, the current kubernetes namespace | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[kubernetes] +format = 'on [⛵ $context \($namespace\)](dimmed green) ' +disabled = false +[kubernetes.context_aliases] +"dev.local.cluster.k8s" = "dev" +``` + +## Line Break + +The `line_break` module separates the prompt into two lines. + +### Options + +| Option | Default | Description | +| ---------- | ------- | ------------------------------------------------------------------ | +| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | + +### Example + +```toml +# ~/.config/starship.toml + +[line_break] +disabled = true +``` + +## Lua + +The `lua` module shows the currently installed version of Lua. The module will be shown if any of the following conditions are met: + +- The current directory contains a `.lua-version` file +- The current directory contains a `lua` directory +- The current directory contains a file with the `.lua` extension + +### Options + +| Option | Default | Description | +| ------------ | ---------------------------------- | -------------------------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | +| `style` | `"bold blue"` | The style for the module. | +| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `lua` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v5.4.0` | The version of `lua` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[lua] +format = "via [🌕 $version](bold blue) " +``` + +## Memory Usage + +The `memory_usage` module shows current system memory and swap usage. + +By default the swap usage is displayed if the total system swap is non-zero. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------- | --------------------------------------------- | -------------------------------------------------------- | +| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | +| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | The format for the module. | +| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | +| `style` | `"bold dimmed white"` | The style for the module. | +| `disabled` | `true` | Disables the `memory_usage` module. | + +### Variables + +| Variable | Example | Description | +| ---------------- | ------------- | ------------------------------------------------------------------ | +| ram | `31GiB/65GiB` | The usage/total RAM of the current system memory. | +| ram_pct | `48%` | The percentage of the current system memory. | +| swap\*\* | `1GiB/4GiB` | The swap memory size of the current system swap memory file. | +| swap_pct\*\* | `77%` | The swap memory percentage of the current system swap memory file. | +| symbol | `🐏` | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string \*\*: The SWAP file information is only displayed if detected on the current system + +### Example + +```toml +# ~/.config/starship.toml + +[memory_usage] +disabled = false +threshold = -1 +symbol = " " +style = "bold dimmed green" +``` + +## Mercurial Branch + +The `hg_branch` module shows the active branch of the repo in your current directory. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `style` | `"bold purple"` | The style for the module. | +| `format` | `"on [$symbol$branch]($style) "` | The format for the module. | +| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `disabled` | `true` | Disables the `hg_branch` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| branch | `master` | The active mercurial branch | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[hg_branch] +format = "on [🌱 $branch](bold purple)" +truncation_length = 4 +truncation_symbol = "" +``` + +## Nim + +The `nim` module shows the currently installed version of Nim. The module will be shown if any of the following conditions are met: + +- The current directory contains a `nim.cfg` file +- The current directory contains a file with the `.nim` extension +- The current directory contains a file with the `.nims` extension +- The current directory contains a file with the `.nimble` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module | +| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `nim` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.2.0` | The version of `nimc` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nim] +style = "yellow" +symbol = "🎣 " +``` + +## Nix-shell + +The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment. + +### Options + +| Option | Default | Description | +| ------------ | ---------------------------------------------- | ----------------------------------------------------- | +| `format` | `'via [$symbol$state( \($name\))]($style) '` | The format for the module. | +| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | +| `style` | `"bold blue"` | The style for the module. | +| `impure_msg` | `"impure"` | A format string shown when the shell is impure. | +| `pure_msg` | `"pure"` | A format string shown when the shell is pure. | +| `disabled` | `false` | Disables the `nix_shell` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| state | `pure` | The state of the nix-shell | +| name | `lorri` | The name of the nix-shell | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nix_shell] +disabled = true +impure_msg = "[impure shell](bold red)" +pure_msg = "[pure shell](bold green)" +format = 'via [☃️ $state( \($name\))](bold blue) ' +``` + +## NodeJS + +The `nodejs` module shows the currently installed version of NodeJS. The module will be shown if any of the following conditions are met: + +- The current directory contains a `package.json` file +- The current directory contains a `.node-version` file +- The current directory contains a `node_modules` directory +- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension +- The current directory contains a file with the `.ts` extension + +### Options + +| Option | Default | Description | +| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. | +| `style` | `"bold green"` | The style for the module. | +| `disabled` | `false` | Disables the `nodejs` module. | +| `not_capable_style` | `bold red` | The style for the module when an engines property in Packages.json does not match the NodeJS version. | + +###  Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v13.12.0` | The version of `node` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nodejs] +format = "via [🤖 $version](bold green) " +``` + +## OCaml + +The `ocaml` module shows the currently installed version of OCaml. The module will be shown if any of the following conditions are met: + +- The current directory contains a file with `.opam` extension or `_opam` directory +- The current directory contains a `esy.lock` directory +- The current directory contains a `dune` or `dune-project` file +- The current directory contains a `jbuild` or `jbuild-ignore` file +- The current directory contains a `.merlin` file +- The current directory contains a file with `.ml`, `.mli`, `.re` or `.rei` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format string for the module. | +| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `ocaml` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v4.10.0` | The version of `ocaml` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[ocaml] +format = "via [🐪 $version]($style) " +``` + +## OpenStack + +The `openstack` module shows the current OpenStack cloud and project. The module only active when the `OS_CLOUD` env var is set, in which case it will read `clouds.yaml` file from any of the [default locations](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files). to fetch the current project in use. + +### Options + +| Option | Default | Description | +| ---------- | --------------------------------------------------- | -------------------------------------------------------------- | +| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `OpenStack` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| cloud | `corp` | The current OpenStack cloud | +| project | `dev` | The current OpenStack project | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[openstack] +format = "on [$symbol$cloud(\\($project\\))]($style) " +style = "bold yellow" +symbol = "☁️ " +``` + +## Package Version + +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages. + +- **npm** – The `npm` package version is extracted from the `package.json` present in the current directory +- **cargo** – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory +- **poetry** – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory +- **composer** – The `composer` package version is extracted from the `composer.json` present in the current directory +- **gradle** – The `gradle` package version is extracted from the `build.gradle` present +- **julia** - The package version is extracted from the `Project.toml` present +- **mix** - The `mix` package version is extracted from the `mix.exs` present +- **helm** - The `helm` chart version is extracted from the `Chart.yaml` present +- **maven** - The `maven` package version is extracted from the `pom.xml` present +- **meson** - The `meson` package version is extracted from the `meson.build` present + +> ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. + +### Options + +| Option | Default | Description | +| ----------------- | ---------------------------------- | ---------------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | +| `style` | `"bold 208"` | The style for the module. | +| `display_private` | `false` | Enable displaying version for packages marked as private. | +| `disabled` | `false` | Disables the `package` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.0.0` | The version of your package | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[package] +format = "via [🎁 $version](208 bold) " +``` + +## Perl + +The `perl` module shows the currently installed version of Perl. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Makefile.PL` or `Build.PL` file +- The current directory contains a `cpanfile` or `cpanfile.snapshot` file +- The current directory contains a `META.json` file or `META.yml` file +- The current directory contains a `.perl-version` file +- The current directory contains a `.pl`, `.pm` or `.pod` + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format string for the module. | +| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | +| `style` | `"bold 149"` | The style for the module. | +| `disabled` | `false` | Disables the `perl` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v5.26.1` | The version of `perl` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +### Example + +```toml +# ~/.config/starship.toml + +[perl] +format = "via [🦪 $version]($style) " +``` + +## PHP + +The `php` module shows the currently installed version of PHP. The module will be shown if any of the following conditions are met: + +- The current directory contains a `composer.json` file +- The current directory contains a `.php-version` file +- The current directory contains a `.php` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | +| `style` | `"147 bold"` | The style for the module. | +| `disabled` | `false` | Disables the `php` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v7.3.8` | The version of `php` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[php] +format = "via [🔹 $version](147 bold) " +``` + +## PureScript + +The `purescript` module shows the currently installed version of PureScript version. The module will be shown if any of the following conditions are met: + +- The current directory contains a `spago.dhall` file +- The current directory contains a \*.purs files + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `purescript` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `0.13.5` | The version of `purescript` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[purescript] +format = "via [$symbol$version](bold white)" +``` + +## Python + +The `python` module shows the currently installed version of Python and the current Python virtual environment if one is activated. + +If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`. + +The module will be shown if any of the following conditions are met: + +- The current directory contains a `.python-version` file +- The current directory contains a `requirements.txt` file +- The current directory contains a `pyproject.toml` file +- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true) +- The current directory contains a `Pipfile` file +- The current directory contains a `tox.ini` file +- The current directory contains a `setup.py` file +- The current directory contains a `__init__.py` file +- A virtual environment is currently activated + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | The style for the module. | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | + +::: tip + +The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used. + +The default values and order for `python_binary` was chosen to first identify the Python version in a virtualenv/conda environments (which currently still add a `python`, no matter if it points to `python3` or `python2`). This has the side effect that if you still have a system Python 2 installed, it may be picked up before any Python 3 (at least on Linux Distros that always symlink `/usr/bin/python` to Python 2). If you do not work with Python 2 anymore but cannot remove the system Python 2, changing this to `"python3"` will hide any Python version 2, see example below. + +::: + +### Variables + +| Variable | Example | Description | +| ------------ | --------------- | ------------------------------------------ | +| version | `"v3.8.1"` | The version of `python` | +| symbol | `"🐍 "` | Mirrors the value of option `symbol` | +| style | `"yellow bold"` | Mirrors the value of option `style` | +| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | +| virtualenv | `"venv"` | The current `virtualenv` name | + + +### Example + +```toml +# ~/.config/starship.toml + +[python] +symbol = "👾 " +pyenv_version_name = true +``` + +```toml +# ~/.config/starship.toml + +[python] +# Only use the `python3` binary to get the version. +python_binary = "python3" +``` + +## Ruby + +The `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Gemfile` file +- The current directory contains a `.ruby-version` file +- The current directory contains a `.rb` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `ruby` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v2.5.1` | The version of `ruby` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[ruby] +symbol = "🔺 " +``` + +## Rust + +The `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Cargo.toml` file +- The current directory contains a file with the `.rs` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `rust` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ----------------- | ------------------------------------ | +| version | `v1.43.0-nightly` | The version of `rustc` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[rust] +format = "via [⚙️ $version](red bold)" +``` + +## SHLVL + +The `shlvl` module shows the current SHLVL ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. + +### Options + +| Option | Default | Description | +| ----------- | ---------------------------- | ----------------------------------------------------------- | +| `threshold` | `2` | Display threshold. | +| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. | +| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | +| `repeat` | `false` | Causes `symbol` to be repeated by the current SHLVL amount. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `true` | Disables the `shlvl` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| shlvl | `3` | The current value of SHLVL | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[shlvl] +disabled = false +format = "$shlvl level(s) down" +threshold = 3 +``` + +## Singularity + +The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set. + +### Options + +| Option | Default | Description | +| ---------- | -------------------------------- | ------------------------------------------------ | +| `format` | `'[$symbol\[$env\]]($style) '` | The format for the module. | +| `symbol` | `""` | A format string displayed before the image name. | +| `style` | `"bold dimmed blue"` | The style for the module. | +| `disabled` | `false` | Disables the `singularity` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------ | ------------------------------------ | +| env | `centos.img` | The current singularity image | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[singularity] +format = '[📦 \[$env\]]($style) ' +``` + +## Status + +The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: + +### Options + +| Option | Default | Description | +| ----------------------- | -------------------------- | ---------------------------------------------------- | +| `format` | `[$symbol$status]($style)` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | +| `style` | `"bold red"` | The style for the module. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | + +### Variables + +| Variable | Example | Description | +| -------------- | ------- | -------------------------------------------------------------------- | +| status | `127` | The exit code of the last command | +| int | `127` | The exit code of the last command | +| common_meaning | `ERROR` | Meaning of the code if not a signal | +| signal_number | `9` | Signal number corresponding to the exit code, only if signalled | +| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled | +| maybe_int | `7` | Contains the exit code number when no meaning has been found | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml + +# ~/.config/starship.toml + +[status] +style = "bg:blue" +symbol = "🔴" +format = '[\[$symbol $status_common_meaning$status_signal_name$status_maybe_int\]]($style) ' +map_symbol = true +disabled = false + +``` + +## Swift + +The `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Package.swift` file +- The current directory contains a file with the `.swift` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ------------------------------------------------ | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | The style for the module. | +| `disabled` | `false` | Disables the `swift` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v5.2.4` | The version of `swift` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[swift] +format = "via [🏎 $version](red bold)" +``` + +## Terraform + +The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). The module will be shown if any of the following conditions are met: + +- The current directory contains a `.terraform` folder +- Current directory contains a file with the `.tf` or `.hcl` extensions + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | +| `symbol` | `"💠 "` | A format string shown before the terraform workspace. | +| `style` | `"bold 105"` | The style for the module. | +| `disabled` | `false` | Disables the `terraform` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `terraform` | +| workspace | `default` | The current terraform workspace | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +#### With Version + +```toml +# ~/.config/starship.toml + +[terraform] +format = "[🏎💨 $version$workspace]($style) " +``` + +#### Without version + +```toml +# ~/.config/starship.toml + +[terraform] +format = "[🏎💨 $workspace]($style) " +``` + +## Time + +The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `format` | `"at [$time]($style) "` | The format string for the module. | +| `use_12hr` | `false` | Enables 12 hour formatting | +| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. | +| `style` | `"bold yellow"` | The style for the module time | +| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. | +| `disabled` | `true` | Disables the `time` module. | +| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | + +If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ----------------------------------- | +| time | `13:08:10` | The current time. | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[time] +disabled = false +format = '🕙[\[ $time \]]($style) ' +time_format = "%T" +utc_time_offset = "-5" +time_range = "10:00:00-14:00:00" +``` + +## Username + +The `username` module shows active user's username. The module will be shown if any of the following conditions are met: + +- The current user is root +- The current user isn't the same as the one that is logged in +- The user is currently connected as an SSH session +- The variable `show_always` is set to true + +::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. ::: + +### Options + +| Option | Default | Description | +| ------------- | ----------------------- | ------------------------------------- | +| `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. | +| `show_always` | `false` | Always shows the `username` module. | +| `disabled` | `false` | Disables the `username` module. | + +### Variables + +| Variable | Example | Description | +| -------- | ------------ | ------------------------------------------------------------------------------------------- | +| `style` | `"red bold"` | Mirrors the value of option `style_root` when root is logged in and `style_user` otherwise. | +| `user` | `"matchai"` | The currently logged-in user ID. | + +### Example + +```toml +# ~/.config/starship.toml + +[username] +style_user = "white bold" +style_root = "black bold" +format = "user: [$user]($style) " +disabled = false +show_always = true +``` + +## Zig + +The `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met: + +- The current directory contains a `.zig` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | The style for the module. | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `disabled` | `false` | Disables the `zig` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v0.6.0` | The version of `zig` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[zig] +symbol = "⚡️ " +``` + +## Custom commands + +The `custom` modules show the output of some arbitrary commands. + +These modules will be shown if any of the following conditions are met: + +- 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 + +::: tip + +Multiple custom modules can be defined by using a `.`. + +::: + +::: tip + +The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined. + +::: + +::: tip + +[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! + +::: + +### 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` | `""` | 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. | + +### Variables + +| Variable | Description | +| --------- | -------------------------------------- | +| output | The output of shell command in `shell` | +| symbol | Mirrors the value of option `symbol` | +| style\* | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +#### Custom command shell + +`shell` accepts a non-empty list of strings, where: + +- The first string is the path to the shell to use to execute the command. +- Other following arguments are passed to the shell. + +If unset, it will fallback to STARSHIP_SHELL and then to "sh" on Linux, and "cmd /C" on Windows. + +The `command` will be passed in on 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. + +```toml +shell = ["pwsh", "-Command", "-"] +``` + +::: warning Make sure your custom shell configuration exits gracefully + +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). + +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. + +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. + +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. + +::: + +### Example + +```toml +# ~/.config/starship.toml + +[custom.foo] +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters +when = """ test "$HOME" == "$PWD" """ +format = " transcending [$output]($style)" + +[custom.time] +command = "time /T" +files = ["*.pst"] +shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +``` diff --git a/docs/tr-TR/faq/README.md b/docs/tr-TR/faq/README.md new file mode 100644 index 000000000..9bb23bf93 --- /dev/null +++ b/docs/tr-TR/faq/README.md @@ -0,0 +1,92 @@ +# 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) +- **Shell**: [Fish Shell](https://fishshell.com/) + - **Configuration**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish) + - **Prompt**: [Starship](https://starship.rs/) + +## How do I get command completion as shown in the demo GIF? + +Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions). + +## Do top level `format` and `.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, `.disabled` is the preferred way to do so for these reasons: + +- Disabling modules is more explicit than omitting them from the top level `format` +- Newly created modules will be added to the prompt as Starship is updated + +## The docs say Starship is cross-shell. Why isn't my preferred shell supported? + +The way Starship is built, it should be possible to add support for virtually any shell. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used. + +Here's a small example getting Starship working with bash: + +```sh +# Get the status code from the last command executed +STATUS=$? + +# Get the number of jobs running. +NUM_JOBS=$(jobs -p | wc -l) + +# Set the prompt to the output of `starship prompt` +PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)" +``` + +The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#Command-Duration) and to ensure that Starship is compatible with pre-installed Bash configurations. + +For a list of all flags accepted by `starship prompt`, use the following command: + +```sh +starship prompt --help +``` + +The prompt will use as much context as is provided, but no flags are "required". + +## How do I run Starship on Linux distributions with older versions of glibc? + +If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`: + +```sh +curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl +``` + +## Why don't I see a glyph symbol in my prompt? + +The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that: + +- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/). +- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice. +- You are using a [Nerd Font](https://www.nerdfonts.com/). + +To test your system, run the following commands in a terminal: + +```sh +echo -e "\xf0\x9f\x90\x8d" +echo -e "\xee\x82\xa0" +``` + +The first line should produce a [snake emoji](https://emojipedia.org/snake/), while the second should produce a [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs). + +If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose) + +## How do I uninstall Starship? + +Starship is just as easy to uninstall as it is to install in the first place. + +1. Remove any lines in your shell config (e.g. `~/.bashrc`) used to initialize Starship. +1. Delete the Starship binary. + +If Starship was installed using a package manager, please refer to their docs for uninstallation instructions. + +If Starship was installed using the `curl | bash` script, the following command will delete the binary: + +```sh +# Locate and delete the starship binary +rm "$(which starship)" +``` diff --git a/docs/tr-TR/guide/README.md b/docs/tr-TR/guide/README.md new file mode 100644 index 000000000..74b5b1e69 --- /dev/null +++ b/docs/tr-TR/guide/README.md @@ -0,0 +1,272 @@ +

+ Starship – Cross-shell prompt +

+ +

+ GitHub Actions workflow status + Crates.io version + Packaging status
+ Chat on Discord + Follow @StarshipPrompt on Twitter +

+ +

+ Website + · + Installation + · + Configuration +

+ +

+ English +   + 日本語 +   + 繁體中文 +   + Русский +   + Deutsch +   + 简体中文 +   + Español +   + Français +

+ +

+ +Starship with iTerm2 and the Snazzy theme + +**The minimal, blazing-fast, and infinitely customizable prompt for any shell!** + +- **Fast:** it's fast – _really really_ fast! 🚀 +- **Customizable:** configure every aspect of your prompt. +- **Universal:** works on any shell, on any operating system. +- **Intelligent:** shows relevant information at a glance. +- **Feature rich:** support for all your favorite tools. +- **Easy:** quick to install – start using it in minutes. + +

+Explore the Starship docs  ▶ +

+ + + +## 🚀 Installation + +### Prerequisites + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). + +### Getting Started + +1. Install the **starship** binary: + + + #### Install Latest Version + + + ##### From prebuilt binary, with Shell: + + ```sh + curl -fsSL https://starship.rs/install.sh | bash + ``` + + + ##### From source on [crates.io](https://crates.io/): + + ```sh + cargo install starship + ``` + + + #### Install via Package Manager + + + ##### With [Homebrew](https://brew.sh/): + + ```sh + brew install starship + ``` + + + ##### With [Scoop](https://scoop.sh): + + ```powershell + scoop install starship + ``` + +1. Add the init script to your shell's config file: + + + #### Bash + + Add the following to the end of `~/.bashrc`: + + ```sh + # ~/.bashrc + + eval "$(starship init bash)" + ``` + + + #### Fish + + Add the following to the end of `~/.config/fish/config.fish`: + + ```sh + # ~/.config/fish/config.fish + + starship init fish | source + ``` + + + #### Zsh + + Add the following to the end of `~/.zshrc`: + + ```sh + # ~/.zshrc + + eval "$(starship init zsh)" + ``` + + + #### PowerShell + + Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. + + ```sh + Invoke-Expression (&starship init powershell) + ``` + + + #### Ion + + Add the following to the end of `~/.config/ion/initrc`: + + ```sh + # ~/.config/ion/initrc + + eval $(starship init ion) + ``` + +## 🤝 Contributing + +We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). + +If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/). + +If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋 + +### Code Contributors + +This project exists thanks to all the people who contribute. [[Contribute](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]. + + +### Financial Contributors + +Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)] + +#### Individuals + + + +#### Organizations + +Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)] + + + + + + + + + + + + +## 💭 Inspired By + +Please check out these previous works that helped inspire the creation of starship. 🙏 + +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts. + +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript. + +- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons. + +

+
+ Starship rocket icon +

+ +## 📝 License + +Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).
This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed. diff --git a/docs/tr-TR/migrating-to-0.45.0/README.md b/docs/tr-TR/migrating-to-0.45.0/README.md new file mode 100644 index 000000000..95a847bf2 --- /dev/null +++ b/docs/tr-TR/migrating-to-0.45.0/README.md @@ -0,0 +1,267 @@ +# Migrating to v0.45.0 + +Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization. + +This guide is intended to walk you through the breaking changes. + +## `prompt_order` has been replaced by a root-level `format` + +Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship. + +Starship v0.45.0 instead accepts a `format` value, allowing for customization of the prompt outside of the modules themselves. + +**Example pre-v0.45.0 configuration** + +```toml +prompt_order = [ + "username", + "hostname", + "directory", + "git_branch", + "git_commit", + "git_state", + "git_status", + "cmd_duration", + "custom", + "line_break", + "jobs", + "battery", + "time", + "character", +] +``` + +**Example v0.45.0 configuration** + +```toml +format = """\ + $username\ + $hostname\ + $directory\ + $git_branch\ + $git_commit\ + $git_state\ + $git_status\ + $cmd_duration\ + $custom\ + $line_break\ + $jobs\ + $battery\ + $time\ + $character\ + """ +``` + +## Module `prefix` and `suffix` have been replaced by `format` + +Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered. + +Starship v0.45.0 instead accepts a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output. + +**Example pre-v0.45.0 configuration** + +```toml +[cmd_duration] +prefix = "took " +``` + +**Example v0.45.0 configuration** + +```toml +[cmd_duration] +# $duration – The command duration (e.g. "15s") +# $style – The default style of the module (e.g. "bold yellow") +format = "took [$duration]($style) " +``` + +### Affected Modules + +#### Character + +| Removed Property | Replacement | +| ----------------------- | ---------------- | +| `symbol` | `success_symbol` | +| `use_symbol_for_status` | `error_symbol` | +| `style_success` | `success_symbol` | +| `style_failure` | `error_symbol` | + +**Changes to the Default Configuration** + +```diff +[character] +-- symbol = "❯" +-- error_symbol = "✖" +-- use_symbol_for_status = true +-- vicmd_symbol = "❮" +++ success_symbol = "[❯](bold green)" +++ error_symbol = "[❯](bold red)" +++ vicmd_symbol = "[❮](bold green)" +``` + +Previously, the `use_symbol_for_status` property was used to configure the prompt to show the `error_symbol` when the last command resulted in a non-zero status code. + +With the release of v0.45.0, we now always use `error_symbol` after non-zero status codes, unifying `use_symbol_for_status` and `error_symbol` properties. + +To configure the prompt to use the older `use_symbol_for_status = true` configuration, add the following to your config file: + +```toml +[character] +error_symbol = "[✖](bold red)" +``` + +*Note:* The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples. + +#### Command Duration + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | + +**Changes to the Default Configuration** + +```diff +[cmd_duration] +-- prefix = "took " +++ format = "took [$duration]($style) " +``` + +#### Directory + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | + +**Changes to the Default Configuration** + +```diff +[directory] +-- prefix = "in " +++ format = "[$path]($style)[$read_only]($read_only_style) " +``` + +#### Environment Variable + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[env_var] +-- prefix = "" +-- suffix = "" +++ format = "with [$env_value]($style) " +``` + +#### Git Commit + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[git_commit] +-- prefix = "(" +-- suffix = ")" +++ format = '[\($hash\)]($style) ' +``` + +#### Git Status + +| Removed Property | Replacement | +| ----------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | +| `show_sync_count` | `format` | + +**Changes to the Default Configuration** + +```diff +[git_status] +-- prefix = "[" +-- suffix = "]" +-- show_sync_count = false +++ format = '([\[$all_status$ahead_behind\]]($style) )' +``` + +Previously, the `show_sync_count` property was used to configure the prompt to show the number of commits the branch was ahead or behind the remote branch. + +With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`. + +To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file: + +```toml +[git_status] +ahead = "⇡${count}" +diverged = "⇕⇡${ahead_count}⇣${behind_count}" +behind = "⇣${count}" +``` + +#### Hostname + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[hostname] +-- prefix = "" +-- suffix = "" +++ format = "[$hostname]($style) in " +``` + +#### Singularity + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `label` | `format` | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[singularity] +-- prefix = "" +-- suffix = "" +++ format = '[$symbol\[$env\]]($style) ' +``` + +#### Time + +| Removed Property | Replacement | +| ---------------- | ------------- | +| `format` | `time_format` | + +**Changes to the Default Configuration** + +```diff +[time] +-- format = "🕙[ %T ]" +++ time_format = "%T" +++ format = "at 🕙[$time]($style) " +``` + +#### Custom Commands + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[custom.example] +-- prefix = "" +-- suffix = "" +++ format = "[$symbol$output]($style) " +``` diff --git a/docs/tr-TR/presets/README.md b/docs/tr-TR/presets/README.md new file mode 100644 index 000000000..746364fa2 --- /dev/null +++ b/docs/tr-TR/presets/README.md @@ -0,0 +1,89 @@ +# Presets + +Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊 + +## Nerd Font Symbols + +This preset doesn't change anything except for the symbols used for each module. If emojis aren't your thing, this might catch your eye! + +![Screenshot of Nerd Font Symbols preset](/presets/nerd-font-symbols.png) + +### Prerequisites + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font) + +### Configuration + +```toml +[aws] +symbol = " " + +[conda] +symbol = " " + +[dart] +symbol = " " + +[directory] +read_only = " " + +[docker] +symbol = " " + +[elixir] +symbol = " " + +[elm] +symbol = " " + +[git_branch] +symbol = " " + +[golang] +symbol = " " + +[haskell] +symbol = " " + +[hg_branch] +symbol = " " + +[java] +symbol = " " + +[julia] +symbol = " " + +[memory_usage] +symbol = " " + +[nim] +symbol = " " + +[nix_shell] +symbol = " " + +[nodejs] +symbol = " " + +[package] +symbol = " " + +[perl] +symbol = " " + +[php] +symbol = " " + +[python] +symbol = " " + +[ruby] +symbol = " " + +[rust] +symbol = " " + +[swift] +symbol = "ﯣ " +``` diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md index 01036fa7e..9a27229af 100644 --- a/docs/zh-CN/README.md +++ b/docs/zh-CN/README.md @@ -94,7 +94,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Powershell - Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. 对于 -Nix 来说,通常文件路径是 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` 或 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`。 + 将以下内容添加到 `Microsoft.PowerShell_profile.ps1`。 你可以在 PowerShell 通过 `$PROFILE` 变量来查询文件的位置。 对于 -Nix 来说,通常文件路径是 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` 或 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`。 ```sh Invoke-Expression (&starship init powershell) diff --git a/docs/zh-CN/advanced-config/README.md b/docs/zh-CN/advanced-config/README.md index 7d5738bbf..fc5a0020f 100644 --- a/docs/zh-CN/advanced-config/README.md +++ b/docs/zh-CN/advanced-config/README.md @@ -82,7 +82,7 @@ starship_precmd_user_func="set_win_title" `` 是颜色说明符(下面解释)。 `fg:` 和 `` 当前产生一样的效果,尽管未来可能会改变。 字符串中的单词顺序不影响显示结果。 -`none` 标识符会覆盖字符串中所有其他标识符,比如 `fg:red none fg:blue` 将创建一个没有样式设置的字符串。 未来可能会将 `none` 与其它标识符一起使用视为一种错误。 +The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. 颜色说明符可以是以下内容之一: diff --git a/docs/zh-CN/config/README.md b/docs/zh-CN/config/README.md index 8c10fe187..c2c21a262 100644 --- a/docs/zh-CN/config/README.md +++ b/docs/zh-CN/config/README.md @@ -51,7 +51,7 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" **组件(Module)**:提示符的组成部分,通过来自系统的上下文信息向用户显示各种信息。 比如“nodejs”组件会在当前目录是一个 NodeJS 项目时显示您当前安装的 NodeJS 版本。 -**Variable**: Smaller sub-components that contains information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of NodeJS. +**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 NodeJS. By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. @@ -197,6 +197,7 @@ $golang\ $helm\ $java\ $julia\ +$kotlin\ $nim\ $nodejs\ $ocaml\ @@ -217,8 +218,8 @@ $gcloud\ $openstack\ $env_var\ $crystal\ -$cmd_duration\ $custom\ +$cmd_duration\ $line_break\ $lua\ $jobs\ @@ -302,26 +303,17 @@ symbol = "🅰 " ### 配置项 -| Option | 默认值 | 描述 | -| -------------------- | --------------------------------- | ---------------- | -| `full_symbol` | `"•"` | 显示于电池充满时。 | -| `charging_symbol` | `"⇡"` | 显示于正在充电时。 | -| `discharging_symbol` | `"⇣"` | 显示于电池放电时。 | -| `format` | `"[$symbol$percentage]($style) "` | 组件格式化模板。 | -| `display` | [见下文](#battery-display) | 电量显示阈值和样式。 | -| `disabled` | `false` | 禁用 `battery` 组件。 | +| Option | 默认值 | 描述 | +| -------------------- | --------------------------------- | --------------------------------------------------- | +| `full_symbol` | `""` | 显示于电池充满时。 | +| `charging_symbol` | `""` | 显示于正在充电时。 | +| `discharging_symbol` | `""` | 显示于电池放电时。 | +| `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) "` | 组件格式化模板。 | +| `display` | [见下文](#battery-display) | Display threshold and style for the module. | +| `disabled` | `false` | Disables the `battery` module. | -
-也有一些给不常见的电源状态设立的字段。 - -| 字段 | 描述 | -| ---------------- | ---------- | -| `unknown_symbol` | 显示于电池状态未知时 | -| `empty_symbol` | 显示于电池状态为空时 | - -注意:如果状态为 `unknown` 或 `empty`,电池指示器将被隐藏,除非您在配置中指定相关选项。 - -
### 示例 @@ -336,7 +328,7 @@ discharging_symbol = "💀" ### Battery 组件的显示 -`display` 选项用于定义电池指示器的显示阈值(threshold)和显示效果(style)。 如果 `display` 没有设置, 默认设置如下: +The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. 默认设置如下: ```toml [[battery.display]] @@ -346,12 +338,12 @@ style = "bold red" #### 配置项 -`display` 字段的子字段如下: +The `display` option is an array of the following table. -| Option | 描述 | -| ----------- | ---------------- | -| `threshold` | 当前显示设置的电量上限(见示例) | -| `style` | 若组件被显示,则使用此样式 | +| Option | 描述 | +| ----------- | ----------------------------------------------- | +| `threshold` | The upper bound for the display option. | +| `style` | The style used if the display option is in use. | #### 示例 @@ -370,9 +362,9 @@ style = "bold yellow" ## Character -`character` 组件用于在您输入终端的文本旁显示一个字符(通常是一个箭头)。 +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. -这个字符可以告诉您最后一个命令是否执行成功。 It can do this in two ways: +The character will tell you whether the last command was successful or not. It can do this in two ways: - changing color (`red`/`green`) - changing shape (`❯`/`✖`) @@ -387,7 +379,7 @@ By default it only changes color. If you also want to change it's shape take a l | `success_symbol` | `"[❯](bold green)"` | The format string used before the text input if the previous command succeeded. | | `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. | | `vicmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | -| `disabled` | `false` | 禁用 `character` 组件。 | +| `disabled` | `false` | Disables the `character` module. | ### Variables @@ -454,27 +446,27 @@ The `cmake` module shows the currently installed version of CMake if any of the ## Command Duration -`cmd_duration` 组件显示上一个命令执行的时间。 此组件只在命令执行时间长于两秒时显示,或者当其 `min_time` 字段被设置时,按此值为执行时间的显示下限。 +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. -::: warning 不要在 Bash 里捕获 DEBUG 信号 +::: warning Do not hook the DEBUG trap in Bash -如果您正在 `bash` 上使用 Starship,在运行 `eval $(starship)` 后,不要捕获 `DEBUG` 信号,否则此组件**将会**坏掉。 +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. ::: -需要在自动每一条命令前执行某些操作的 Bash 用户可以使用 [rcaloras 的 bash_preexec 框架](https://github.com/rcaloras/bash-preexec)。 只需要在执行 `eval $(starship init $0)` 前简单地定义 `preexec_functions` 和 `precmd_functions` 两个列表,就可以照常运行了。 +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. ### 配置项 -| Option | 默认值 | 描述 | -| -------------------- | ----------------------------- | ----------------------------------------------------- | -| `min_time` | `2_000` | 显示此组件所需的最短执行时长(单位:毫秒)。 | -| `show_milliseconds` | `false` | 除了秒数外在执行时长中额外显示毫秒。 | -| `format` | `"took [$duration]($style) "` | 组件格式化模板。 | -| `style` | `"bold yellow"` | 此组件的样式。 | -| `disabled` | `false` | 禁用 `cmd_duration` 组件。 | -| `show_notifications` | `false` | Show desktop notifications when command completes. | -| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | +| Option | 默认值 | 描述 | +| -------------------- | ----------------------------- | ---------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | 组件格式化模板。 | +| `style` | `"bold yellow"` | 此组件的样式。 | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `show_notifications` | `false` | Show desktop notifications when command completes. | +| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | ::: tip @@ -513,14 +505,14 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c ### 配置项 -| Option | 默认值 | 描述 | -| ------------------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `truncation_length` | `1` | 如果这个 conda 环境是通过 `conda create -p [path]` 创建的,环境路径的目录深度应该被截断到此数量。 `0` 表示不用截断。 另请参阅 [`directory`](#directory) 组件。 | -| `symbol` | `"🅒 "` | 在环境名之前显示的符号。 | -| `style` | `"bold green"` | 此组件的样式。 | -| `format` | `"[$symbol$environment]($style) "` | 组件格式化模板。 | -| `ignore_base` | `true` | Ignores `base` environment when activated. | -| `disabled` | `false` | 禁用 `conda` 组件。 | +| Option | 默认值 | 描述 | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. | +| `symbol` | `"🅒 "` | The symbol used before the environment name. | +| `style` | `"bold green"` | 此组件的样式。 | +| `format` | `"via [$symbol$environment]($style) "` | 组件格式化模板。 | +| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `disabled` | `false` | Disables the `conda` module. | ### Variables @@ -543,7 +535,7 @@ format = "[$symbol$environment](dimmed green) " ## Crystal -The `crystal` module shows the currently installed version of Crystal. The module will be shown if any of the following conditions are met: +The `crystal` module shows the currently installed version of Crystal. 此组件将在符合以下任意条件之一时显示: - 当前目录包含一个 `shard.yml` 文件 - The current directory contains a `.cr` file @@ -578,7 +570,7 @@ format = "via [✨ $version](bold blue) " ## Dart -The `dart` module shows the currently installed version of Dart. The module will be shown if any of the following conditions are met: +The `dart` module shows the currently installed version of Dart. 此组件将在符合以下任意条件之一时显示: - The current directory contains a file with `.dart` extension - The current directory contains a `.dart_tool` directory @@ -622,25 +614,25 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### 配置项 -| Option | 默认值 | 描述 | -| ------------------- | -------------------------------------------------- | ----------------------------------------------------- | -| `truncation_length` | `3` | 当前目录路径被截断后最多保留的父目录数量。 | -| `truncate_to_repo` | `true` | 是否只截断到您当前处于的 git 仓库根目录下。 | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | 组件格式化模板。 | -| `style` | `"bold cyan"` | 此组件的样式。 | -| `disabled` | `false` | 禁用 `directory` 组件。 | -| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | -| `read_only_style` | `"red"` | The style for the read only symbol. | -| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | +| Option | 默认值 | 描述 | +| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | 组件格式化模板。 | +| `style` | `"bold cyan"` | 此组件的样式。 | +| `disabled` | `false` | Disables the `directory` module. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
This module has a few advanced configuration options that control how the directory is displayed. -| Advanced Option | 默认值 | 描述 | -| --------------------------- | ------ | ------------------------------------------------ | -| `substitutions` | | A table of substitutions to be made to the path. | -| `fish_style_pwd_dir_length` | `0` | 使用 fish shell 当前目录路径逻辑时每个省略目录名使用的字符数。 | -| `use_logical_path` | `true` | 显示由 shell 提供的逻辑路径(`PWD`)而不是 OS 提供的路径。 | +| Advanced Option | 默认值 | 描述 | +| --------------------------- | ------ | ---------------------------------------------------------------------------------------- | +| `substitutions` | | A table of substitutions to be made to the path. | +| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. | +| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. | `substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD. @@ -730,13 +722,13 @@ The module will also show the Target Framework Moniker ( ⚠ 此组件显示的是源代码在当前目录中的软件包的版本,而不是包管理器的版本。 @@ -1795,7 +1833,7 @@ format = "via [🎁 $version](208 bold) " ## Perl -The `perl` module shows the currently installed version of Perl. The module will be shown if any of the following conditions are met: +The `perl` module shows the currently installed version of Perl. 此组件将在符合以下任意条件之一时显示: - The current directory contains a `Makefile.PL` or `Build.PL` file - The current directory contains a `cpanfile` or `cpanfile.snapshot` file @@ -1831,7 +1869,7 @@ format = "via [🦪 $version]($style) " ## PHP -The `php` module shows the currently installed version of PHP. The module will be shown if any of the following conditions are met: +The `php` module shows the currently installed version of PHP. 此组件将在符合以下任意条件之一时显示: - The current directory contains a `composer.json` file - The current directory contains a `.php-version` file @@ -1867,7 +1905,7 @@ format = "via [🔹 $version](147 bold) " ## PureScript -The `purescript` module shows the currently installed version of PureScript version. The module will be shown if any of the following conditions are met: +The `purescript` module shows the currently installed version of PureScript version. 此组件将在符合以下任意条件之一时显示: - The current directory contains a `spago.dhall` file - The current directory contains a \*.purs files @@ -1906,7 +1944,7 @@ The `python` module shows the currently installed version of Python and the curr If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`. -The module will be shown if any of the following conditions are met: +此组件将在符合以下任意条件之一时显示: - The current directory contains a `.python-version` file - The current directory contains a `requirements.txt` file @@ -1920,16 +1958,24 @@ The module will be shown if any of the following conditions are met: ### 配置项 -| Option | 默认值 | 描述 | -| -------------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | 组件格式化模板。 | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | 此组件的样式。 | -| `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | -| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | -| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. | -| `disabled` | `false` | Disables the `python` module. | +| Option | 默认值 | 描述 | +| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | 组件格式化模板。 | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | 此组件的样式。 | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | + +::: tip + +The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used. + +The default values and order for `python_binary` was chosen to first identify the Python version in a virtualenv/conda environments (which currently still add a `python`, no matter if it points to `python3` or `python2`). This has the side effect that if you still have a system Python 2 installed, it may be picked up before any Python 3 (at least on Linux Distros that always symlink `/usr/bin/python` to Python 2). If you do not work with Python 2 anymore but cannot remove the system Python 2, changing this to `"python3"` will hide any Python version 2, see example below. + +::: ### Variables @@ -1952,20 +1998,17 @@ symbol = "👾 " pyenv_version_name = true ``` -Using the `python3` binary to get the version. - -Note - The `python_binary` variable changes the binary that Starship executes to get the version of Python, it doesn't change the arguments that are used. - ```toml # ~/.config/starship.toml [python] +# Only use the `python3` binary to get the version. python_binary = "python3" ``` ## Ruby -The `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met: +The `ruby` module shows the currently installed version of Ruby. 此组件将在符合以下任意条件之一时显示: - The current directory contains a `Gemfile` file - The current directory contains a `.ruby-version` file @@ -2001,7 +2044,7 @@ symbol = "🔺 " ## Rust -The `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met: +The `rust` module shows the currently installed version of Rust. 此组件将在符合以下任意条件之一时显示: - The current directory contains a `Cargo.toml` file - The current directory contains a file with the `.rs` extension @@ -2040,13 +2083,14 @@ The `shlvl` module shows the current SHLVL ("shell level") environment variable, ### 配置项 -| Option | 默认值 | 描述 | -| ----------- | ---------------------------- | --------------------------------------- | -| `threshold` | `2` | Display threshold. | -| `format` | `"[$symbol$shlvl]($style) "` | 组件格式化模板。 | -| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | -| `style` | `"bold yellow"` | 此组件的样式。 | -| `disabled` | `true` | Disables the `shlvl` module. | +| Option | 默认值 | 描述 | +| ----------- | ---------------------------- | ----------------------------------------------------------- | +| `threshold` | `2` | Display threshold. | +| `format` | `"[$symbol$shlvl]($style) "` | 组件格式化模板。 | +| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | +| `repeat` | `false` | Causes `symbol` to be repeated by the current SHLVL amount. | +| `style` | `"bold yellow"` | 此组件的样式。 | +| `disabled` | `true` | Disables the `shlvl` module. | ### Variables @@ -2111,20 +2155,31 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### 配置项 -| Option | 默认值 | 描述 | -| ---------- | -------------------------- | ------------------------------------------------------ | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | A format string representing the symbol for the status | -| `style` | `"bold red"` | 此组件的样式。 | -| `disabled` | `true` | Disables the `status` module. | +| Option | 默认值 | 描述 | +| ----------------------- | -------------------------- | ---------------------------------------------------- | +| `format` | `[$symbol$status]($style)` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | +| `style` | `"bold red"` | 此组件的样式。 | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### Variables -| 字段 | 示例 | 描述 | -| --------- | ----- | --------------------------------- | -| status | `127` | The exit code of the last command | -| symbol | | `symbol`对应值 | -| style\* | | `style`对应值 | +| 字段 | 示例 | 描述 | +| -------------- | ------- | -------------------------------------------------------------------- | +| status | `127` | The exit code of the last command | +| int | `127` | The exit code of the last command | +| common_meaning | `ERROR` | Meaning of the code if not a signal | +| signal_number | `9` | Signal number corresponding to the exit code, only if signalled | +| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled | +| maybe_int | `7` | Contains the exit code number when no meaning has been found | +| symbol | | `symbol`对应值 | +| style\* | | `style`对应值 | \*: This variable can only be used as a part of a style string @@ -2136,15 +2191,16 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y [status] style = "bg:blue" -symbol = "💣 " -format = '[\[$symbol$status\]]($style) ' +symbol = "🔴" +format = '[\[$symbol $status_common_meaning$status_signal_name$status_maybe_int\]]($style) ' +map_symbol = true disabled = false ``` ## Swift -The `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met: +The `swift` module shows the currently installed version of Swift. 此组件将在符合以下任意条件之一时显示: - The current directory contains a `Package.swift` file - The current directory contains a file with the `.swift` extension @@ -2179,7 +2235,7 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). The module will be shown if any of the following conditions are met: +The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). 此组件将在符合以下任意条件之一时显示: - The current directory contains a `.terraform` folder - Current directory contains a file with the `.tf` or `.hcl` extensions @@ -2272,13 +2328,15 @@ time_range = "10:00:00-14:00:00" ## Username -The `username` module shows active user's username. The module will be shown if any of the following conditions are met: +The `username` module shows active user's username. 此组件将在符合以下任意条件之一时显示: - The current user is root - The current user isn't the same as the one that is logged in - The user is currently connected as an SSH session - The variable `show_always` is set to true +::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. ::: + ### 配置项 | Option | 默认值 | 描述 | @@ -2311,7 +2369,7 @@ show_always = true ## Zig -The `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met: +The `zig` module shows the currently installed version of Zig. 此组件将在符合以下任意条件之一时显示: - The current directory contains a `.zig` file diff --git a/docs/zh-CN/faq/README.md b/docs/zh-CN/faq/README.md index c8db82b49..ec338c93d 100644 --- a/docs/zh-CN/faq/README.md +++ b/docs/zh-CN/faq/README.md @@ -12,7 +12,7 @@ ## How do I get command completion as shown in the demo GIF? -Completion support 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). +Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions). ## Do top level `format` and `.disabled` do the same thing? @@ -21,7 +21,7 @@ Completion support is provided by your shell of choice. In the case of the demo, - Disabling modules is more explicit than omitting them from the top level `format` - 当 Starship 升级后,新组件将能够自动被加入提示符中 -## 你们的文档说“Starship 是跨 shell 的”,但它不支持 X shell。 为什么? +## The docs say Starship is cross-shell. Why isn't my preferred shell supported? Starship 的构建方式决定了它应当能够增加对几乎所有 shell 的支持。 Starship 的二进制文件是无状态、不知道当前 shell 的,所以只要你的 shell 支持自定义提示符和 shell 扩展,就能使用 Starship。 diff --git a/docs/zh-CN/guide/README.md b/docs/zh-CN/guide/README.md index dfa0c810f..50aeef8f8 100644 --- a/docs/zh-CN/guide/README.md +++ b/docs/zh-CN/guide/README.md @@ -79,13 +79,15 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png" alt="简体中文" />   - Español   - - **轻量级、反应迅速,可定制的高颜值终端!** - - **快:** 很快 —— 真的真的非常快! 🚀 - **定制化:** 可定制各种各样的提示符。 - **通用:** 适用于任何 Shell、任何操作系统。 @@ -199,7 +199,7 @@ #### PowerShell - 将以下内容添加到 `Microsoft.PowerShell_profile.ps1`。 你可以在 PowerShell 通过 `$PROFILE` 变量来查询文件的位置。 对于 -Nix 来说,通常文件路径是 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` 或 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`。 + 将以下内容添加到 `Microsoft.PowerShell_profile.ps1`。 你可以在 PowerShell 通过 `$PROFILE` 变量来查询文件的位置。 对于 -Nix 来说,通常文件路径是 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` 或 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`。 ```sh Invoke-Expression (&starship init powershell) @@ -220,6 +220,8 @@ 我们一直在寻找贡献者!你都可以参与贡献 **不论你的技能如何**。 如果您希望快速为项目作出贡献,请尝试解决 [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)。 +If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/). + 如果您有兴趣贡献于 Starship,请查看我们的[贡献指南](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)。 另外,你可以自由加入我们的 [Discord 服务器](https://discord.gg/8Jzqu3T) 。 👋 ### 代码贡献者 diff --git a/docs/zh-CN/presets/README.md b/docs/zh-CN/presets/README.md index a94b46c99..b97e3888a 100644 --- a/docs/zh-CN/presets/README.md +++ b/docs/zh-CN/presets/README.md @@ -18,17 +18,15 @@ [aws] symbol = " " -[battery] -full_symbol = "" -charging_symbol = "" -discharging_symbol = "" - [conda] symbol = " " [dart] symbol = " " +[directory] +read_only = " " + [docker] symbol = " " diff --git a/docs/zh-TW/advanced-config/README.md b/docs/zh-TW/advanced-config/README.md index 2f0519ac0..15b1c4c7f 100644 --- a/docs/zh-TW/advanced-config/README.md +++ b/docs/zh-TW/advanced-config/README.md @@ -82,7 +82,7 @@ starship_precmd_user_func="set_win_title" 其中 `` 是指定顏色用的(下面解釋)。 `fg:` 與 `` 目前做一樣的事情,不過未來可能會改變。 單詞在字串中的順序不重要。 -`none` 符號覆寫字串中其他所有符號,所以像是 `fg:red none fg:blue` 會創造出一個沒有任何風格的字串。 未來可能會將 `none` 與其他符號一起使用的情形視為是一種錯誤。 +The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. 一個顏色指定符號可以是下列其中之一: diff --git a/docs/zh-TW/config/README.md b/docs/zh-TW/config/README.md index 3761278f8..90026bd73 100644 --- a/docs/zh-TW/config/README.md +++ b/docs/zh-TW/config/README.md @@ -51,7 +51,7 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" **模組 (Module)**: 提示字元中的一個元件,基於你的作業系統提供的背景資訊來提供訊息。 舉例來說,如果你現在的資料夾是一個 NodeJS 專案,"nodejs" 模組會顯示出現在安裝在你的電腦上的 NodeJS 版本。 -**Variable**: Smaller sub-components that contains information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of NodeJS. +**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 NodeJS. By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. @@ -197,6 +197,7 @@ $golang\ $helm\ $java\ $julia\ +$kotlin\ $nim\ $nodejs\ $ocaml\ @@ -217,8 +218,8 @@ $gcloud\ $openstack\ $env_var\ $crystal\ -$cmd_duration\ $custom\ +$cmd_duration\ $line_break\ $lua\ $jobs\ @@ -302,26 +303,17 @@ symbol = "🅰 " ### 選項 -| Option | 預設 | 說明 | -| -------------------- | --------------------------------- | -------------------------- | -| `full_symbol` | `"•"` | 當電池充飽時顯示的符號。 | -| `charging_symbol` | `"⇡"` | 當電池正在充電時顯示的符號。 | -| `discharging_symbol` | `"⇣"` | 當電池正在放電時顯示的符號。 | -| `format` | `"[$symbol$percentage]($style) "` | The format for the module. | -| `display` | [連結](#battery-display) | 顯示的門檻與模組的風格。 | -| `disabled` | `false` | 停用 `battery` 模組。 | +| Option | 預設 | 說明 | +| -------------------- | --------------------------------- | --------------------------------------------------- | +| `full_symbol` | `""` | 當電池充飽時顯示的符號。 | +| `charging_symbol` | `""` | 當電池正在充電時顯示的符號。 | +| `discharging_symbol` | `""` | 當電池正在放電時顯示的符號。 | +| `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. | +| `display` | [連結](#battery-display) | Display threshold and style for the module. | +| `disabled` | `false` | Disables the `battery` module. | -
-也有些針對不常見的電池狀態設定的選項。 - -| 變數 | 說明 | -| ---------------- | -------------- | -| `unknown_symbol` | 當電池狀態不明時顯示的符號。 | -| `empty_symbol` | 當電池沒電時顯示的符號。 | - -注意:電池指示會在電池狀態`不明`或`沒電`時隱藏起來,除非你在設定之中有特別指定選項。 - -
### 範例 @@ -336,7 +328,7 @@ discharging_symbol = "💀" ### 電池顯示 -`display` 設定是用來定義甚麼時候電池指示會顯示出來 (threshold),以及它長甚麼樣子 (style)。 如果沒有提供 `display`。 預設如下: +The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. 預設如下: ```toml [[battery.display]] @@ -346,12 +338,12 @@ style = "bold red" #### 選項 -`display` 選項是一個下列表格的陣列。 +The `display` option is an array of the following table. -| Option | 說明 | -| ----------- | ----------- | -| `threshold` | 顯示選項的上界。 | -| `style` | 顯示選項使用時的風格。 | +| Option | 說明 | +| ----------- | ----------------------------------------------- | +| `threshold` | The upper bound for the display option. | +| `style` | The style used if the display option is in use. | #### 範例 @@ -370,9 +362,9 @@ style = "bold yellow" ## 字元 -`character` 模組在你的文字輸入處旁顯示一個字元 (通常是箭頭)。 +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. -這個字元會告訴你最後的指令是成功還是失敗。 It can do this in two ways: +The character will tell you whether the last command was successful or not. It can do this in two ways: - changing color (`red`/`green`) - changing shape (`❯`/`✖`) @@ -387,7 +379,7 @@ By default it only changes color. If you also want to change it's shape take a l | `success_symbol` | `"[❯](bold green)"` | The format string used before the text input if the previous command succeeded. | | `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. | | `vicmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | -| `disabled` | `false` | 停用 `character` 模組。 | +| `disabled` | `false` | Disables the `character` module. | ### Variables @@ -454,27 +446,27 @@ The `cmake` module shows the currently installed version of CMake if any of the ## 指令持續時間 -`cmd_duration` 模組顯示最後一個指令執行所花費的時間。 這個模組只會在指令花費超過兩秒或是有設定 `min_time` 時,超過設定值時出現。 +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. -::: warning 不要在 Bash 中設置 DEBUG trap +::: warning Do not hook the DEBUG trap in Bash -如果你在 `bash` 中使用 Starship,不要在執行 `eval $(starship init $0)` 之後設置 `DEBUG` trap,不然這個模組**會**壞掉。 +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. ::: -想使用類似 preexec 功能的 Bash 使用者可以 [rcaloras 的 bash_preexec 框架](https://github.com/rcaloras/bash-preexec)。 只要在 `eval $(starship init $0)` 之前簡單地定義 `preexec_functions` 與 `precmd_functions` 兩個陣列,然後就可以照常進行。 +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. ### 選項 -| Option | 預設 | 說明 | -| -------------------- | ----------------------------- | ----------------------------------------------------- | -| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | -| `show_milliseconds` | `false` | 顯示時間除了以秒為單位外,亦以毫秒顯示 | -| `format` | `"took [$duration]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | 這個模組的風格。 | -| `disabled` | `false` | 停用 `cmd_duration` 模組。 | -| `show_notifications` | `false` | Show desktop notifications when command completes. | -| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | +| Option | 預設 | 說明 | +| -------------------- | ----------------------------- | ---------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | 這個模組的風格。 | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `show_notifications` | `false` | Show desktop notifications when command completes. | +| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | ::: tip @@ -513,14 +505,14 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c ### 選項 -| Option | 預設 | 說明 | -| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------- | -| `truncation_length` | `1` | 如果環境變數由所`conda create -p [path]`產生時,環境變數的資料夾需要截斷的數目。 `0` 表示不截斷 也請參考 [`directory`](#directory)模組 | -| `symbol` | `"🅒 "` | 環境名稱前使用的符號。 | -| `style` | `"bold green"` | 這個模組的風格。 | -| `format` | `"[$symbol$environment]($style) "` | The format for the module. | -| `ignore_base` | `true` | Ignores `base` environment when activated. | -| `disabled` | `false` | 停用 `conda` 模組。 | +| Option | 預設 | 說明 | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. | +| `symbol` | `"🅒 "` | The symbol used before the environment name. | +| `style` | `"bold green"` | 這個模組的風格。 | +| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `disabled` | `false` | Disables the `conda` module. | ### Variables @@ -543,7 +535,7 @@ format = "[$symbol$environment](dimmed green) " ## Crystal -The `crystal` module shows the currently installed version of Crystal. The module will be shown if any of the following conditions are met: +The `crystal` module shows the currently installed version of Crystal. 這個模組在下列其中一個條件達成時顯示: - 現在資料夾中含有一個 `shard.yml` 檔案 - 現在資料夾中含有一個`.cr`檔案 @@ -578,7 +570,7 @@ format = "via [✨ $version](bold blue) " ## Dart -The `dart` module shows the currently installed version of Dart. The module will be shown if any of the following conditions are met: +The `dart` module shows the currently installed version of Dart. 這個模組在下列其中一個條件達成時顯示: - The current directory contains a file with `.dart` extension - The current directory contains a `.dart_tool` directory @@ -622,25 +614,25 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### 選項 -| Option | 預設 | 說明 | -| ------------------- | -------------------------------------------------- | ----------------------------------------------------- | -| `truncation_length` | `3` | 到達現在資料夾的路徑中,要被裁減掉的資料夾數目。 | -| `truncate_to_repo` | `true` | 是否要裁減到你現在所在的 git 儲存庫的根目錄。 | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | -| `style` | `"bold cyan"` | 這個模組的風格。 | -| `disabled` | `false` | 停用 `directory` 模組。 | -| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | -| `read_only_style` | `"red"` | The style for the read only symbol. | -| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | +| Option | 預設 | 說明 | +| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | +| `style` | `"bold cyan"` | 這個模組的風格。 | +| `disabled` | `false` | Disables the `directory` module. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
This module has a few advanced configuration options that control how the directory is displayed. -| Advanced Option | 預設 | 說明 | -| --------------------------- | ------ | ------------------------------------------------ | -| `substitutions` | | A table of substitutions to be made to the path. | -| `fish_style_pwd_dir_length` | `0` | 當使用 fish shell 的 pwd 路徑邏輯時使用的字元數量。 | -| `use_logical_path` | `true` | 顯示 shell (`PWD`) 提供的邏輯路徑,而不是 OS 的路徑。 | +| Advanced Option | 預設 | 說明 | +| --------------------------- | ------ | ---------------------------------------------------------------------------------------- | +| `substitutions` | | A table of substitutions to be made to the path. | +| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. | +| `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. | `substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD. @@ -730,13 +722,13 @@ The module will also show the Target Framework Moniker ( ⚠️ 顯示出來的版本是從你的現在資料夾之中擷取出來的,並非從套件管理員取得。 @@ -1795,7 +1833,7 @@ format = "via [🎁 $version](208 bold) " ## Perl -The `perl` module shows the currently installed version of Perl. The module will be shown if any of the following conditions are met: +The `perl` module shows the currently installed version of Perl. 這個模組在下列其中一個條件達成時顯示: - The current directory contains a `Makefile.PL` or `Build.PL` file - The current directory contains a `cpanfile` or `cpanfile.snapshot` file @@ -1831,7 +1869,7 @@ format = "via [🦪 $version]($style) " ## PHP -The `php` module shows the currently installed version of PHP. The module will be shown if any of the following conditions are met: +The `php` module shows the currently installed version of PHP. 這個模組在下列其中一個條件達成時顯示: - The current directory contains a `composer.json` file - The current directory contains a `.php-version` file @@ -1867,7 +1905,7 @@ format = "via [🔹 $version](147 bold) " ## PureScript -The `purescript` module shows the currently installed version of PureScript version. The module will be shown if any of the following conditions are met: +The `purescript` module shows the currently installed version of PureScript version. 這個模組在下列其中一個條件達成時顯示: - The current directory contains a `spago.dhall` file - The current directory contains a \*.purs files @@ -1906,7 +1944,7 @@ The `python` module shows the currently installed version of Python and the curr If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`. -The module will be shown if any of the following conditions are met: +這個模組在下列其中一個條件達成時顯示: - The current directory contains a `.python-version` file - The current directory contains a `requirements.txt` file @@ -1920,16 +1958,24 @@ The module will be shown if any of the following conditions are met: ### 選項 -| Option | 預設 | 說明 | -| -------------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | 這個模組的風格。 | -| `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | -| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | -| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. | -| `disabled` | `false` | Disables the `python` module. | +| Option | 預設 | 說明 | +| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | 這個模組的風格。 | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | + +::: tip + +The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used. + +The default values and order for `python_binary` was chosen to first identify the Python version in a virtualenv/conda environments (which currently still add a `python`, no matter if it points to `python3` or `python2`). This has the side effect that if you still have a system Python 2 installed, it may be picked up before any Python 3 (at least on Linux Distros that always symlink `/usr/bin/python` to Python 2). If you do not work with Python 2 anymore but cannot remove the system Python 2, changing this to `"python3"` will hide any Python version 2, see example below. + +::: ### Variables @@ -1952,20 +1998,17 @@ symbol = "👾 " pyenv_version_name = true ``` -Using the `python3` binary to get the version. - -Note - The `python_binary` variable changes the binary that Starship executes to get the version of Python, it doesn't change the arguments that are used. - ```toml # ~/.config/starship.toml [python] +# Only use the `python3` binary to get the version. python_binary = "python3" ``` ## Ruby -The `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met: +The `ruby` module shows the currently installed version of Ruby. 這個模組在下列其中一個條件達成時顯示: - The current directory contains a `Gemfile` file - The current directory contains a `.ruby-version` file @@ -2001,7 +2044,7 @@ symbol = "🔺 " ## Rust -The `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met: +The `rust` module shows the currently installed version of Rust. 這個模組在下列其中一個條件達成時顯示: - The current directory contains a `Cargo.toml` file - The current directory contains a file with the `.rs` extension @@ -2040,13 +2083,14 @@ The `shlvl` module shows the current SHLVL ("shell level") environment variable, ### 選項 -| Option | 預設 | 說明 | -| ----------- | ---------------------------- | --------------------------------------- | -| `threshold` | `2` | Display threshold. | -| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. | -| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | -| `style` | `"bold yellow"` | 這個模組的風格。 | -| `disabled` | `true` | Disables the `shlvl` module. | +| Option | 預設 | 說明 | +| ----------- | ---------------------------- | ----------------------------------------------------------- | +| `threshold` | `2` | Display threshold. | +| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. | +| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | +| `repeat` | `false` | Causes `symbol` to be repeated by the current SHLVL amount. | +| `style` | `"bold yellow"` | 這個模組的風格。 | +| `disabled` | `true` | Disables the `shlvl` module. | ### Variables @@ -2111,20 +2155,31 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### 選項 -| Option | 預設 | 說明 | -| ---------- | -------------------------- | ------------------------------------------------------ | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | A format string representing the symbol for the status | -| `style` | `"bold red"` | 這個模組的風格。 | -| `disabled` | `true` | Disables the `status` module. | +| Option | 預設 | 說明 | +| ----------------------- | -------------------------- | ---------------------------------------------------- | +| `format` | `[$symbol$status]($style)` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | +| `style` | `"bold red"` | 這個模組的風格。 | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### Variables -| 變數 | 範例 | 說明 | -| --------- | ----- | ------------------------------------ | -| status | `127` | The exit code of the last command | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| 變數 | 範例 | 說明 | +| -------------- | ------- | -------------------------------------------------------------------- | +| status | `127` | The exit code of the last command | +| int | `127` | The exit code of the last command | +| common_meaning | `ERROR` | Meaning of the code if not a signal | +| signal_number | `9` | Signal number corresponding to the exit code, only if signalled | +| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled | +| maybe_int | `7` | Contains the exit code number when no meaning has been found | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | \*: This variable can only be used as a part of a style string @@ -2136,15 +2191,16 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y [status] style = "bg:blue" -symbol = "💣 " -format = '[\[$symbol$status\]]($style) ' +symbol = "🔴" +format = '[\[$symbol $status_common_meaning$status_signal_name$status_maybe_int\]]($style) ' +map_symbol = true disabled = false ``` ## Swift -The `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met: +The `swift` module shows the currently installed version of Swift. 這個模組在下列其中一個條件達成時顯示: - The current directory contains a `Package.swift` file - The current directory contains a file with the `.swift` extension @@ -2179,7 +2235,7 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). The module will be shown if any of the following conditions are met: +The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version). 這個模組在下列其中一個條件達成時顯示: - The current directory contains a `.terraform` folder - Current directory contains a file with the `.tf` or `.hcl` extensions @@ -2272,13 +2328,15 @@ time_range = "10:00:00-14:00:00" ## Username -The `username` module shows active user's username. The module will be shown if any of the following conditions are met: +The `username` module shows active user's username. 這個模組在下列其中一個條件達成時顯示: - The current user is root - The current user isn't the same as the one that is logged in - The user is currently connected as an SSH session - The variable `show_always` is set to true +::: tip SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. ::: + ### 選項 | Option | 預設 | 說明 | @@ -2311,7 +2369,7 @@ show_always = true ## Zig -The `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met: +The `zig` module shows the currently installed version of Zig. 這個模組在下列其中一個條件達成時顯示: - The current directory contains a `.zig` file diff --git a/docs/zh-TW/faq/README.md b/docs/zh-TW/faq/README.md index 1d05fec1f..9bb23bf93 100644 --- a/docs/zh-TW/faq/README.md +++ b/docs/zh-TW/faq/README.md @@ -12,7 +12,7 @@ ## How do I get command completion as shown in the demo GIF? -Completion support 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). +Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions). ## Do top level `format` and `.disabled` do the same thing? @@ -21,7 +21,7 @@ Yes, they can both be used to disable modules in the prompt. If all you plan to - Disabling modules is more explicit than omitting them from the top level `format` - Newly created modules will be added to the prompt as Starship is updated -## The docs say Starship is cross-shell, but it doesn't support X shell. Why? +## 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. diff --git a/docs/zh-TW/guide/README.md b/docs/zh-TW/guide/README.md index bd7236321..c4c5e377a 100644 --- a/docs/zh-TW/guide/README.md +++ b/docs/zh-TW/guide/README.md @@ -79,13 +79,15 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png" alt="简体中文" />   - Español   - - **The minimal, blazing-fast, and infinitely customizable prompt for any shell!** - - **Fast:** it's fast – _really really_ fast! 🚀 - **Customizable:** configure every aspect of your prompt. - **Universal:** works on any shell, on any operating system. @@ -199,7 +199,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. + Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. ```sh Invoke-Expression (&starship init powershell) @@ -220,6 +220,8 @@ 我們歡迎具有**各式各樣能力**的貢獻者! 如果你正在尋找容易加入的方法,試試看標註為「[good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)」的 issue。 +If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/). + 如果你對貢獻 Starship 有興趣,請看我們的 [貢獻指南](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) 。 另外,請不用客氣加入我們的 [Discord 伺服器](https://discord.gg/8Jzqu3T) 並來問候一下。 👋 ### Code Contributors diff --git a/docs/zh-TW/presets/README.md b/docs/zh-TW/presets/README.md index c634a3782..a2808a2c9 100644 --- a/docs/zh-TW/presets/README.md +++ b/docs/zh-TW/presets/README.md @@ -18,17 +18,15 @@ This preset doesn't change anything except for the symbols used for each module. [aws] symbol = " " -[battery] -full_symbol = "" -charging_symbol = "" -discharging_symbol = "" - [conda] symbol = " " [dart] symbol = " " +[directory] +read_only = " " + [docker] symbol = " "