diff --git a/docs/ar-SA/advanced-config/README.md b/docs/ar-SA/advanced-config/README.md index 6fbbe10b..110d965c 100644 --- a/docs/ar-SA/advanced-config/README.md +++ b/docs/ar-SA/advanced-config/README.md @@ -205,7 +205,9 @@ Some shells support a right prompt which renders on the same line as the input. Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](/config/#fill). -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. + +Note: Nushell 0.71.0 or later is required ### مثال @@ -280,5 +282,5 @@ If multiple colors are specified for foreground/background, the last one in the Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: - Many terminals disable support for `blink` by default -- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564). +- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). - `strikethrough` is not supported by the default macOS Terminal.app diff --git a/docs/ar-SA/config/README.md b/docs/ar-SA/config/README.md index e4361002..40b5598d 100644 --- a/docs/ar-SA/config/README.md +++ b/docs/ar-SA/config/README.md @@ -15,15 +15,17 @@ All configuration for starship is done in this [TOML](https://github.com/toml-la # Inserts a blank line between shell prompts add_newline = true -# Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +# 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 ``` +### Config File Location + You can change default configuration file location with `STARSHIP_CONFIG` environment variable: ```sh @@ -70,6 +72,62 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. +### Strings + +In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. + +The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. + +| Symbol | Type | Notes | +| ------ | ------------------------- | ------------------------------------------------------ | +| `'` | literal string | less escaping | +| `"` | string | more escaping | +| `'''` | multi-line literal string | less escaping | +| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | + +على سبيل المثال: + +```toml +# literal string +format = '☺\☻ ' + +# regular string +format = "☺\\☻ " + +# escaping Starship symbols +format = '\[\$\] ' +``` + +When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: + +```toml +# with literal string +format = ''' + +\$''' + +# with multiline basic string +format = """ + +\\$""" + +# with basic string +format = "\n\\$" +``` + +In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. + +```toml +format = """ +line1\ +line1\ +line1 +line2\ +line2\ +line2 +""" +``` + ### Format Strings Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. @@ -80,9 +138,9 @@ A variable contains a `$` symbol followed by the name of the variable. The name على سبيل المثال: -- `$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. +- `'$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 @@ -94,20 +152,20 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri على سبيل المثال: -- `[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. +- `'[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 +- `'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. @@ -117,43 +175,20 @@ A conditional format string wrapped in `(` and `)` will not render if all variab على سبيل المثال: -- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. -- `(some text)` will always show nothing since there are no variables wrapped in the braces. -- 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\] )`. - -#### Special characters - -The following symbols have special usage in a format string and must be escaped: `$ \ [ ] ( )`. - -Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). - -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 = ''' - -\$''' -``` +- `'(@$region)'` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. +- `'(some text)'` will always show nothing since there are no variables wrapped in the braces. +- When `$combined` is a shortcut for `\[$a$b\]`, `'($combined)'` will show nothing only if `$a` and `$b` are both `None`. This works the same as `'(\[$a$b\] )'`. ### Negative matching -Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched. +Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading '!' character. The presence of _any_ negative indicator in the directory will result in the module not being matched. Extensions are matched against both the characters after the last dot in a filename, and the characters after the first dot in a filename. For example, `foo.bar.tar.gz` will be matched against `bar.tar.gz` and `gz` in the `detect_extensions` variable. Files whose name begins with a dot are not considered to have extensions at all. To see how this works in practice, you could match TypeScript but not MPEG Transport Stream files thus: ```toml -detect_extensions = ["ts", "!video.ts", "!audio.ts"] +detect_extensions = ['ts', '!video.ts', '!audio.ts'] ``` ## Prompt @@ -165,11 +200,11 @@ This is the list of prompt-wide configuration options. | Option | الافتراضي | الوصف | | ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `format` | [link](#default-prompt-format) | Configure the format of the prompt. | -| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | +| `right_format` | `''` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | | `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Inserts blank line between shell prompts. | -| `palette` | `""` | Sets which color palette from `palettes` to use. | +| `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | ### مثال @@ -178,10 +213,10 @@ This is the list of prompt-wide configuration options. # ~/.config/starship.toml # Use custom format -format = """ +format = ''' [┌───────────────────>](bold green) [│](bold green)$directory$rust$package -[└─>](bold green) """ +[└─>](bold green) ''' # Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 @@ -189,15 +224,15 @@ scan_timeout = 10 # Disable the blank line at the start of the prompt add_newline = false -# Set "foo" as custom color palette -palette = "foo" +# Set 'foo' as custom color palette +palette = 'foo' # Define custom colors [palettes.foo] # Overwrite existing color -blue = "21" +blue = '21' # Define new color -mustard = "#af8700" +mustard = '#af8700' ``` ### Default Prompt Format @@ -205,7 +240,7 @@ mustard = "#af8700" 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" +format = '$all' # Which is equivalent to format = """ @@ -236,7 +271,9 @@ $elixir\ $elm\ $erlang\ $golang\ +$guix_shell\ $haskell\ +$haxe\ $helm\ $java\ $julia\ @@ -245,6 +282,7 @@ $lua\ $nim\ $nodejs\ $ocaml\ +$opa\ $perl\ $php\ $pulumi\ @@ -281,6 +319,7 @@ $jobs\ $battery\ $time\ $status\ +$os\ $container\ $shell\ $character""" @@ -290,7 +329,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format = "$all$directory$character" +format = '$all$directory$character' ``` ## AWS @@ -305,15 +344,17 @@ When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. +When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. + ### Options | Option | الافتراضي | الوصف | | ------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | -| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | -| `profile_aliases` | | Table of profile aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | The style 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. | +| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | +| `style` | `'bold yellow'` | The style for the module. | | `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Disables the `AWS` module. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -339,11 +380,11 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL [aws] format = 'on [$symbol($profile )(\($region\) )]($style)' -style = "bold blue" -symbol = "🅰 " +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' [aws.profile_aliases] CompanyGroupFrobozzOnCallAccess = 'Frobozz' ``` @@ -354,12 +395,12 @@ CompanyGroupFrobozzOnCallAccess = 'Frobozz' # ~/.config/starship.toml [aws] -format = "on [$symbol$region]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$region]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' ``` #### Display profile @@ -368,34 +409,48 @@ us-east-1 = "va" # ~/.config/starship.toml [aws] -format = "on [$symbol$profile]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$profile]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.profile_aliases] Enterprise_Naming_Scheme-voidstars = 'void**' ``` ## Azure -The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription, as defined in the `~/.azure/azureProfile.json` file. +The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription or the username, as defined in the `~/.azure/azureProfile.json` file. ### Options | Variable | الافتراضي | الوصف | | ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `"on [$symbol($subscription)]($style) "` | The format for the Azure module to render. | -| `symbol` | `"ﴃ "` | The symbol used in the format. | -| `style` | `"blue bold"` | The style used in the format. | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'ﴃ '` | The symbol used in the format. | +| `style` | `'blue bold'` | The style used in the format. | | `disabled` | `true` | Disables the `azure` module. | -### مثال +### Examples + +#### Display Subscription Name ```toml # ~/.config/starship.toml [azure] disabled = false -format = "on [$symbol($subscription)]($style) " +format = 'on [$symbol($subscription)]($style) ' +symbol = 'ﴃ ' +style = 'blue bold' +``` + +#### Display Username + +```toml +# ~/.config/starship.toml + +[azure] +disabled = false +format = "on [$symbol($username)]($style) " symbol = "ﴃ " style = "blue bold" ``` @@ -408,12 +463,12 @@ The `battery` module shows how charged the device's battery is and its current c | Option | الافتراضي | الوصف | | -------------------- | --------------------------------- | --------------------------------------------------- | -| `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. | +| `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. | @@ -423,9 +478,9 @@ The `battery` module shows how charged the device's battery is and its current c # ~/.config/starship.toml [battery] -full_symbol = "🔋 " -charging_symbol = "⚡️ " -discharging_symbol = "💀 " +full_symbol = '🔋 ' +charging_symbol = '⚡️ ' +discharging_symbol = '💀 ' ``` ### Battery Display @@ -435,7 +490,7 @@ The `display` configuration option is used to define when the battery indicator ```toml [[battery.display]] threshold = 10 -style = "bold red" +style = 'bold red' ``` The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. @@ -447,21 +502,21 @@ The `display` option is an array of the following table. | Option | الافتراضي | الوصف | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | | `threshold` | `10` | The upper bound for the display option. | -| `style` | `"red bold"` | The style used if the display option is in use. | +| `style` | `'red bold'` | The style used if the display option is in use. | | `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. | | `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. | #### مثال ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% threshold = 10 -style = "bold red" +style = 'bold red' -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% threshold = 30 -style = "bold yellow" -discharging_symbol = "💦" +style = 'bold yellow' +discharging_symbol = '💦' # when capacity is over 30%, the battery indicator will not be displayed ``` @@ -477,13 +532,13 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil | Option | الافتراضي | الوصف | | ------------------- | ----------------------------------------------- | ----------------------------------------------------- | -| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. | -| `version_format` | `"v${raw}"` | The version format. | -| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. | +| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. | +| `version_format` | `'v${raw}'` | The version format. | +| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | -| `style` | `"bold blue"` | The style for the module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `elixir` module. | ### Variables @@ -502,7 +557,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil # ~/.config/starship.toml [buf] -symbol = "🦬 " +symbol = '🦬 ' ``` ## Bun @@ -516,13 +571,13 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🍞 "` | A format string representing the symbol of Node.js. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["bun.lockb", "bunfig.toml"]` | Which filenames should trigger this module. | +| `detect_files` | `['bun.lockb', 'bunfig.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | The style for the module. | +| `style` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `bun` module. | ### Variables @@ -541,7 +596,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. # ~/.config/starship.toml [bun] -format = "via [🍔 $version](bold green) " +format = 'via [🍔 $version](bold green) ' ``` ## C @@ -552,14 +607,14 @@ The `c` module shows some information about your C compiler. By default the modu | Option | الافتراضي | الوصف | | ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version(-$name) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"C "` | The symbol used before displaying the compiler details | -| `detect_extensions` | `["c", "h"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ "cc", "--version" ], [ "gcc", "--version" ], [ "clang", "--version" ] ] | How to detect what the compiler is | -| `style` | `"bold 149"` | The style for the module. | +| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | +| `style` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `c` module. | ### Variables @@ -577,7 +632,7 @@ NB that `version` is not in the default format. The `commands` option accepts a list of commands to determine the compiler version and name. -Each command is represented as a list of the executable name, followed by its arguments, usually something like `["mycc", "--version"]`. Starship will try executing each command until it gets a result on STDOUT. +Each command is represented as a list of the executable name, followed by its arguments, usually something like `['mycc', '--version']`. Starship will try executing each command until it gets a result on STDOUT. If a C compiler is not supported by this module, you can request it by [raising an issue on GitHub](https://github.com/starship/starship/). @@ -587,7 +642,7 @@ If a C compiler is not supported by this module, you can request it by [raising # ~/.config/starship.toml [c] -format = "via [$name $version]($style)" +format = 'via [$name $version]($style)' ``` ## Character @@ -611,13 +666,13 @@ By default it only changes color. If you also want to change its shape take a lo | Option | الافتراضي | الوصف | | --------------------------- | -------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"$symbol "` | The format string used before the text input. | -| `success_symbol` | `"[❯](bold green)"` | The format string used before the text input if the previous command succeeded. | -| `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. | -| `vimcmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | -| `vimcmd_replace_one_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim `replace_one` mode. | -| `vimcmd_replace_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim replace mode. | -| `vimcmd_visual_symbol` | `"[❮](bold yellow)"` | The format string used before the text input if the shell is in vim replace mode. | +| `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. | +| `vimcmd_symbol` | `'[❮](bold green)'` | The format string used before the text input if the shell is in vim normal mode. | +| `vimcmd_replace_one_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim `replace_one` mode. | +| `vimcmd_replace_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim replace mode. | +| `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | | `disabled` | `false` | Disables the `character` module. | ### Variables @@ -634,8 +689,8 @@ By default it only changes color. If you also want to change its shape take a lo # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[✗](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[✗](bold red) ' ``` #### Without custom error shape @@ -644,8 +699,8 @@ error_symbol = "[✗](bold red) " # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[➜](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[➜](bold red) ' ``` #### With custom vim shape @@ -654,7 +709,7 @@ error_symbol = "[➜](bold red) " # ~/.config/starship.toml [character] -vicmd_symbol = "[V](bold green) " +vicmd_symbol = '[V](bold green) ' ``` ## CMake @@ -668,13 +723,13 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | Option | الافتراضي | الوصف | | ------------------- | -------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"△ "` | The symbol used before the version of cmake. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'△ '` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this module | -| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | +| `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | -| `style` | `"bold blue"` | The style for the module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -698,11 +753,11 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold blue"` | The style for the module. | -| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Which extensions should trigger this module. | +| `symbol` | `'⚙️ '` | The symbol used before displaying the version of COBOL. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold blue'` | The style for the module. | +| `detect_extensions` | `['cbl', 'cob', 'CBL', 'COB']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `cobol` module. | @@ -735,8 +790,8 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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. | +| `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). | @@ -758,7 +813,7 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec [cmd_duration] min_time = 500 -format = "underwent [$duration](bold yellow)" +format = 'underwent [$duration](bold yellow)' ``` ## Conda @@ -776,9 +831,9 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | 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"` | The style for the module. | -| `format` | `"via [$symbol$environment]($style) "` | The format for the 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. | @@ -798,7 +853,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c # ~/.config/starship.toml [conda] -format = "[$symbol$environment](dimmed green) " +format = '[$symbol$environment](dimmed green) ' ``` ## Container @@ -809,8 +864,8 @@ The `container` module displays a symbol and container name, if inside a contain | Option | الافتراضي | الوصف | | ---------- | ---------------------------------- | ----------------------------------------- | -| `symbol` | `"⬢"` | The symbol shown, when inside a container | -| `style` | `"bold red dimmed"` | The style for the module. | +| `symbol` | `'⬢'` | The symbol shown, when inside a container | +| `style` | `'bold red dimmed'` | The style for the module. | | `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `container` module. | @@ -844,12 +899,12 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold red"` | The style for the module. | -| `detect_extensions` | `["cr"]` | Which extensions should trigger this module. | -| `detect_files` | `["shard.yml"]` | Which filenames should trigger this module. | +| `symbol` | `'🔮 '` | The symbol used before displaying the version of crystal. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold red'` | The style for the module. | +| `detect_extensions` | `['cr']` | Which extensions should trigger this module. | +| `detect_files` | `['shard.yml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `crystal` module. | @@ -869,7 +924,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// # ~/.config/starship.toml [crystal] -format = "via [✨ $version](bold blue) " +format = 'via [✨ $version](bold blue) ' ``` ## Daml @@ -882,12 +937,12 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"Λ "` | A format string representing the symbol of Daml | -| `style` | `"bold cyan"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'Λ '` | A format string representing the symbol of Daml | +| `style` | `'bold cyan'` | The style for the module. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['daml.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `daml` module. | @@ -907,7 +962,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d # ~/.config/starship.toml [daml] -format = "via [D $version](bold bright-green) " +format = 'via [D $version](bold bright-green) ' ``` ## Dart @@ -922,13 +977,13 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `detect_extensions` | `["dart"]` | Which extensions should trigger this module. | -| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".dart_tool"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🎯 '` | A format string representing the symbol of Dart | +| `detect_extensions` | `['dart']` | Which extensions should trigger this module. | +| `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | Which filenames should trigger this module. | +| `detect_folders` | `['.dart_tool']` | Which folders should trigger this module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -947,7 +1002,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d # ~/.config/starship.toml [dart] -format = "via [🔰 $version](bold red) " +format = 'via [🔰 $version](bold red) ' ``` ## Deno @@ -960,13 +1015,13 @@ The `deno` module shows you your currently installed version of [Deno](https://d | Option | الافتراضي | الوصف | | ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦕 "` | A format string representing the symbol of Deno | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦕 '` | A format string representing the symbol of Deno | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["deno.json", "deno.jsonc", "mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. | +| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"green bold"` | The style for the module. | +| `style` | `'green bold'` | The style for the module. | | `disabled` | `false` | Disables the `deno` module. | ### Variables @@ -983,7 +1038,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d # ~/.config/starship.toml [deno] -format = "via [🦕 $version](green bold) " +format = 'via [🦕 $version](green bold) ' ``` ## Directory @@ -996,20 +1051,21 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Options -| 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"` | 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: "…/" | -| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | -| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) | +| 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'` | 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: '…/' | +| `before_repo_root_style` | | The style for the path segment above the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `'[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) '` | The format of a git repo when `before_repo_root_style` and `repo_root_style` is defined. | +| `home_symbol` | `'~'` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
This module has a few advanced configuration options that control how the directory is displayed. @@ -1024,8 +1080,8 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ```toml [directory.substitutions] -"/Volumes/network/path" = "/net" -"src/com/long/java/path" = "mypath" +'/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`. @@ -1036,8 +1092,8 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | Variable | مثال | الوصف | | --------- | --------------------- | ----------------------------------- | -| path | `"D:/Projects"` | The current directory path | -| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | +| 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 @@ -1048,11 +1104,11 @@ Let us consider the path `/path/to/home/git_repo/src/lib` | Variable | مثال | الوصف | | ------------------ | --------------------- | --------------------------------------- | -| before_root_path | `"/path/to/home/"` | The path before git root directory path | -| repo_root | `"git_repo"` | The git root directory name | -| path | `"/src/lib"` | The remaining path | -| style | `"black bold dimmed"` | Mirrors the value of option `style` | -| repo_root_style | `"underline white"` | Style for git root directory name | +| before_root_path | `'/path/to/home/'` | The path before git root directory path | +| repo_root | `'git_repo'` | The git root directory name | +| path | `'/src/lib'` | The remaining path | +| style | `'black bold dimmed'` | Mirrors the value of option `style` | +| repo_root_style | `'underline white'` | Style for git root directory name |
@@ -1063,7 +1119,7 @@ Let us consider the path `/path/to/home/git_repo/src/lib` [directory] truncation_length = 8 -truncation_symbol = "…/" +truncation_symbol = '…/' ``` ## Docker Context @@ -1074,13 +1130,13 @@ The `docker_context` module shows the currently active [Docker context](https:// | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `format` | `'via [$symbol$context]($style) '` | The format for the module. | +| `symbol` | `'🐳 '` | The symbol used before displaying the Docker context. | | `only_with_files` | `true` | Only show when there's a match | | `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | +| `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | Which filenames should trigger this module (needs `only_with_files` to be true). | | `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | -| `style` | `"blue bold"` | The style for the module. | +| `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -1099,7 +1155,7 @@ The `docker_context` module shows the currently active [Docker context](https:// # ~/.config/starship.toml [docker_context] -format = "via [🐋 $context](blue bold)" +format = 'via [🐋 $context](blue bold)' ``` ## Dotnet @@ -1127,14 +1183,14 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$var_cluster" +'dev.local.cluster.k8s' = 'dev' +'.*/openshift-cluster/.*' = 'openshift' +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' [kubernetes.user_aliases] -"dev.local.cluster.k8s" = "dev" -"root/.*" = "root" +'dev.local.cluster.k8s' = 'dev' +'root/.*' = 'root' ``` Only show the module in directories that contain a `k8s` file. @@ -2121,14 +2249,14 @@ Long and automatically generated cluster names can be identified and shortened u ```toml [kubernetes.context_aliases] # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -".*/openshift-cluster/.*" = "openshift" +'.*/openshift-cluster/.*' = 'openshift' # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$var_cluster" +'.*/(?P[\\w-]+)/.*' = '$var_cluster' # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' ``` ## Line Break @@ -2159,8 +2287,8 @@ The `localip` module shows the IPv4 address of the primary network interface. | Option | الافتراضي | الوصف | | ---------- | ------------------------- | ------------------------------------------------------ | | `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | The style for the module. | +| `format` | `'[$localipv4]($style) '` | The format for the module. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `true` | Disables the `localip` module. | ### Variables @@ -2179,7 +2307,7 @@ The `localip` module shows the IPv4 address of the primary network interface. [localip] ssh_only = false -format = "@[$localipv4](bold red) " +format = '@[$localipv4](bold red) ' disabled = false ``` @@ -2195,14 +2323,14 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | -------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | -| `detect_extensions` | `["lua"]` | Which extensions should trigger this module. | -| `detect_files` | `[".lua-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["lua"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | -| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🌙 '` | A format string representing the symbol of Lua. | +| `detect_extensions` | `['lua']` | Which extensions should trigger this module. | +| `detect_files` | `['.lua-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['lua']` | Which folders should trigger this module. | +| `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 @@ -2221,7 +2349,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o # ~/.config/starship.toml [lua] -format = "via [🌕 $version](bold blue) " +format = 'via [🌕 $version](bold blue) ' ``` ## Memory Usage @@ -2241,9 +2369,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | الافتراضي | الوصف | | ----------- | ----------------------------------------------- | -------------------------------------------------------- | | `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. | +| `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 @@ -2267,8 +2395,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y [memory_usage] disabled = false threshold = -1 -symbol = " " -style = "bold dimmed green" +symbol = ' ' +style = 'bold dimmed green' ``` ## Meson @@ -2282,10 +2410,10 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. | Option | الافتراضي | الوصف | | ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- | | `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | -| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. | -| `format` | `"via [$symbol$project]($style) "` | The format for the module. | -| `symbol` | `"⬢ "` | The symbol used before displaying the project name. | -| `style` | `"blue bold"` | The style for the module. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | +| `format` | `'via [$symbol$project]($style) '` | The format for the module. | +| `symbol` | `'⬢ '` | The symbol used before displaying the project name. | +| `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `meson` module. | ### Variables @@ -2305,9 +2433,9 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. [meson] disabled = false -truncation_symbol = "--" -symbol = " " -style = "bold dimmed green" +truncation_symbol = '--' +symbol = ' ' +style = 'bold dimmed green' ``` ## Mercurial Branch @@ -2318,11 +2446,11 @@ The `hg_branch` module shows the active branch of the repo in your current direc | Option | الافتراضي | الوصف | | ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | -| `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. | +| `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 `N` graphemes | -| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a branch name was truncated. | | `disabled` | `true` | Disables the `hg_branch` module. | ### Variables @@ -2341,9 +2469,9 @@ The `hg_branch` module shows the active branch of the repo in your current direc # ~/.config/starship.toml [hg_branch] -format = "on [🌱 $branch](bold purple)" +format = 'on [🌱 $branch](bold purple)' truncation_length = 4 -truncation_symbol = "" +truncation_symbol = '' ``` ## Nim @@ -2359,13 +2487,13 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | -| `detect_extensions` | `["nim", "nims", "nimble"]` | Which extensions should trigger this module. | -| `detect_files` | `["nim.cfg"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'👑 '` | The symbol used before displaying the version of Nim. | +| `detect_extensions` | `['nim', 'nims', 'nimble']` | Which extensions should trigger this module. | +| `detect_files` | `['nim.cfg']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | The style for the module. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `nim` module. | ### Variables @@ -2384,8 +2512,8 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang # ~/.config/starship.toml [nim] -style = "yellow" -symbol = "🎣 " +style = 'yellow' +symbol = '🎣 ' ``` ## Nix-shell @@ -2397,10 +2525,10 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | Option | الافتراضي | الوصف | | ------------ | ---------------------------------------------- | ----------------------------------------------------- | | `format` | `'via [$symbol$state( \($name\))]($style) '` | The format for the module. | -| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | -| `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. | +| `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 @@ -2421,8 +2549,8 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ [nix_shell] disabled = true -impure_msg = "[impure shell](bold red)" -pure_msg = "[pure shell](bold green)" +impure_msg = '[impure shell](bold red)' +pure_msg = '[pure shell](bold green)' format = 'via [☃️ $state( \($name\))](bold blue) ' ``` @@ -2441,13 +2569,13 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string representing the symbol of Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts", "mts", "cts"]` | Which extensions should trigger this module. | -| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | -| `style` | `"bold green"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string representing the symbol of Node.js. | +| `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Which extensions should trigger this module. | +| `detect_files` | `['package.json', '.node-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['node_modules']` | Which folders should trigger this module. | +| `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 package.json does not match the Node.js version. | @@ -2467,7 +2595,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n # ~/.config/starship.toml [nodejs] -format = "via [🤖 $version](bold green) " +format = 'via [🤖 $version](bold green) ' ``` ## OCaml @@ -2485,15 +2613,15 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | Option | الافتراضي | الوصف | | ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | -| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | -| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | -| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Which extensions should trigger this module. | -| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Which filenames should trigger this module. | -| `detect_folders` | `["_opam", "esy.lock"]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | The style for the module. | +| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐫 '` | The symbol used before displaying the version of OCaml. | +| `global_switch_indicator` | `''` | The format string used to represent global OPAM switch. | +| `local_switch_indicator` | `'*'` | The format string used to represent local OPAM switch. | +| `detect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | Which extensions should trigger this module. | +| `detect_files` | `['dune', 'dune-project', 'jbuild', 'jbuild-ignore', '.merlin']` | Which filenames should trigger this module. | +| `detect_folders` | `['_opam', 'esy.lock']` | Which folders should trigger this module. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `ocaml` module. | ### Variables @@ -2514,7 +2642,43 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam # ~/.config/starship.toml [ocaml] -format = "via [🐪 $version]($style) " +format = 'via [🐪 $version]($style) ' +``` + +## Open Policy Agent + +The `opa` module shows the currently installed version of the OPA tool. By default the module will be shown if the current directory contains a `.rego` file. + +### Options + +| Option | الافتراضي | الوصف | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | +| `detect_extensions` | `['rego']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'bold blue'` | The style for the module. | +| `disabled` | `false` | Disables the `opa` module. | + +### Variables + +| Variable | مثال | الوصف | +| --------- | --------- | ------------------------------------ | +| version | `v0.44.0` | The version of `opa` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### مثال + +```toml +# ~/.config/starship.toml + +[opa] +format = 'via [⛑️ $version](bold red) ' ``` ## OpenStack @@ -2526,8 +2690,8 @@ The `openstack` module shows the current OpenStack cloud and project. The module | Option | الافتراضي | الوصف | | ---------- | ----------------------------------------------- | -------------------------------------------------------------- | | `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | -| `style` | `"bold yellow"` | The style 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 @@ -2548,8 +2712,105 @@ The `openstack` module shows the current OpenStack cloud and project. The module [openstack] format = 'on [$symbol$cloud(\($project\))]($style) ' -style = "bold yellow" -symbol = "☁️ " +style = 'bold yellow' +symbol = '☁️ ' +``` + +## OS + +The `os` module shows the current operating system. OS information is detected via the [os_info](https://lib.rs/crates/os_info) crate. + +::: تحذير + +The [os_info](https://lib.rs/crates/os_info) crate used by this module is known to be inaccurate on some systems. + +::: + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | الافتراضي | الوصف | +| ---------- | --------------------- | ------------------------------------------------------ | +| `format` | `"[$symbol]($style)"` | The format for the module. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `true` | Disables the `os` module. | +| `symbols` | | A table that maps each operating system to its symbol. | + +`symbols` allows you to define arbitrary symbols to display for each operating system type. Operating system types not defined by your configuration use the default symbols table below. All operating systems currently supported by the module are listed below. If you would like an operating system to be added, feel free to open a [feature request](https://github.com/starship/starship/issues/new/choose). + +```toml +# This is the default symbols table. +[os.symbols] +Alpine = "🏔️ " +Amazon = "🙂 " +Android = "🤖 " +Arch = "🎗️ " +CentOS = "💠 " +Debian = "🌀 " +DragonFly = "🐉 " +Emscripten = "🔗 " +EndeavourOS = "🚀 " +Fedora = "🎩 " +FreeBSD = "😈 " +Garuda = "🦅 " +Gentoo = "🗜️ " +HardenedBSD = "🛡️ " +Illumos = "🐦 " +Linux = "🐧 " +Macos = "🍎 " +Manjaro = "🥭 " +Mariner = "🌊 " +MidnightBSD = "🌘 " +Mint = "🌿 " +NetBSD = "🚩 " +NixOS = "❄️ " +OpenBSD = "🐡 " +openSUSE = "🦎 " +OracleLinux = "🦴 " +Pop = "🍭 " +Raspbian = "🍓 " +Redhat = "🎩 " +RedHatEnterprise = "🎩 " +Redox = "🧪 " +Solus = "⛵ " +SUSE = "🦎 " +Ubuntu = "🎯 " +Unknown = "❓ " +Windows = "🪟 " +``` + +### Variables + +| Variable | مثال | الوصف | +| --------- | ------------ | ------------------------------------------------------------------ | +| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | +| name | `Arch Linux` | The current operating system name | +| type | `Arch` | The current operating system type | +| codename | | The current operating system codename, if applicable | +| edition | | The current operating system edition, if applicable | +| version | | The current operating system version, if applicable | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### مثال + +```toml +# ~/.config/starship.toml + +[os] +format = "on [($name )]($style)" +style = "bold blue" +disabled = false + +[os.symbols] +Windows = " " +Arch = "Arch is the best! " ``` ## Package Version @@ -2580,10 +2841,10 @@ The `package` module is shown when the current directory is the repository for a | Option | الافتراضي | الوصف | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"is [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold 208"` | The style for the module. | +| `format` | `'is [$symbol$version]($style) '` | The format for the module. | +| `symbol` | `'📦 '` | The symbol used before displaying the version the package. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `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. | @@ -2603,7 +2864,7 @@ The `package` module is shown when the current directory is the repository for a # ~/.config/starship.toml [package] -format = "via [🎁 $version](208 bold) " +format = 'via [🎁 $version](208 bold) ' ``` ## Perl @@ -2620,13 +2881,13 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe | Option | الافتراضي | الوصف | | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | -| `detect_extensions` | `["pl", "pm", "pod"]` | Which extensions should trigger this module. | -| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | +| `detect_extensions` | `['pl', 'pm', 'pod']` | Which extensions should trigger this module. | +| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | The style for the module. | +| `style` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `perl` module. | ### Variables @@ -2643,7 +2904,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe # ~/.config/starship.toml [perl] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## PHP @@ -2658,13 +2919,13 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | -| `detect_extensions` | `["php"]` | Which extensions should trigger this module. | -| `detect_files` | `["composer.json", ".php-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐘 '` | The symbol used before displaying the version of PHP. | +| `detect_extensions` | `['php']` | Which extensions should trigger this module. | +| `detect_files` | `['composer.json', '.php-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"147 bold"` | The style for the module. | +| `style` | `'147 bold'` | The style for the module. | | `disabled` | `false` | Disables the `php` module. | ### Variables @@ -2683,7 +2944,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. # ~/.config/starship.toml [php] -format = "via [🔹 $version](147 bold) " +format = 'via [🔹 $version](147 bold) ' ``` ## Pulumi @@ -2705,10 +2966,10 @@ By default the module will be shown if any of the following conditions are met: | Option | الافتراضي | الوصف | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string shown before the Pulumi stack. | -| `style` | `"bold 5"` | The style for the module. | +| `format` | `'via [$symbol($username@)$stack]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string shown before the Pulumi stack. | +| `style` | `'bold 5'` | The style for the module. | | `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | | `disabled` | `false` | Disables the `pulumi` module. | @@ -2732,7 +2993,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [pulumi] -format = "[🛥 ($version )$stack]($style) " +format = '[🛥 ($version )$stack]($style) ' ``` #### Without Pulumi version @@ -2740,8 +3001,8 @@ format = "[🛥 ($version )$stack]($style) " ```toml # ~/.config/starship.toml [pulumi] -symbol = "🛥 " -format = "[$symbol$stack]($style) " +symbol = '🛥 ' +format = '[$symbol$stack]($style) ' ``` ## PureScript @@ -2755,13 +3016,13 @@ The `purescript` module shows the currently installed version of [PureScript](ht | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | -| `detect_extensions` | `["purs"]` | Which extensions should trigger this module. | -| `detect_files` | `["spago.dhall"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'<=> '` | The symbol used before displaying the version of PureScript. | +| `detect_extensions` | `['purs']` | Which extensions should trigger this module. | +| `detect_files` | `['spago.dhall']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold white"` | The style for the module. | +| `style` | `'bold white'` | The style for the module. | | `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -2780,7 +3041,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht # ~/.config/starship.toml [purescript] -format = "via [$symbol$version](bold white)" +format = 'via [$symbol$version](bold white)' ``` ## Python @@ -2806,14 +3067,14 @@ By default the module will be shown if any of the following conditions are met: | Option | الافتراضي | الوصف | | -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | | `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | The style for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐍 '` | A format string representing the symbol of 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 | -| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `detect_extensions` | `["py"]` | Which extensions should trigger this module | -| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module | +| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | +| `detect_extensions` | `['py']` | Which extensions should trigger this module | +| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | | `disabled` | `false` | Disables the `python` module. | @@ -2821,7 +3082,7 @@ By default the module will be shown if any of the following conditions are met: 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. +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. ::: @@ -2829,11 +3090,11 @@ The default values and order for `python_binary` was chosen to first identify th | Variable | مثال | الوصف | | ------------ | --------------- | ------------------------------------------ | -| 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 | +| 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 | ### مثال @@ -2841,7 +3102,7 @@ The default values and order for `python_binary` was chosen to first identify th # ~/.config/starship.toml [python] -symbol = "👾 " +symbol = '👾 ' pyenv_version_name = true ``` @@ -2850,7 +3111,7 @@ pyenv_version_name = true [python] # Only use the `python3` binary to get the version. -python_binary = "python3" +python_binary = 'python3' ``` ```toml @@ -2869,7 +3130,7 @@ detect_extensions = [] # # Note this will only work when the venv is inside the project and it will only # work in the directory that contains the venv dir but maybe this is ok? -python_binary = ["./venv/bin/python", "python", "python3", "python2"] +python_binary = ['./venv/bin/python', 'python', 'python3', 'python2'] ``` ## R @@ -2888,13 +3149,13 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"📐"` | A format string representing the symbol of R. | -| `style` | `"blue bold"` | The style for the module. | -| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module | -| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module | -| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'📐'` | A format string representing the symbol of R. | +| `style` | `'blue bold'` | The style for the module. | +| `detect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | Which extensions should trigger this module | +| `detect_files` | `['.Rprofile']` | Which filenames should trigger this module | +| `detect_folders` | `['.Rproj.user']` | Which folders should trigger this module | | `disabled` | `false` | Disables the `r` module. | ### Variables @@ -2903,7 +3164,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | -------- | ------------- | ------------------------------------ | | version | `v4.0.5` | The version of `R` | | symbol | | Mirrors the value of option `symbol` | -| style | `"blue bold"` | Mirrors the value of option `style` | +| style | `'blue bold'` | Mirrors the value of option `style` | ### مثال @@ -2911,7 +3172,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr # ~/.config/starship.toml [rlang] -format = "with [📐 $version](blue bold) " +format = 'with [📐 $version](blue bold) ' ``` ## Raku @@ -2925,13 +3186,13 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version-$vm_version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦋 "` | The symbol used before displaying the version of Raku | -| `detect_extensions` | `["p6", "pm6", "pod6", "raku", "rakumod"]` | Which extensions should trigger this module. | -| `detect_files` | `["META6.json"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version-$vm_version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦋 '` | The symbol used before displaying the version of Raku | +| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Which extensions should trigger this module. | +| `detect_files` | `['META6.json']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | The style for the module. | +| `style` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `raku` module. | ### Variables @@ -2949,7 +3210,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra # ~/.config/starship.toml [raku] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## Red @@ -2962,13 +3223,13 @@ By default the `red` module shows the currently installed version of [Red](https | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | -| `detect_extensions` | `["red"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🔺 '` | A format string representing the symbol of Red. | +| `detect_extensions` | `['red']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"red bold"` | The style for the module. | +| `style` | `'red bold'` | The style for the module. | | `disabled` | `false` | Disables the `red` module. | ### Variables @@ -2987,7 +3248,7 @@ By default the `red` module shows the currently installed version of [Red](https # ~/.config/starship.toml [red] -symbol = "🔴 " +symbol = '🔴 ' ``` ## Ruby @@ -3005,14 +3266,14 @@ Starship gets the current Ruby version by running `ruby -v`. | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. | -| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💎 '` | A format string representing the symbol of Ruby. | +| `detect_extensions` | `['rb']` | Which extensions should trigger this module. | +| `detect_files` | `['Gemfile', '.ruby-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | -| `style` | `"bold red"` | The style for the module. | +| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Which environment variables should trigger this module. | +| `style` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `ruby` module. | ### Variables @@ -3031,7 +3292,7 @@ Starship gets the current Ruby version by running `ruby -v`. # ~/.config/starship.toml [ruby] -symbol = "🔺 " +symbol = '🔺 ' ``` ## Rust @@ -3045,13 +3306,13 @@ By default the `rust` module shows the currently installed version of [Rust](htt | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. | -| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦀 '` | A format string representing the symbol of Rust | +| `detect_extensions` | `['rs']` | Which extensions should trigger this module. | +| `detect_files` | `['Cargo.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | The style for the module. | +| `style` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -3072,7 +3333,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt # ~/.config/starship.toml [rust] -format = "via [⚙️ $version](red bold)" +format = 'via [⚙️ $version](red bold)' ``` ## Scala @@ -3087,13 +3348,13 @@ The `scala` module shows the currently installed version of [Scala](https://www. | Option | الافتراضي | الوصف | | ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | -| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | -| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | -| `style` | `"red dimmed"` | The style for the module. | +| `format` | `'via [${symbol}(${version} )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. | +| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. | +| `detect_folders` | `['.metals']` | Which folders should trigger this modules. | +| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. | +| `style` | `'red dimmed'` | The style for the module. | | `disabled` | `false` | Disables the `scala` module. | ### Variables @@ -3112,7 +3373,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. # ~/.config/starship.toml [scala] -symbol = "🌟 " +symbol = '🌟 ' ``` ## Shell @@ -3129,19 +3390,19 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | الافتراضي | الوصف | | ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `"bsh"` | A format string used to represent bash. | -| `fish_indicator` | `"fsh"` | A format string used to represent fish. | -| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. | -| `powershell_indicator` | `"psh"` | A format string used to represent powershell. | -| `ion_indicator` | `"ion"` | A format string used to represent ion. | -| `elvish_indicator` | `"esh"` | A format string used to represent elvish. | -| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. | -| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. | -| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. | -| `nu_indicator` | `"nu"` | A format string used to represent nu. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `"[$indicator]($style) "` | The format for the module. | -| `style` | `"white bold"` | The style for the module. | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `style` | `'white bold'` | The style for the module. | | `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3159,26 +3420,26 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [shell] -fish_indicator = "" -powershell_indicator = "_" -unknown_indicator = "mystery shell" -style = "cyan bold" +fish_indicator = '' +powershell_indicator = '_' +unknown_indicator = 'mystery shell' +style = 'cyan bold' disabled = false ``` ## SHLVL -The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ('shell level') environment variable, if it is set to a number and meets or exceeds the specified threshold. ### Options | Option | الافتراضي | الوصف | | ----------- | ---------------------------- | ------------------------------------------------------------- | | `threshold` | `2` | Display threshold. | -| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. | -| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. | +| `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. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `true` | Disables the `shlvl` module. | ### Variables @@ -3198,7 +3459,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int [shlvl] disabled = false -format = "$shlvl level(s) down" +format = '$shlvl level(s) down' threshold = 3 ``` @@ -3211,8 +3472,8 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | Option | الافتراضي | الوصف | | ---------- | -------------------------------- | ------------------------------------------------ | | `format` | `'[$symbol\[$env\]]($style) '` | The format for the module. | -| `symbol` | `""` | A format string displayed before the image name. | -| `style` | `"bold dimmed blue"` | The style 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 @@ -3243,9 +3504,9 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | Option | الافتراضي | الوصف | | ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | The number of directories the environment path should be truncated to. `0` means no truncation. Also see the [`directory`](#directory) module. | -| `symbol` | `"🅢 "` | The symbol used before the environment name. | -| `style` | `"bold blue"` | The style for the module. | -| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `symbol` | `'🅢 '` | The symbol used before the environment name. | +| `style` | `'bold blue'` | The style for the module. | +| `format` | `'via [$symbol$environment]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `spack` module. | ### Variables @@ -3264,7 +3525,7 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat # ~/.config/starship.toml [spack] -format = "[$symbol$environment](dimmed blue) " +format = '[$symbol$environment](dimmed blue) ' ``` ## Status @@ -3281,14 +3542,14 @@ 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` | `"✖"` | The symbol displayed on program error | -| `success_symbol` | `""` | The symbol displayed on program success | -| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | -| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | -| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | -| `style` | `"bold red"` | The style for the module. | +| `format` | `'[$symbol$status]($style) '` | The format of the module | +| `symbol` | `'❌'` | The symbol displayed on program error | +| `success_symbol` | `''` | The symbol displayed on program success | +| `not_executable_symbol` | `'🚫'` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `'🔍'` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `'🧱'` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `'⚡'` | The symbol displayed on any signal | +| `style` | `'bold red'` | The style for the module. | | `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code | | `pipestatus` | `false` | Enable pipestatus reporting | @@ -3320,9 +3581,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [status] -style = "bg:blue" -symbol = "🔴 " -success_symbol = "🟢 SUCCESS" +style = 'bg:blue' +symbol = '🔴 ' +success_symbol = '🟢 SUCCESS' format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false @@ -3342,9 +3603,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | الافتراضي | الوصف | | --------------- | ------------------------ | ------------------------------------------------------- | -| `format` | `"[as $symbol]($style)"` | The format of the module | -| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached | -| `style` | `"bold blue"` | The style for the module. | +| `format` | `'[as $symbol]($style)'` | The format of the module | +| `symbol` | `'🧙 '` | The symbol displayed when credentials are cached | +| `style` | `'bold blue'` | The style for the module. | | `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | | `disabled` | `true` | Disables the `sudo` module. | @@ -3363,8 +3624,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [sudo] -style = "bold green" -symbol = "👩‍💻 " +style = 'bold green' +symbol = '👩‍💻 ' disabled = false ``` @@ -3388,13 +3649,13 @@ By default the `swift` module shows the currently installed version of [Swift](h | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `detect_extensions` | `["swift"]` | Which extensions should trigger this module. | -| `detect_files` | `["Package.swift"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐦 '` | A format string representing the symbol of Swift | +| `detect_extensions` | `['swift']` | Which extensions should trigger this module. | +| `detect_files` | `['Package.swift']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 202"` | The style for the module. | +| `style` | `'bold 202'` | The style for the module. | | `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -3413,7 +3674,7 @@ By default the `swift` module shows the currently installed version of [Swift](h # ~/.config/starship.toml [swift] -format = "via [🏎 $version](red bold)" +format = 'via [🏎 $version](red bold)' ``` ## Terraform @@ -3435,13 +3696,13 @@ By default the module will be shown if any of the following conditions are met: | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol$workspace]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💠'` | A format string shown before the terraform workspace. | +| `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | -| `style` | `"bold 105"` | The style for the module. | +| `detect_folders` | `['.terraform']` | Which folders should trigger this module. | +| `style` | `'bold 105'` | The style for the module. | | `disabled` | `false` | Disables the `terraform` module. | ### Variables @@ -3463,7 +3724,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [terraform] -format = "[🏎💨 $version$workspace]($style) " +format = '[🏎💨 $version$workspace]($style) ' ``` #### Without Terraform version @@ -3472,7 +3733,7 @@ format = "[🏎💨 $version$workspace]($style) " # ~/.config/starship.toml [terraform] -format = "[🏎💨 $workspace]($style) " +format = '[🏎💨 $workspace]($style) ' ``` ## Time @@ -3489,15 +3750,15 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | الافتراضي | الوصف | | ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | The format string for the module. | +| `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. | +| `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 | +| `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. +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 @@ -3516,9 +3777,9 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de [time] disabled = false format = '🕙[\[ $time \]]($style) ' -time_format = "%T" -utc_time_offset = "-5" -time_range = "10:00:00-14:00:00" +time_format = '%T' +utc_time_offset = '-5' +time_range = '10:00:00-14:00:00' ``` ## Username @@ -3540,9 +3801,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Option | الافتراضي | الوصف | | ------------- | ----------------------- | ------------------------------------------- | -| `style_root` | `"bold red"` | The style used when the user is root/admin. | -| `style_user` | `"bold yellow"` | The style used for non-root users. | -| `format` | `"[$user]($style) in "` | The format for the module. | +| `style_root` | `'bold red'` | The style used when the user is root/admin. | +| `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. | @@ -3550,8 +3811,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Variable | مثال | الوصف | | -------- | ------------ | ------------------------------------------------------------------------------------------- | -| `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. | +| `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. | ### مثال @@ -3559,9 +3820,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` # ~/.config/starship.toml [username] -style_user = "white bold" -style_root = "black bold" -format = "user: [$user]($style) " +style_user = 'white bold' +style_root = 'black bold' +format = 'user: [$user]($style) ' disabled = false show_always = true ``` @@ -3576,13 +3837,13 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'⍱ '` | A format string representing the symbol of Vagrant. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["Vagrantfile"]` | Which filenames should trigger this module. | +| `detect_files` | `['Vagrantfile']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"cyan bold"` | The style for the module. | +| `style` | `'cyan bold'` | The style for the module. | | `disabled` | `false` | Disables the `vagrant` module. | ### Variables @@ -3601,7 +3862,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// # ~/.config/starship.toml [vagrant] -format = "via [⍱ $version](bold white) " +format = 'via [⍱ $version](bold white) ' ``` ## V @@ -3615,13 +3876,13 @@ The `vlang` module shows you your currently installed version of [V](https://vla | Option | الافتراضي | الوصف | | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"V "` | A format string representing the symbol of V | -| `detect_extensions` | `["v"]` | Which extensions should trigger this module. | -| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'V '` | A format string representing the symbol of V | +| `detect_extensions` | `['v']` | Which extensions should trigger this module. | +| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"blue bold"` | The style for the module. | +| `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `vlang` module. | ### Variables @@ -3637,7 +3898,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla ```toml # ~/.config/starship.toml [vlang] -format = "via [V $version](blue bold) " +format = 'via [V $version](blue bold) ' ``` ## VCSH @@ -3648,9 +3909,9 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | Option | الافتراضي | الوصف | | ---------- | -------------------------------- | ------------------------------------------------------ | -| `symbol` | | The symbol used before displaying the repository name. | -| `style` | `"bold yellow"` | The style for the module. | -| `format` | `"vcsh [$symbol$repo]($style) "` | The format for the module. | +| `symbol` | `''` | The symbol used before displaying the repository name. | +| `style` | `'bold yellow'` | The style for the module. | +| `format` | `'vcsh [$symbol$repo]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `vcsh` module. | ### Variables @@ -3669,7 +3930,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v # ~/.config/starship.toml [vcsh] -format = "[🆅 $repo](bold blue) " +format = '[🆅 $repo](bold blue) ' ``` ## Zig @@ -3682,12 +3943,12 @@ By default the the `zig` module shows the currently installed version of [Zig](h | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `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. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'↯ '` | The symbol used before displaying the version of Zig. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `zig` module. | -| `detect_extensions` | `["zig"]` | Which extensions should trigger this module. | +| `detect_extensions` | `['zig']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -3707,7 +3968,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h # ~/.config/starship.toml [zig] -symbol = "⚡️ " +symbol = '⚡️ ' ``` ## Custom commands @@ -3752,16 +4013,16 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | Option | الافتراضي | الوصف | | ------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `command` | `''` | The command whose output should be printed. The command will be passed on stdin to the shell. | | `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `الوصف` | `""` | The description of the module that is shown when running `starship explain`. | +| `الوصف` | `''` | The description of the module that is shown when running `starship explain`. | | `detect_files` | `[]` | The files that will be searched in the working directory for a match. | | `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. | | `detect_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. | +| `symbol` | `''` | The symbol used before displaying the command output. | +| `style` | `'bold green'` | The style for the module. | +| `format` | `'[$symbol($output )]($style)'` | The format for the module. | | `disabled` | `false` | Disables this `custom` module. | | `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | | `use_stdin` | | An optional boolean value that overrides whether commands should be forwarded to the shell via the standard input or as an argument. If unset standard input is used by default, unless the shell does not support it (cmd, nushell). Setting this disables shell-specific argument handling. | @@ -3784,14 +4045,14 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt - 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. +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 -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. ```toml -shell = ["pwsh", "-Command", "-"] +shell = ['pwsh', '-Command', '-'] ``` ::: warning Make sure your custom shell configuration exits gracefully @@ -3812,19 +4073,19 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -detect_files = ["foo"] # can specify filters but wildcards are not supported -when = """ test "$HOME" = "$PWD" """ -format = " transcending [$output]($style)" +command = 'echo foo' # shows output of command +detect_files = ['foo'] # can specify filters but wildcards are not supported +when = ''' test "$HOME" = "$PWD" ''' +format = ' transcending [$output]($style)' [custom.time] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command', '-'] [custom.time-as-arg] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command'] use_stdin = false ``` diff --git a/docs/ar-SA/guide/README.md b/docs/ar-SA/guide/README.md index fbc52b6b..760ffa28 100644 --- a/docs/ar-SA/guide/README.md +++ b/docs/ar-SA/guide/README.md @@ -219,7 +219,6 @@ curl -sS https://starship.rs/install.sh | sh | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | | Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | | CentOS +7 | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | -| Fedora +31 | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | @@ -417,6 +416,14 @@ If you're looking to further customize Starship: - **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons. +## ❤️ Sponsors + +Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website. + +**Supporter Tier** + +- [Dimension](https://dimension.dev/) +


Starship rocket icon diff --git a/docs/ar-SA/presets/README.md b/docs/ar-SA/presets/README.md index 26c2314b..cb3dcf1b 100644 --- a/docs/ar-SA/presets/README.md +++ b/docs/ar-SA/presets/README.md @@ -10,6 +10,14 @@ This preset changes the symbols for each module to use Nerd Font symbols. [![Screenshot of Nerd Font Symbols preset](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font) +## [No Nerd Fonts](./no-nerd-font.md) + +This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt. + +::: tip This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). ::: + +[Click to view No Nerd Font preset](./no-nerd-font) + ## [Bracketed Segments](./bracketed-segments.md) This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.). @@ -28,6 +36,12 @@ This preset hides the version of language runtimes. If you work in containers or [![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes) +## [No Empty Icons](./no-empty-icons.md) + +This preset does not show icons if the toolset is not found. + +[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Click to view No Runtime Versions preset")](./no-empty-icons.md) + ## [Pure Prompt](./pure-preset.md) This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). @@ -39,3 +53,9 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship. [![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png "Click to view Pure Prompt preset")](./pastel-powerline) + +## [Tokyo Night](./tokyo-night.md) + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) diff --git a/docs/ar-SA/presets/no-empty-icons.md b/docs/ar-SA/presets/no-empty-icons.md new file mode 100644 index 00000000..7be6867d --- /dev/null +++ b/docs/ar-SA/presets/no-empty-icons.md @@ -0,0 +1,17 @@ +[Return to Presets](./README.md#no-empty-icons) + +# No Empty Icons Preset + +If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. + +![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) + +### Configuration + +```sh +starship preset no-empty-icons > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-empty-icons.toml) + +<<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/ar-SA/presets/no-nerd-font.md b/docs/ar-SA/presets/no-nerd-font.md new file mode 100644 index 00000000..b154a6c0 --- /dev/null +++ b/docs/ar-SA/presets/no-nerd-font.md @@ -0,0 +1,19 @@ +[Return to Presets](./README.md#no-nerd-fonts) + +# No Nerd Fonts Preset + +This preset restricts the use of symbols to those from emoji and powerline sets. + +This means that even without a Nerd Font installed, you should be able to view all module symbols. + +This preset will become the default preset in a future release of starship. + +### Configuration + +```sh +starship preset no-nerd-font > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-nerd-font.toml) + +<<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/ar-SA/presets/tokyo-night.md b/docs/ar-SA/presets/tokyo-night.md new file mode 100644 index 00000000..883f79de --- /dev/null +++ b/docs/ar-SA/presets/tokyo-night.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#pastel-powerline) + +# Tokyo Night Preset + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) + +### المتطلبات الأساسية + +- تثبيت [Nerd Font](https://www.nerdfonts.com/) وتمكينه في موجه الأوامر الخاصة بك + +### Configuration + +```sh +starship preset tokyo-night > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/tokyo-night.toml) + +<<< @/.vuepress/public/presets/toml/tokyo-night.toml diff --git a/docs/ckb-IR/advanced-config/README.md b/docs/ckb-IR/advanced-config/README.md index 2935c582..23c3bd21 100644 --- a/docs/ckb-IR/advanced-config/README.md +++ b/docs/ckb-IR/advanced-config/README.md @@ -205,7 +205,9 @@ Some shells support a right prompt which renders on the same line as the input. Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](/config/#fill). -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. + +Note: Nushell 0.71.0 or later is required ### نموونە @@ -280,5 +282,5 @@ If multiple colors are specified for foreground/background, the last one in the Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: - Many terminals disable support for `blink` by default -- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564). +- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). - `strikethrough` is not supported by the default macOS Terminal.app diff --git a/docs/ckb-IR/config/README.md b/docs/ckb-IR/config/README.md index a351bc01..dcc6c1c4 100644 --- a/docs/ckb-IR/config/README.md +++ b/docs/ckb-IR/config/README.md @@ -15,15 +15,17 @@ mkdir -p ~/.config && touch ~/.config/starship.toml # Inserts a blank line between shell prompts add_newline = true -# Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +# 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 ``` +### Config File Location + You can change default configuration file location with `STARSHIP_CONFIG` environment variable: ```sh @@ -70,6 +72,62 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. +### Strings + +In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. + +The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. + +| Symbol | Type | Notes | +| ------ | ------------------------- | ------------------------------------------------------ | +| `'` | literal string | less escaping | +| `"` | string | more escaping | +| `'''` | multi-line literal string | less escaping | +| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | + +بۆ نموونە: + +```toml +# literal string +format = '☺\☻ ' + +# regular string +format = "☺\\☻ " + +# escaping Starship symbols +format = '\[\$\] ' +``` + +When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: + +```toml +# with literal string +format = ''' + +\$''' + +# with multiline basic string +format = """ + +\\$""" + +# with basic string +format = "\n\\$" +``` + +In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. + +```toml +format = """ +line1\ +line1\ +line1 +line2\ +line2\ +line2 +""" +``` + ### Format Strings Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. @@ -80,9 +138,9 @@ A variable contains a `$` symbol followed by the name of the variable. The name بۆ نموونە: -- `$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. +- `'$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. #### کۆمەڵە نووسین @@ -94,20 +152,20 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri بۆ نموونە: -- `[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. +- `'[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 +- `'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. @@ -117,43 +175,20 @@ A conditional format string wrapped in `(` and `)` will not render if all variab بۆ نموونە: -- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. -- `(some text)` will always show nothing since there are no variables wrapped in the braces. -- 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\] )`. - -#### Special characters - -The following symbols have special usage in a format string and must be escaped: `$ \ [ ] ( )`. - -Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). - -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 = ''' - -\$''' -``` +- `'(@$region)'` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. +- `'(some text)'` will always show nothing since there are no variables wrapped in the braces. +- When `$combined` is a shortcut for `\[$a$b\]`, `'($combined)'` will show nothing only if `$a` and `$b` are both `None`. This works the same as `'(\[$a$b\] )'`. ### Negative matching -Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched. +Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading '!' character. The presence of _any_ negative indicator in the directory will result in the module not being matched. Extensions are matched against both the characters after the last dot in a filename, and the characters after the first dot in a filename. For example, `foo.bar.tar.gz` will be matched against `bar.tar.gz` and `gz` in the `detect_extensions` variable. Files whose name begins with a dot are not considered to have extensions at all. To see how this works in practice, you could match TypeScript but not MPEG Transport Stream files thus: ```toml -detect_extensions = ["ts", "!video.ts", "!audio.ts"] +detect_extensions = ['ts', '!video.ts', '!audio.ts'] ``` ## Prompt @@ -165,11 +200,11 @@ This is the list of prompt-wide configuration options. | Option | Default | Description | | ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `format` | [link](#default-prompt-format) | Configure the format of the prompt. | -| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | +| `right_format` | `''` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | | `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Inserts blank line between shell prompts. | -| `palette` | `""` | Sets which color palette from `palettes` to use. | +| `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | ### نموونە @@ -178,10 +213,10 @@ This is the list of prompt-wide configuration options. # ~/.config/starship.toml # Use custom format -format = """ +format = ''' [┌───────────────────>](bold green) [│](bold green)$directory$rust$package -[└─>](bold green) """ +[└─>](bold green) ''' # Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 @@ -189,15 +224,15 @@ scan_timeout = 10 # Disable the blank line at the start of the prompt add_newline = false -# Set "foo" as custom color palette -palette = "foo" +# Set 'foo' as custom color palette +palette = 'foo' # Define custom colors [palettes.foo] # Overwrite existing color -blue = "21" +blue = '21' # Define new color -mustard = "#af8700" +mustard = '#af8700' ``` ### Default Prompt Format @@ -205,7 +240,7 @@ mustard = "#af8700" 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" +format = '$all' # Which is equivalent to format = """ @@ -236,7 +271,9 @@ $elixir\ $elm\ $erlang\ $golang\ +$guix_shell\ $haskell\ +$haxe\ $helm\ $java\ $julia\ @@ -245,6 +282,7 @@ $lua\ $nim\ $nodejs\ $ocaml\ +$opa\ $perl\ $php\ $pulumi\ @@ -281,6 +319,7 @@ $jobs\ $battery\ $time\ $status\ +$os\ $container\ $shell\ $character""" @@ -290,7 +329,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format = "$all$directory$character" +format = '$all$directory$character' ``` ## AWS @@ -305,15 +344,17 @@ When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. +When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. + ### Options | Option | Default | Description | | ------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | -| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | -| `profile_aliases` | | Table of profile aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | The style 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. | +| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | +| `style` | `'bold yellow'` | The style for the module. | | `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Disables the `AWS` module. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -339,11 +380,11 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL [aws] format = 'on [$symbol($profile )(\($region\) )]($style)' -style = "bold blue" -symbol = "🅰 " +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' [aws.profile_aliases] CompanyGroupFrobozzOnCallAccess = 'Frobozz' ``` @@ -354,12 +395,12 @@ CompanyGroupFrobozzOnCallAccess = 'Frobozz' # ~/.config/starship.toml [aws] -format = "on [$symbol$region]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$region]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' ``` #### Display profile @@ -368,34 +409,48 @@ us-east-1 = "va" # ~/.config/starship.toml [aws] -format = "on [$symbol$profile]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$profile]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.profile_aliases] Enterprise_Naming_Scheme-voidstars = 'void**' ``` ## Azure -The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription, as defined in the `~/.azure/azureProfile.json` file. +The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription or the username, as defined in the `~/.azure/azureProfile.json` file. ### Options | گۆڕاو | Default | Description | | ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `"on [$symbol($subscription)]($style) "` | The format for the Azure module to render. | -| `symbol` | `"ﴃ "` | The symbol used in the format. | -| `style` | `"blue bold"` | The style used in the format. | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'ﴃ '` | The symbol used in the format. | +| `style` | `'blue bold'` | The style used in the format. | | `disabled` | `true` | Disables the `azure` module. | -### نموونە +### Examples + +#### Display Subscription Name ```toml # ~/.config/starship.toml [azure] disabled = false -format = "on [$symbol($subscription)]($style) " +format = 'on [$symbol($subscription)]($style) ' +symbol = 'ﴃ ' +style = 'blue bold' +``` + +#### Display Username + +```toml +# ~/.config/starship.toml + +[azure] +disabled = false +format = "on [$symbol($username)]($style) " symbol = "ﴃ " style = "blue bold" ``` @@ -408,12 +463,12 @@ The `battery` module shows how charged the device's battery is and its current c | 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. | +| `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. | @@ -423,9 +478,9 @@ The `battery` module shows how charged the device's battery is and its current c # ~/.config/starship.toml [battery] -full_symbol = "🔋 " -charging_symbol = "⚡️ " -discharging_symbol = "💀 " +full_symbol = '🔋 ' +charging_symbol = '⚡️ ' +discharging_symbol = '💀 ' ``` ### Battery Display @@ -435,7 +490,7 @@ The `display` configuration option is used to define when the battery indicator ```toml [[battery.display]] threshold = 10 -style = "bold red" +style = 'bold red' ``` The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. @@ -447,21 +502,21 @@ The `display` option is an array of the following table. | Option | Default | Description | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | | `threshold` | `10` | The upper bound for the display option. | -| `style` | `"red bold"` | The style used if the display option is in use. | +| `style` | `'red bold'` | The style used if the display option is in use. | | `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. | | `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. | #### نموونە ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% threshold = 10 -style = "bold red" +style = 'bold red' -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% threshold = 30 -style = "bold yellow" -discharging_symbol = "💦" +style = 'bold yellow' +discharging_symbol = '💦' # when capacity is over 30%, the battery indicator will not be displayed ``` @@ -477,13 +532,13 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil | Option | Default | Description | | ------------------- | ----------------------------------------------- | ----------------------------------------------------- | -| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. | -| `version_format` | `"v${raw}"` | The version format. | -| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. | +| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. | +| `version_format` | `'v${raw}'` | The version format. | +| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | -| `style` | `"bold blue"` | The style for the module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `elixir` module. | ### Variables @@ -502,7 +557,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil # ~/.config/starship.toml [buf] -symbol = "🦬 " +symbol = '🦬 ' ``` ## Bun @@ -516,13 +571,13 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🍞 "` | A format string representing the symbol of Node.js. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["bun.lockb", "bunfig.toml"]` | Which filenames should trigger this module. | +| `detect_files` | `['bun.lockb', 'bunfig.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | The style for the module. | +| `style` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `bun` module. | ### Variables @@ -541,7 +596,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. # ~/.config/starship.toml [bun] -format = "via [🍔 $version](bold green) " +format = 'via [🍔 $version](bold green) ' ``` ## C @@ -552,14 +607,14 @@ The `c` module shows some information about your C compiler. By default the modu | Option | Default | Description | | ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version(-$name) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"C "` | The symbol used before displaying the compiler details | -| `detect_extensions` | `["c", "h"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ "cc", "--version" ], [ "gcc", "--version" ], [ "clang", "--version" ] ] | How to detect what the compiler is | -| `style` | `"bold 149"` | The style for the module. | +| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | +| `style` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `c` module. | ### Variables @@ -577,7 +632,7 @@ NB that `version` is not in the default format. The `commands` option accepts a list of commands to determine the compiler version and name. -Each command is represented as a list of the executable name, followed by its arguments, usually something like `["mycc", "--version"]`. Starship will try executing each command until it gets a result on STDOUT. +Each command is represented as a list of the executable name, followed by its arguments, usually something like `['mycc', '--version']`. Starship will try executing each command until it gets a result on STDOUT. If a C compiler is not supported by this module, you can request it by [raising an issue on GitHub](https://github.com/starship/starship/). @@ -587,7 +642,7 @@ If a C compiler is not supported by this module, you can request it by [raising # ~/.config/starship.toml [c] -format = "via [$name $version]($style)" +format = 'via [$name $version]($style)' ``` ## Character @@ -611,13 +666,13 @@ By default it only changes color. If you also want to change its shape take a lo | 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. | -| `vimcmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | -| `vimcmd_replace_one_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim `replace_one` mode. | -| `vimcmd_replace_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim replace mode. | -| `vimcmd_visual_symbol` | `"[❮](bold yellow)"` | The format string used before the text input if the shell is in vim replace mode. | +| `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. | +| `vimcmd_symbol` | `'[❮](bold green)'` | The format string used before the text input if the shell is in vim normal mode. | +| `vimcmd_replace_one_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim `replace_one` mode. | +| `vimcmd_replace_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim replace mode. | +| `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | | `disabled` | `false` | Disables the `character` module. | ### Variables @@ -634,8 +689,8 @@ By default it only changes color. If you also want to change its shape take a lo # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[✗](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[✗](bold red) ' ``` #### Without custom error shape @@ -644,8 +699,8 @@ error_symbol = "[✗](bold red) " # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[➜](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[➜](bold red) ' ``` #### With custom vim shape @@ -654,7 +709,7 @@ error_symbol = "[➜](bold red) " # ~/.config/starship.toml [character] -vicmd_symbol = "[V](bold green) " +vicmd_symbol = '[V](bold green) ' ``` ## CMake @@ -668,13 +723,13 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | Option | Default | Description | | ------------------- | -------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"△ "` | The symbol used before the version of cmake. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'△ '` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this module | -| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | +| `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | -| `style` | `"bold blue"` | The style for the module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -698,11 +753,11 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold blue"` | The style for the module. | -| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Which extensions should trigger this module. | +| `symbol` | `'⚙️ '` | The symbol used before displaying the version of COBOL. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold blue'` | The style for the module. | +| `detect_extensions` | `['cbl', 'cob', 'CBL', 'COB']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `cobol` module. | @@ -735,8 +790,8 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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. | +| `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). | @@ -758,7 +813,7 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec [cmd_duration] min_time = 500 -format = "underwent [$duration](bold yellow)" +format = 'underwent [$duration](bold yellow)' ``` ## Conda @@ -776,9 +831,9 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | 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. | +| `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. | @@ -798,7 +853,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c # ~/.config/starship.toml [conda] -format = "[$symbol$environment](dimmed green) " +format = '[$symbol$environment](dimmed green) ' ``` ## Container @@ -809,8 +864,8 @@ The `container` module displays a symbol and container name, if inside a contain | Option | Default | Description | | ---------- | ---------------------------------- | ----------------------------------------- | -| `symbol` | `"⬢"` | The symbol shown, when inside a container | -| `style` | `"bold red dimmed"` | The style for the module. | +| `symbol` | `'⬢'` | The symbol shown, when inside a container | +| `style` | `'bold red dimmed'` | The style for the module. | | `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `container` module. | @@ -844,12 +899,12 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold red"` | The style for the module. | -| `detect_extensions` | `["cr"]` | Which extensions should trigger this module. | -| `detect_files` | `["shard.yml"]` | Which filenames should trigger this module. | +| `symbol` | `'🔮 '` | The symbol used before displaying the version of crystal. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold red'` | The style for the module. | +| `detect_extensions` | `['cr']` | Which extensions should trigger this module. | +| `detect_files` | `['shard.yml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `crystal` module. | @@ -869,7 +924,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// # ~/.config/starship.toml [crystal] -format = "via [✨ $version](bold blue) " +format = 'via [✨ $version](bold blue) ' ``` ## Daml @@ -882,12 +937,12 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"Λ "` | A format string representing the symbol of Daml | -| `style` | `"bold cyan"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'Λ '` | A format string representing the symbol of Daml | +| `style` | `'bold cyan'` | The style for the module. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['daml.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `daml` module. | @@ -907,7 +962,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d # ~/.config/starship.toml [daml] -format = "via [D $version](bold bright-green) " +format = 'via [D $version](bold bright-green) ' ``` ## Dart @@ -922,13 +977,13 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | Option | Default | Description | | ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `detect_extensions` | `["dart"]` | Which extensions should trigger this module. | -| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".dart_tool"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🎯 '` | A format string representing the symbol of Dart | +| `detect_extensions` | `['dart']` | Which extensions should trigger this module. | +| `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | Which filenames should trigger this module. | +| `detect_folders` | `['.dart_tool']` | Which folders should trigger this module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -947,7 +1002,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d # ~/.config/starship.toml [dart] -format = "via [🔰 $version](bold red) " +format = 'via [🔰 $version](bold red) ' ``` ## Deno @@ -960,13 +1015,13 @@ The `deno` module shows you your currently installed version of [Deno](https://d | Option | Default | Description | | ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦕 "` | A format string representing the symbol of Deno | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦕 '` | A format string representing the symbol of Deno | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["deno.json", "deno.jsonc", "mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. | +| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"green bold"` | The style for the module. | +| `style` | `'green bold'` | The style for the module. | | `disabled` | `false` | Disables the `deno` module. | ### Variables @@ -983,7 +1038,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d # ~/.config/starship.toml [deno] -format = "via [🦕 $version](green bold) " +format = 'via [🦕 $version](green bold) ' ``` ## Directory @@ -996,20 +1051,21 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### 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: "…/" | -| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | -| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) | +| 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: '…/' | +| `before_repo_root_style` | | The style for the path segment above the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `'[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) '` | The format of a git repo when `before_repo_root_style` and `repo_root_style` is defined. | +| `home_symbol` | `'~'` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |

This module has a few advanced configuration options that control how the directory is displayed. @@ -1024,8 +1080,8 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ```toml [directory.substitutions] -"/Volumes/network/path" = "/net" -"src/com/long/java/path" = "mypath" +'/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`. @@ -1036,8 +1092,8 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | گۆڕاو | نموونە | Description | | --------- | --------------------- | ----------------------------------- | -| path | `"D:/Projects"` | The current directory path | -| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | +| 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 @@ -1048,11 +1104,11 @@ Let us consider the path `/path/to/home/git_repo/src/lib` | گۆڕاو | نموونە | Description | | ------------------ | --------------------- | --------------------------------------- | -| before_root_path | `"/path/to/home/"` | The path before git root directory path | -| repo_root | `"git_repo"` | The git root directory name | -| path | `"/src/lib"` | The remaining path | -| style | `"black bold dimmed"` | Mirrors the value of option `style` | -| repo_root_style | `"underline white"` | Style for git root directory name | +| before_root_path | `'/path/to/home/'` | The path before git root directory path | +| repo_root | `'git_repo'` | The git root directory name | +| path | `'/src/lib'` | The remaining path | +| style | `'black bold dimmed'` | Mirrors the value of option `style` | +| repo_root_style | `'underline white'` | Style for git root directory name |
@@ -1063,7 +1119,7 @@ Let us consider the path `/path/to/home/git_repo/src/lib` [directory] truncation_length = 8 -truncation_symbol = "…/" +truncation_symbol = '…/' ``` ## Docker Context @@ -1074,13 +1130,13 @@ The `docker_context` module shows the currently active [Docker context](https:// | Option | Default | Description | | ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `format` | `'via [$symbol$context]($style) '` | The format for the module. | +| `symbol` | `'🐳 '` | The symbol used before displaying the Docker context. | | `only_with_files` | `true` | Only show when there's a match | | `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | +| `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | Which filenames should trigger this module (needs `only_with_files` to be true). | | `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | -| `style` | `"blue bold"` | The style for the module. | +| `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -1099,7 +1155,7 @@ The `docker_context` module shows the currently active [Docker context](https:// # ~/.config/starship.toml [docker_context] -format = "via [🐋 $context](blue bold)" +format = 'via [🐋 $context](blue bold)' ``` ## Dotnet @@ -1127,14 +1183,14 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$var_cluster" +'dev.local.cluster.k8s' = 'dev' +'.*/openshift-cluster/.*' = 'openshift' +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' [kubernetes.user_aliases] -"dev.local.cluster.k8s" = "dev" -"root/.*" = "root" +'dev.local.cluster.k8s' = 'dev' +'root/.*' = 'root' ``` Only show the module in directories that contain a `k8s` file. @@ -2121,14 +2249,14 @@ Long and automatically generated cluster names can be identified and shortened u ```toml [kubernetes.context_aliases] # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -".*/openshift-cluster/.*" = "openshift" +'.*/openshift-cluster/.*' = 'openshift' # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$var_cluster" +'.*/(?P[\\w-]+)/.*' = '$var_cluster' # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' ``` ## Line Break @@ -2159,8 +2287,8 @@ The `localip` module shows the IPv4 address of the primary network interface. | Option | Default | Description | | ---------- | ------------------------- | ------------------------------------------------------ | | `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | The style for the module. | +| `format` | `'[$localipv4]($style) '` | The format for the module. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `true` | Disables the `localip` module. | ### Variables @@ -2179,7 +2307,7 @@ The `localip` module shows the IPv4 address of the primary network interface. [localip] ssh_only = false -format = "@[$localipv4](bold red) " +format = '@[$localipv4](bold red) ' disabled = false ``` @@ -2195,14 +2323,14 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | Option | Default | Description | | ------------------- | ------------------------------------ | -------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | -| `detect_extensions` | `["lua"]` | Which extensions should trigger this module. | -| `detect_files` | `[".lua-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["lua"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | -| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🌙 '` | A format string representing the symbol of Lua. | +| `detect_extensions` | `['lua']` | Which extensions should trigger this module. | +| `detect_files` | `['.lua-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['lua']` | Which folders should trigger this module. | +| `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 @@ -2221,7 +2349,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o # ~/.config/starship.toml [lua] -format = "via [🌕 $version](bold blue) " +format = 'via [🌕 $version](bold blue) ' ``` ## Memory Usage @@ -2241,9 +2369,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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. | +| `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 @@ -2267,8 +2395,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y [memory_usage] disabled = false threshold = -1 -symbol = " " -style = "bold dimmed green" +symbol = ' ' +style = 'bold dimmed green' ``` ## Meson @@ -2282,10 +2410,10 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. | Option | Default | Description | | ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- | | `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | -| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. | -| `format` | `"via [$symbol$project]($style) "` | The format for the module. | -| `symbol` | `"⬢ "` | The symbol used before displaying the project name. | -| `style` | `"blue bold"` | The style for the module. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | +| `format` | `'via [$symbol$project]($style) '` | The format for the module. | +| `symbol` | `'⬢ '` | The symbol used before displaying the project name. | +| `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `meson` module. | ### Variables @@ -2305,9 +2433,9 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. [meson] disabled = false -truncation_symbol = "--" -symbol = " " -style = "bold dimmed green" +truncation_symbol = '--' +symbol = ' ' +style = 'bold dimmed green' ``` ## Mercurial Branch @@ -2318,11 +2446,11 @@ The `hg_branch` module shows the active branch of the repo in your current direc | 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. | +| `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 `N` graphemes | -| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a branch name was truncated. | | `disabled` | `true` | Disables the `hg_branch` module. | ### Variables @@ -2341,9 +2469,9 @@ The `hg_branch` module shows the active branch of the repo in your current direc # ~/.config/starship.toml [hg_branch] -format = "on [🌱 $branch](bold purple)" +format = 'on [🌱 $branch](bold purple)' truncation_length = 4 -truncation_symbol = "" +truncation_symbol = '' ``` ## Nim @@ -2359,13 +2487,13 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | -| `detect_extensions` | `["nim", "nims", "nimble"]` | Which extensions should trigger this module. | -| `detect_files` | `["nim.cfg"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'👑 '` | The symbol used before displaying the version of Nim. | +| `detect_extensions` | `['nim', 'nims', 'nimble']` | Which extensions should trigger this module. | +| `detect_files` | `['nim.cfg']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | The style for the module. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `nim` module. | ### Variables @@ -2384,8 +2512,8 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang # ~/.config/starship.toml [nim] -style = "yellow" -symbol = "🎣 " +style = 'yellow' +symbol = '🎣 ' ``` ## Nix-shell @@ -2397,10 +2525,10 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | 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. | +| `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 @@ -2421,8 +2549,8 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ [nix_shell] disabled = true -impure_msg = "[impure shell](bold red)" -pure_msg = "[pure shell](bold green)" +impure_msg = '[impure shell](bold red)' +pure_msg = '[pure shell](bold green)' format = 'via [☃️ $state( \($name\))](bold blue) ' ``` @@ -2441,13 +2569,13 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | Option | Default | Description | | ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string representing the symbol of Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts", "mts", "cts"]` | Which extensions should trigger this module. | -| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | -| `style` | `"bold green"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string representing the symbol of Node.js. | +| `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Which extensions should trigger this module. | +| `detect_files` | `['package.json', '.node-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['node_modules']` | Which folders should trigger this module. | +| `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 package.json does not match the Node.js version. | @@ -2467,7 +2595,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n # ~/.config/starship.toml [nodejs] -format = "via [🤖 $version](bold green) " +format = 'via [🤖 $version](bold green) ' ``` ## OCaml @@ -2485,15 +2613,15 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | Option | Default | Description | | ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | -| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | -| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | -| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Which extensions should trigger this module. | -| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Which filenames should trigger this module. | -| `detect_folders` | `["_opam", "esy.lock"]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | The style for the module. | +| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐫 '` | The symbol used before displaying the version of OCaml. | +| `global_switch_indicator` | `''` | The format string used to represent global OPAM switch. | +| `local_switch_indicator` | `'*'` | The format string used to represent local OPAM switch. | +| `detect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | Which extensions should trigger this module. | +| `detect_files` | `['dune', 'dune-project', 'jbuild', 'jbuild-ignore', '.merlin']` | Which filenames should trigger this module. | +| `detect_folders` | `['_opam', 'esy.lock']` | Which folders should trigger this module. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `ocaml` module. | ### Variables @@ -2514,7 +2642,43 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam # ~/.config/starship.toml [ocaml] -format = "via [🐪 $version]($style) " +format = 'via [🐪 $version]($style) ' +``` + +## Open Policy Agent + +The `opa` module shows the currently installed version of the OPA tool. By default the module will be shown if the current directory contains a `.rego` file. + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | +| `detect_extensions` | `['rego']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'bold blue'` | The style for the module. | +| `disabled` | `false` | Disables the `opa` module. | + +### Variables + +| گۆڕاو | نموونە | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.44.0` | The version of `opa` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### نموونە + +```toml +# ~/.config/starship.toml + +[opa] +format = 'via [⛑️ $version](bold red) ' ``` ## OpenStack @@ -2526,8 +2690,8 @@ The `openstack` module shows the current OpenStack cloud and project. The module | Option | Default | Description | | ---------- | ----------------------------------------------- | -------------------------------------------------------------- | | `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | -| `style` | `"bold yellow"` | The style for the module. | +| `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 @@ -2548,8 +2712,105 @@ The `openstack` module shows the current OpenStack cloud and project. The module [openstack] format = 'on [$symbol$cloud(\($project\))]($style) ' -style = "bold yellow" -symbol = "☁️ " +style = 'bold yellow' +symbol = '☁️ ' +``` + +## OS + +The `os` module shows the current operating system. OS information is detected via the [os_info](https://lib.rs/crates/os_info) crate. + +::: ئاگادارکردنەوە + +The [os_info](https://lib.rs/crates/os_info) crate used by this module is known to be inaccurate on some systems. + +::: + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ---------- | --------------------- | ------------------------------------------------------ | +| `format` | `"[$symbol]($style)"` | The format for the module. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `true` | Disables the `os` module. | +| `symbols` | | A table that maps each operating system to its symbol. | + +`symbols` allows you to define arbitrary symbols to display for each operating system type. Operating system types not defined by your configuration use the default symbols table below. All operating systems currently supported by the module are listed below. If you would like an operating system to be added, feel free to open a [feature request](https://github.com/starship/starship/issues/new/choose). + +```toml +# This is the default symbols table. +[os.symbols] +Alpine = "🏔️ " +Amazon = "🙂 " +Android = "🤖 " +Arch = "🎗️ " +CentOS = "💠 " +Debian = "🌀 " +DragonFly = "🐉 " +Emscripten = "🔗 " +EndeavourOS = "🚀 " +Fedora = "🎩 " +FreeBSD = "😈 " +Garuda = "🦅 " +Gentoo = "🗜️ " +HardenedBSD = "🛡️ " +Illumos = "🐦 " +Linux = "🐧 " +Macos = "🍎 " +Manjaro = "🥭 " +Mariner = "🌊 " +MidnightBSD = "🌘 " +Mint = "🌿 " +NetBSD = "🚩 " +NixOS = "❄️ " +OpenBSD = "🐡 " +openSUSE = "🦎 " +OracleLinux = "🦴 " +Pop = "🍭 " +Raspbian = "🍓 " +Redhat = "🎩 " +RedHatEnterprise = "🎩 " +Redox = "🧪 " +Solus = "⛵ " +SUSE = "🦎 " +Ubuntu = "🎯 " +Unknown = "❓ " +Windows = "🪟 " +``` + +### Variables + +| گۆڕاو | نموونە | Description | +| --------- | ------------ | ------------------------------------------------------------------ | +| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | +| name | `Arch Linux` | The current operating system name | +| type | `Arch` | The current operating system type | +| codename | | The current operating system codename, if applicable | +| edition | | The current operating system edition, if applicable | +| version | | The current operating system version, if applicable | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### نموونە + +```toml +# ~/.config/starship.toml + +[os] +format = "on [($name )]($style)" +style = "bold blue" +disabled = false + +[os.symbols] +Windows = " " +Arch = "Arch is the best! " ``` ## Package Version @@ -2580,10 +2841,10 @@ The `package` module is shown when the current directory is the repository for a | Option | Default | Description | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"is [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold 208"` | The style for the module. | +| `format` | `'is [$symbol$version]($style) '` | The format for the module. | +| `symbol` | `'📦 '` | The symbol used before displaying the version the package. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `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. | @@ -2603,7 +2864,7 @@ The `package` module is shown when the current directory is the repository for a # ~/.config/starship.toml [package] -format = "via [🎁 $version](208 bold) " +format = 'via [🎁 $version](208 bold) ' ``` ## Perl @@ -2620,13 +2881,13 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe | Option | Default | Description | | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | -| `detect_extensions` | `["pl", "pm", "pod"]` | Which extensions should trigger this module. | -| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | +| `detect_extensions` | `['pl', 'pm', 'pod']` | Which extensions should trigger this module. | +| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | The style for the module. | +| `style` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `perl` module. | ### Variables @@ -2643,7 +2904,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe # ~/.config/starship.toml [perl] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## PHP @@ -2658,13 +2919,13 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | -| `detect_extensions` | `["php"]` | Which extensions should trigger this module. | -| `detect_files` | `["composer.json", ".php-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐘 '` | The symbol used before displaying the version of PHP. | +| `detect_extensions` | `['php']` | Which extensions should trigger this module. | +| `detect_files` | `['composer.json', '.php-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"147 bold"` | The style for the module. | +| `style` | `'147 bold'` | The style for the module. | | `disabled` | `false` | Disables the `php` module. | ### Variables @@ -2683,7 +2944,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. # ~/.config/starship.toml [php] -format = "via [🔹 $version](147 bold) " +format = 'via [🔹 $version](147 bold) ' ``` ## Pulumi @@ -2705,10 +2966,10 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string shown before the Pulumi stack. | -| `style` | `"bold 5"` | The style for the module. | +| `format` | `'via [$symbol($username@)$stack]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string shown before the Pulumi stack. | +| `style` | `'bold 5'` | The style for the module. | | `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | | `disabled` | `false` | Disables the `pulumi` module. | @@ -2732,7 +2993,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [pulumi] -format = "[🛥 ($version )$stack]($style) " +format = '[🛥 ($version )$stack]($style) ' ``` #### Without Pulumi version @@ -2740,8 +3001,8 @@ format = "[🛥 ($version )$stack]($style) " ```toml # ~/.config/starship.toml [pulumi] -symbol = "🛥 " -format = "[$symbol$stack]($style) " +symbol = '🛥 ' +format = '[$symbol$stack]($style) ' ``` ## PureScript @@ -2755,13 +3016,13 @@ The `purescript` module shows the currently installed version of [PureScript](ht | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | -| `detect_extensions` | `["purs"]` | Which extensions should trigger this module. | -| `detect_files` | `["spago.dhall"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'<=> '` | The symbol used before displaying the version of PureScript. | +| `detect_extensions` | `['purs']` | Which extensions should trigger this module. | +| `detect_files` | `['spago.dhall']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold white"` | The style for the module. | +| `style` | `'bold white'` | The style for the module. | | `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -2780,7 +3041,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht # ~/.config/starship.toml [purescript] -format = "via [$symbol$version](bold white)" +format = 'via [$symbol$version](bold white)' ``` ## Python @@ -2806,14 +3067,14 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | | `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | The style for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐍 '` | A format string representing the symbol of 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 | -| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `detect_extensions` | `["py"]` | Which extensions should trigger this module | -| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module | +| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | +| `detect_extensions` | `['py']` | Which extensions should trigger this module | +| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | | `disabled` | `false` | Disables the `python` module. | @@ -2821,7 +3082,7 @@ By default the module will be shown if any of the following conditions are met: 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. +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. ::: @@ -2829,11 +3090,11 @@ The default values and order for `python_binary` was chosen to first identify th | گۆڕاو | نموونە | 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 | +| 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 | ### نموونە @@ -2841,7 +3102,7 @@ The default values and order for `python_binary` was chosen to first identify th # ~/.config/starship.toml [python] -symbol = "👾 " +symbol = '👾 ' pyenv_version_name = true ``` @@ -2850,7 +3111,7 @@ pyenv_version_name = true [python] # Only use the `python3` binary to get the version. -python_binary = "python3" +python_binary = 'python3' ``` ```toml @@ -2869,7 +3130,7 @@ detect_extensions = [] # # Note this will only work when the venv is inside the project and it will only # work in the directory that contains the venv dir but maybe this is ok? -python_binary = ["./venv/bin/python", "python", "python3", "python2"] +python_binary = ['./venv/bin/python', 'python', 'python3', 'python2'] ``` ## R @@ -2888,13 +3149,13 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"📐"` | A format string representing the symbol of R. | -| `style` | `"blue bold"` | The style for the module. | -| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module | -| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module | -| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'📐'` | A format string representing the symbol of R. | +| `style` | `'blue bold'` | The style for the module. | +| `detect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | Which extensions should trigger this module | +| `detect_files` | `['.Rprofile']` | Which filenames should trigger this module | +| `detect_folders` | `['.Rproj.user']` | Which folders should trigger this module | | `disabled` | `false` | Disables the `r` module. | ### Variables @@ -2903,7 +3164,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | ------- | ------------- | ------------------------------------ | | version | `v4.0.5` | The version of `R` | | symbol | | Mirrors the value of option `symbol` | -| style | `"blue bold"` | Mirrors the value of option `style` | +| style | `'blue bold'` | Mirrors the value of option `style` | ### نموونە @@ -2911,7 +3172,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr # ~/.config/starship.toml [rlang] -format = "with [📐 $version](blue bold) " +format = 'with [📐 $version](blue bold) ' ``` ## Raku @@ -2925,13 +3186,13 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra | Option | Default | Description | | ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version-$vm_version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦋 "` | The symbol used before displaying the version of Raku | -| `detect_extensions` | `["p6", "pm6", "pod6", "raku", "rakumod"]` | Which extensions should trigger this module. | -| `detect_files` | `["META6.json"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version-$vm_version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦋 '` | The symbol used before displaying the version of Raku | +| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Which extensions should trigger this module. | +| `detect_files` | `['META6.json']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | The style for the module. | +| `style` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `raku` module. | ### Variables @@ -2949,7 +3210,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra # ~/.config/starship.toml [raku] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## Red @@ -2962,13 +3223,13 @@ By default the `red` module shows the currently installed version of [Red](https | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | -| `detect_extensions` | `["red"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🔺 '` | A format string representing the symbol of Red. | +| `detect_extensions` | `['red']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"red bold"` | The style for the module. | +| `style` | `'red bold'` | The style for the module. | | `disabled` | `false` | Disables the `red` module. | ### Variables @@ -2987,7 +3248,7 @@ By default the `red` module shows the currently installed version of [Red](https # ~/.config/starship.toml [red] -symbol = "🔴 " +symbol = '🔴 ' ``` ## Ruby @@ -3005,14 +3266,14 @@ Starship gets the current Ruby version by running `ruby -v`. | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. | -| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💎 '` | A format string representing the symbol of Ruby. | +| `detect_extensions` | `['rb']` | Which extensions should trigger this module. | +| `detect_files` | `['Gemfile', '.ruby-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | -| `style` | `"bold red"` | The style for the module. | +| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Which environment variables should trigger this module. | +| `style` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `ruby` module. | ### Variables @@ -3031,7 +3292,7 @@ Starship gets the current Ruby version by running `ruby -v`. # ~/.config/starship.toml [ruby] -symbol = "🔺 " +symbol = '🔺 ' ``` ## Rust @@ -3045,13 +3306,13 @@ By default the `rust` module shows the currently installed version of [Rust](htt | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. | -| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦀 '` | A format string representing the symbol of Rust | +| `detect_extensions` | `['rs']` | Which extensions should trigger this module. | +| `detect_files` | `['Cargo.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | The style for the module. | +| `style` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -3072,7 +3333,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt # ~/.config/starship.toml [rust] -format = "via [⚙️ $version](red bold)" +format = 'via [⚙️ $version](red bold)' ``` ## Scala @@ -3087,13 +3348,13 @@ The `scala` module shows the currently installed version of [Scala](https://www. | Option | Default | Description | | ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | -| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | -| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | -| `style` | `"red dimmed"` | The style for the module. | +| `format` | `'via [${symbol}(${version} )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. | +| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. | +| `detect_folders` | `['.metals']` | Which folders should trigger this modules. | +| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. | +| `style` | `'red dimmed'` | The style for the module. | | `disabled` | `false` | Disables the `scala` module. | ### Variables @@ -3112,7 +3373,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. # ~/.config/starship.toml [scala] -symbol = "🌟 " +symbol = '🌟 ' ``` ## Shell @@ -3129,19 +3390,19 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `"bsh"` | A format string used to represent bash. | -| `fish_indicator` | `"fsh"` | A format string used to represent fish. | -| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. | -| `powershell_indicator` | `"psh"` | A format string used to represent powershell. | -| `ion_indicator` | `"ion"` | A format string used to represent ion. | -| `elvish_indicator` | `"esh"` | A format string used to represent elvish. | -| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. | -| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. | -| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. | -| `nu_indicator` | `"nu"` | A format string used to represent nu. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `"[$indicator]($style) "` | The format for the module. | -| `style` | `"white bold"` | The style for the module. | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `style` | `'white bold'` | The style for the module. | | `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3159,26 +3420,26 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [shell] -fish_indicator = "" -powershell_indicator = "_" -unknown_indicator = "mystery shell" -style = "cyan bold" +fish_indicator = '' +powershell_indicator = '_' +unknown_indicator = 'mystery shell' +style = 'cyan bold' disabled = false ``` ## SHLVL -The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ('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`. | +| `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. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `true` | Disables the `shlvl` module. | ### Variables @@ -3198,7 +3459,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int [shlvl] disabled = false -format = "$shlvl level(s) down" +format = '$shlvl level(s) down' threshold = 3 ``` @@ -3211,8 +3472,8 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | 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. | +| `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 @@ -3243,9 +3504,9 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | Option | Default | Description | | ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | The number of directories the environment path should be truncated to. `0` means no truncation. Also see the [`directory`](#directory) module. | -| `symbol` | `"🅢 "` | The symbol used before the environment name. | -| `style` | `"bold blue"` | The style for the module. | -| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `symbol` | `'🅢 '` | The symbol used before the environment name. | +| `style` | `'bold blue'` | The style for the module. | +| `format` | `'via [$symbol$environment]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `spack` module. | ### Variables @@ -3264,7 +3525,7 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat # ~/.config/starship.toml [spack] -format = "[$symbol$environment](dimmed blue) " +format = '[$symbol$environment](dimmed blue) ' ``` ## Status @@ -3281,14 +3542,14 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `format` | `"[$symbol$status]($style) "` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `success_symbol` | `""` | The symbol displayed on program success | -| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | -| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | -| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | -| `style` | `"bold red"` | The style for the module. | +| `format` | `'[$symbol$status]($style) '` | The format of the module | +| `symbol` | `'❌'` | The symbol displayed on program error | +| `success_symbol` | `''` | The symbol displayed on program success | +| `not_executable_symbol` | `'🚫'` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `'🔍'` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `'🧱'` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `'⚡'` | The symbol displayed on any signal | +| `style` | `'bold red'` | The style for the module. | | `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code | | `pipestatus` | `false` | Enable pipestatus reporting | @@ -3320,9 +3581,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [status] -style = "bg:blue" -symbol = "🔴 " -success_symbol = "🟢 SUCCESS" +style = 'bg:blue' +symbol = '🔴 ' +success_symbol = '🟢 SUCCESS' format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false @@ -3342,9 +3603,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | --------------- | ------------------------ | ------------------------------------------------------- | -| `format` | `"[as $symbol]($style)"` | The format of the module | -| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached | -| `style` | `"bold blue"` | The style for the module. | +| `format` | `'[as $symbol]($style)'` | The format of the module | +| `symbol` | `'🧙 '` | The symbol displayed when credentials are cached | +| `style` | `'bold blue'` | The style for the module. | | `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | | `disabled` | `true` | Disables the `sudo` module. | @@ -3363,8 +3624,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [sudo] -style = "bold green" -symbol = "👩‍💻 " +style = 'bold green' +symbol = '👩‍💻 ' disabled = false ``` @@ -3388,13 +3649,13 @@ By default the `swift` module shows the currently installed version of [Swift](h | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `detect_extensions` | `["swift"]` | Which extensions should trigger this module. | -| `detect_files` | `["Package.swift"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐦 '` | A format string representing the symbol of Swift | +| `detect_extensions` | `['swift']` | Which extensions should trigger this module. | +| `detect_files` | `['Package.swift']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 202"` | The style for the module. | +| `style` | `'bold 202'` | The style for the module. | | `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -3413,7 +3674,7 @@ By default the `swift` module shows the currently installed version of [Swift](h # ~/.config/starship.toml [swift] -format = "via [🏎 $version](red bold)" +format = 'via [🏎 $version](red bold)' ``` ## Terraform @@ -3435,13 +3696,13 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol$workspace]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💠'` | A format string shown before the terraform workspace. | +| `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | -| `style` | `"bold 105"` | The style for the module. | +| `detect_folders` | `['.terraform']` | Which folders should trigger this module. | +| `style` | `'bold 105'` | The style for the module. | | `disabled` | `false` | Disables the `terraform` module. | ### Variables @@ -3463,7 +3724,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [terraform] -format = "[🏎💨 $version$workspace]($style) " +format = '[🏎💨 $version$workspace]($style) ' ``` #### Without Terraform version @@ -3472,7 +3733,7 @@ format = "[🏎💨 $version$workspace]($style) " # ~/.config/starship.toml [terraform] -format = "[🏎💨 $workspace]($style) " +format = '[🏎💨 $workspace]($style) ' ``` ## Time @@ -3489,15 +3750,15 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | The format string for the module. | +| `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. | +| `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 | +| `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. +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 @@ -3516,9 +3777,9 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de [time] disabled = false format = '🕙[\[ $time \]]($style) ' -time_format = "%T" -utc_time_offset = "-5" -time_range = "10:00:00-14:00:00" +time_format = '%T' +utc_time_offset = '-5' +time_range = '10:00:00-14:00:00' ``` ## Username @@ -3540,9 +3801,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Option | Default | Description | | ------------- | ----------------------- | ------------------------------------------- | -| `style_root` | `"bold red"` | The style used when the user is root/admin. | -| `style_user` | `"bold yellow"` | The style used for non-root users. | -| `format` | `"[$user]($style) in "` | The format for the module. | +| `style_root` | `'bold red'` | The style used when the user is root/admin. | +| `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. | @@ -3550,8 +3811,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | گۆڕاو | نموونە | 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. | +| `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. | ### نموونە @@ -3559,9 +3820,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` # ~/.config/starship.toml [username] -style_user = "white bold" -style_root = "black bold" -format = "user: [$user]($style) " +style_user = 'white bold' +style_root = 'black bold' +format = 'user: [$user]($style) ' disabled = false show_always = true ``` @@ -3576,13 +3837,13 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'⍱ '` | A format string representing the symbol of Vagrant. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["Vagrantfile"]` | Which filenames should trigger this module. | +| `detect_files` | `['Vagrantfile']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"cyan bold"` | The style for the module. | +| `style` | `'cyan bold'` | The style for the module. | | `disabled` | `false` | Disables the `vagrant` module. | ### Variables @@ -3601,7 +3862,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// # ~/.config/starship.toml [vagrant] -format = "via [⍱ $version](bold white) " +format = 'via [⍱ $version](bold white) ' ``` ## V @@ -3615,13 +3876,13 @@ The `vlang` module shows you your currently installed version of [V](https://vla | Option | Default | Description | | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"V "` | A format string representing the symbol of V | -| `detect_extensions` | `["v"]` | Which extensions should trigger this module. | -| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'V '` | A format string representing the symbol of V | +| `detect_extensions` | `['v']` | Which extensions should trigger this module. | +| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"blue bold"` | The style for the module. | +| `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `vlang` module. | ### Variables @@ -3637,7 +3898,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla ```toml # ~/.config/starship.toml [vlang] -format = "via [V $version](blue bold) " +format = 'via [V $version](blue bold) ' ``` ## VCSH @@ -3648,9 +3909,9 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | Option | Default | Description | | ---------- | -------------------------------- | ------------------------------------------------------ | -| `symbol` | | The symbol used before displaying the repository name. | -| `style` | `"bold yellow"` | The style for the module. | -| `format` | `"vcsh [$symbol$repo]($style) "` | The format for the module. | +| `symbol` | `''` | The symbol used before displaying the repository name. | +| `style` | `'bold yellow'` | The style for the module. | +| `format` | `'vcsh [$symbol$repo]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `vcsh` module. | ### Variables @@ -3669,7 +3930,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v # ~/.config/starship.toml [vcsh] -format = "[🆅 $repo](bold blue) " +format = '[🆅 $repo](bold blue) ' ``` ## Zig @@ -3682,12 +3943,12 @@ By default the the `zig` module shows the currently installed version of [Zig](h | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"↯ "` | 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. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'↯ '` | The symbol used before displaying the version of Zig. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `zig` module. | -| `detect_extensions` | `["zig"]` | Which extensions should trigger this module. | +| `detect_extensions` | `['zig']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -3707,7 +3968,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h # ~/.config/starship.toml [zig] -symbol = "⚡️ " +symbol = '⚡️ ' ``` ## Custom commands @@ -3752,16 +4013,16 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | Option | Default | Description | | ------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `command` | `''` | The command whose output should be printed. The command will be passed on stdin to the shell. | | `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `description` | `""` | The description of the module that is shown when running `starship explain`. | +| `description` | `''` | The description of the module that is shown when running `starship explain`. | | `detect_files` | `[]` | The files that will be searched in the working directory for a match. | | `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. | | `detect_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. | +| `symbol` | `''` | The symbol used before displaying the command output. | +| `style` | `'bold green'` | The style for the module. | +| `format` | `'[$symbol($output )]($style)'` | The format for the module. | | `disabled` | `false` | Disables this `custom` module. | | `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | | `use_stdin` | | An optional boolean value that overrides whether commands should be forwarded to the shell via the standard input or as an argument. If unset standard input is used by default, unless the shell does not support it (cmd, nushell). Setting this disables shell-specific argument handling. | @@ -3784,14 +4045,14 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt - 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. +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 -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. ```toml -shell = ["pwsh", "-Command", "-"] +shell = ['pwsh', '-Command', '-'] ``` ::: warning Make sure your custom shell configuration exits gracefully @@ -3812,19 +4073,19 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -detect_files = ["foo"] # can specify filters but wildcards are not supported -when = """ test "$HOME" = "$PWD" """ -format = " transcending [$output]($style)" +command = 'echo foo' # shows output of command +detect_files = ['foo'] # can specify filters but wildcards are not supported +when = ''' test "$HOME" = "$PWD" ''' +format = ' transcending [$output]($style)' [custom.time] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command', '-'] [custom.time-as-arg] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command'] use_stdin = false ``` diff --git a/docs/ckb-IR/guide/README.md b/docs/ckb-IR/guide/README.md index a006e7f2..d9344f93 100644 --- a/docs/ckb-IR/guide/README.md +++ b/docs/ckb-IR/guide/README.md @@ -215,7 +215,6 @@ Alternatively, install Starship using any of the following package managers: | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | | Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | -| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | @@ -413,6 +412,14 @@ If you're looking to further customize Starship: - **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons. +## ❤️ Sponsors + +Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website. + +**Supporter Tier** + +- [Dimension](https://dimension.dev/) +


ئایکۆنی مووشەکی Starship diff --git a/docs/ckb-IR/presets/README.md b/docs/ckb-IR/presets/README.md index ee980d1f..fd49eb65 100644 --- a/docs/ckb-IR/presets/README.md +++ b/docs/ckb-IR/presets/README.md @@ -10,6 +10,14 @@ This preset changes the symbols for each module to use Nerd Font symbols. [![ڕوونماوێنەیەکی پێش ڕێکخستنی هێماکانی فۆنتی Nerd](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font) +## [No Nerd Fonts](./no-nerd-font.md) + +This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt. + +::: tip This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). ::: + +[Click to view No Nerd Font preset](./no-nerd-font) + ## [پارچە کەوانەکراوەکان](./bracketed-segments.md) This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.). @@ -28,6 +36,12 @@ This preset changes the symbols for each module into plain text. Great if you do [![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes) +## [No Empty Icons](./no-empty-icons.md) + +This preset does not show icons if the toolset is not found. + +[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Click to view No Runtime Versions preset")](./no-empty-icons.md) + ## [Pure Prompt](./pure-preset.md) ئەم پێش ڕێکخستنە لاسایی شێواز و ڕەفتاری [Pure](https://github.com/sindresorhus/pure) دەکاتەوە. @@ -39,3 +53,9 @@ This preset changes the symbols for each module into plain text. Great if you do This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship. [![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png "Click to view Pure Prompt preset")](./pastel-powerline) + +## [Tokyo Night](./tokyo-night.md) + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) diff --git a/docs/ckb-IR/presets/no-empty-icons.md b/docs/ckb-IR/presets/no-empty-icons.md new file mode 100644 index 00000000..ddc80c9a --- /dev/null +++ b/docs/ckb-IR/presets/no-empty-icons.md @@ -0,0 +1,17 @@ +[Return to Presets](./README.md#no-empty-icons) + +# No Empty Icons Preset + +If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. + +![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) + +### ڕێکخستن + +```sh +starship preset no-empty-icons > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-empty-icons.toml) + +<<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/ckb-IR/presets/no-nerd-font.md b/docs/ckb-IR/presets/no-nerd-font.md new file mode 100644 index 00000000..4d9d3a72 --- /dev/null +++ b/docs/ckb-IR/presets/no-nerd-font.md @@ -0,0 +1,19 @@ +[Return to Presets](./README.md#no-nerd-fonts) + +# No Nerd Fonts Preset + +This preset restricts the use of symbols to those from emoji and powerline sets. + +This means that even without a Nerd Font installed, you should be able to view all module symbols. + +This preset will become the default preset in a future release of starship. + +### ڕێکخستن + +```sh +starship preset no-nerd-font > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-nerd-font.toml) + +<<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/ckb-IR/presets/tokyo-night.md b/docs/ckb-IR/presets/tokyo-night.md new file mode 100644 index 00000000..3c1077eb --- /dev/null +++ b/docs/ckb-IR/presets/tokyo-night.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#pastel-powerline) + +# Tokyo Night Preset + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) + +### پێشمەرجەکان + +- [فۆنتێکی Nerd](https://www.nerdfonts.com/) دامەزراوە و چالاککراوە لە تێرمیناڵەکەتا + +### ڕێکخستن + +```sh +starship preset tokyo-night > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/tokyo-night.toml) + +<<< @/.vuepress/public/presets/toml/tokyo-night.toml diff --git a/docs/de-DE/README.md b/docs/de-DE/README.md index 397975e6..a03344d8 100644 --- a/docs/de-DE/README.md +++ b/docs/de-DE/README.md @@ -4,21 +4,21 @@ heroImage: /logo.svg heroText: tagline: Minimale, super schnelle und unendlich anpassbare Prompt für jede Shell! actionText: Loslegen → -actionLink: ./guide/ +actionLink: ./de-DE/guide/ features: - title: Kompatibel details: Läuft mit den beliebtesten Shells auf den beliebtesten Betriebssystemen. Überall einsetzbar! - title: Rust-Powered - details: Bringt die Schnelligkeit und Zuverlässigkeit von Rust in deine Shell-Prompt. + details: Bringt die Schnelligkeit und Sicherheit von Rust in deine Shell-Prompt. - title: Individualisierbar details: Jedes noch so kleine Detail kann nach Deinen Wünschen angepasst werden, um die Eingabeaufforderung so minimal oder funktionsreich zu gestalten, wie Du es möchtest. footer: ICS lizenziert | Copyright © 2019-heute Starship-Mitwirkende #Used for the description meta tag, for SEO metaTitle: "Starship: Cross-Shell Prompt" -description: Starship ist eine minimale, super schnelle, und extrem anpassbare Prompt für jede Shell! Sie zeigt die Information, die man benötigt an, während sie schnell und minimal bleibt. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and PowerShell. +description: Starship ist eine minimale, super schnelle, und extrem anpassbare Prompt für jede Shell! Sie zeigt die Information, die man benötigt an, während sie schnell und minimal bleibt. Schnell-Installation verfügbar für Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, und PowerShell. ---

@@ -30,7 +30,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P ### Voraussetzungen -- Eine [Nerd Font](https://www.nerdfonts.com/) installiert und aktiviert in Ihrem Terminal. +- Eine [Nerd Font](https://www.nerdfonts.com/) installiert und aktiviert in deinem Terminal. ### Schnellinstallation @@ -45,7 +45,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P curl -sS https://starship.rs/install.sh | sh ``` - Um Starship selbst zu aktualisieren, lasse das Skript oben nochmal laufen. Es wird die vorhandene Version ersetzen, ohne die Konfiguration von Starship zu berühren. + Um Starship selbst zu aktualisieren, führe das Skript oben erneut aus. Die vorhandene Version wird ersetzt, ohne das deine Konfiguration von Starship verloren geht. #### Installation mithilfe eines Paket-Managers @@ -55,18 +55,18 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P ```sh brew install starship ``` - With [Winget](https://github.com/microsoft/winget-cli): + Mit [Winget](https://github.com/microsoft/winget-cli): ```powershell winget install starship ``` -1. Führe den init Befehl zum Start der Shell aus: +1. Füge das init-Skript zur Konfigurationsdatei deiner Shell hinzu: #### Bash - Füge dies ans Ende von `~/.bashrc`: + Trage folgendes am Ende der `~/.bashrc` ein: ```sh # ~/.bashrc @@ -88,7 +88,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P #### Zsh - Füge dies ans Ende von `~/.zshrc`: + Trage folgendes am Ende der `~/.zshrc` ein: ```sh # ~/.zshrc @@ -99,7 +99,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P #### Powershell - Füge das folgende zum Ende von `Microsoft.PowerShell_profile.ps1` hinzu. Sie können den Speicherort dieser Datei überprüfen, indem Sie die `$PROFILE` Variable in PowerShell abfragen. Normalerweise ist der Pfad `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` oder `~/.config/powershell/Microsoft.PowerShell_profile.ps1` auf -Nix. + Trage das folgende am Ende von `Microsoft.PowerShell_profile.ps1` ein. Du kannst den Speicherort dieser Datei überprüfen, indem du die `$PROFILE` Variable in PowerShell abfragst. Der Pfat lautet normalerweise `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` unter Windows und `~/.config/powershell/Microsoft.PowerShell_profile.ps1` auf -Nix. ```sh Invoke-Expression (&starship init powershell) @@ -121,7 +121,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P ::: warning - Only elvish v0.18 or higher is supported. + Es wird nur elvish v0.18 oder höher unterstützt. ::: @@ -149,17 +149,17 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P ::: warning - This will change in the future. Only Nushell v0.61+ is supported. + Das wird sich in Zukunft ändern. Nur Nushell v0.61+ wird unterstützt. ::: - Add the following to to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell): + Füge folgendes an das Ende deiner Nushell env Datei hinzu (du findest diese, indem du folgenden Befehl in Nushell ausführst `$nu.env-path`): ```sh mkdir ~/.cache/starship starship init nu | save ~/.cache/starship/init.nu ``` - And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`): + Und füge folgendes am Ende deiner Nushell-Konfiguration hinzu (du findest diese, indem du folgenden Befehl in Nushell ausführst `$nu.config-path`): ```sh source ~/.cache/starship/init.nu @@ -178,7 +178,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P #### ⌘ Cmd - You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: + Du musst [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) mit Cmd verwenden. Trage folgendes in eine neue Datei namens `starship.lua` hinzu und lege diese Datei im Clink Scripts Verzeichnis ab: ```lua -- starship.lua diff --git a/docs/de-DE/advanced-config/README.md b/docs/de-DE/advanced-config/README.md index f07d4e06..bc1de8bb 100644 --- a/docs/de-DE/advanced-config/README.md +++ b/docs/de-DE/advanced-config/README.md @@ -205,7 +205,9 @@ Some shells support a right prompt which renders on the same line as the input. Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](/config/#fill). -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. + +Note: Nushell 0.71.0 or later is required ### Beispiel @@ -280,5 +282,5 @@ Wenn mehrere Farben für Vordergrund oder Hintergrund angegeben werden, hat die Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: - Many terminals disable support for `blink` by default -- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564). +- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). - `strikethrough` is not supported by the default macOS Terminal.app diff --git a/docs/de-DE/config/README.md b/docs/de-DE/config/README.md index 75de94f6..e1ad49c0 100644 --- a/docs/de-DE/config/README.md +++ b/docs/de-DE/config/README.md @@ -15,15 +15,17 @@ Die gesamte Konfiguration von Starship erfolgt in dieser [TOML](https://github.c # Inserts a blank line between shell prompts add_newline = true -# Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +# 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 ``` +### Config File Location + Die voreingestellte Konfigurations-Datei kann mit der `STARSHIP_CONFIG` Umgebungsvariable verändert werden. Hier z. Bsp. für die BASH shell, hinzuzufügen zur ~/. bashrc: ```sh @@ -70,6 +72,62 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') Die meisten Module haben einen Präfix der standardmäßigen terminal-Farbe (z.B. `via` in "nodejs") und ein Leerzeichen als Suffix. +### Strings + +In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. + +The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. + +| Symbol | Type | Notes | +| ------ | ------------------------- | ------------------------------------------------------ | +| `'` | literal string | less escaping | +| `"` | string | more escaping | +| `'''` | multi-line literal string | less escaping | +| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | + +Hier sind ein paar Beispiele: + +```toml +# literal string +format = '☺\☻ ' + +# regular string +format = "☺\\☻ " + +# escaping Starship symbols +format = '\[\$\] ' +``` + +When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: + +```toml +# with literal string +format = ''' + +\$''' + +# with multiline basic string +format = """ + +\\$""" + +# with basic string +format = "\n\\$" +``` + +In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. + +```toml +format = """ +line1\ +line1\ +line1 +line2\ +line2\ +line2 +""" +``` + ### Formatierte Strings Formatierte Strings sind das Format, mit dem ein Modul all seine Variablen ausgibt. Die meisten Module haben den Eintrag `format`, welcher das anzeige-Format des Moduls konfiguriert. Du kannst Texte, Variablen und Textgruppen in einem formatierten string benutzen. @@ -80,9 +138,9 @@ Eine Variable besteht aus dem `$` Symbol und dem Namen der Variable. The name of Hier sind ein paar Beispiele: -- `$version` ist ein formatierter string mit dem Namen `version`. -- `$git_branch$git_commit` ist ein formatierter string mit zwei Variablen, nämlich `git_branch` und `git_commit`. -- `$git_branch $git_commit` hat die zwei Variablen mit einem Leerzeichen getrennt. +- `'$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. #### Textgruppe @@ -94,20 +152,20 @@ Der zweite Teil ist innerhalb normaler Klammern `()` und ist ein[style string](# Hier sind ein paar Beispiele: -- `[on](red bold)` wird einen string `on` mit fettgedrucktem roten Text ausgeben. -- `[⌘ $version](bold green)` wird ein Symbol `⌘` gefolgt von dem Inhalt der Variable `version` mit fettgedrucktem grünen Text ausgeben. -- `[a [b](red) c](green)` wird `a b c` ausgeben, wobei `b` rot ist und `a` und `c` grün sind. +- `'[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 -Die meisten Module in Starship lassen dich den Darstellungsstil verändern. Dies passiert meistens an einem bestimmten Eintrag (gewöhnlich `style` genannt), der einen String mit den Einstellungen darstellt. Es folgen ein paar Beispiele für solche Strings zusammen mit Beschreibungen was sie bewirken. Details zur vollen Syntax findest du im [Erweiterten Konfigurationshandbuch](/advanced-config/). +Die meisten Module in Starship lassen dich den Darstellungsstil verändern. Dies passiert meistens an einem bestimmten Eintrag (gewöhnlich `style` genannt), der einen String mit den Einstellungen darstellt. Es folgen ein paar Beispiele für solche Strings zusammen der mit Beschreibungen, was sie bewirken. Details zur vollen Syntax findest du im [Erweiterten Konfigurationshandbuch](/advanced-config/). -- `"fg:green bg:blue"` setzt grünen Text auf einem blauen Hintergrund -- `"bg:blue fg:bright-green"` setzt hell-grünen Text auf einen blauen Hintergrund -- `"bold fg:27"` setzt färbt fettgedruckten Text in die [ANSI Farbe](https://i.stack.imgur.com/KTSQa.png) 27 -- `"underline bg:#bf5700"` setzt unterstrichenen Text auf einen orangenen Hintergrund -- `"bold italic fg:purple"` setzt lilane fett-kursive Schrift -- `""` deaktiviert explizit jeden Stil +- `'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 Wie genau sich diese Konfiguration auswirkt liegt an deinem Terminal-Emulator. Einige Emulatoren zum Beispiel werden die Farben erhellen statt Text dick zu machen, und ein paar Farbthemen benutzen dieselben Werte für normale und helle Farben. Für kursiven Text muss dein Terminal Kursivschrift unterstützen. @@ -117,43 +175,20 @@ Ein Formatierungszeichenkette (string) in `(` and `)` eingeklammert wird nicht a Hier sind ein paar Beispiele: -- `(@$region)` ist die Variable `region` undefiniert (`None`) oder eine leere Zeichenkette (`""`) dann wird nichts angezeigt, ansonsten <0>@ gefolgt von dem Inhalt der Variablen. -- `(some text)` zeigt nichts an, weil der Text in Klammern keine Variablen enthält. -- Wenn `$all` eine Abkürzung für `\[$a$b\]` ist, dann zeigt `($all)` nur nichts an wenn `$a` and `$b` beide undefiniert (`None`) sind. Dasselbe passiert mit `(\[$a$b\] )`. - -#### Spezielle Zeichen - -Die folgenden Zeichen habe eine spezielle Bedeutung in Formatstrings und müssen durch einen vorangestellten Backslash '\' besonders markiert werden (escaped): `$ \ [ ] ( )`. - -Wichtig: TOML hat sowohl Basis-Zeichenketten (basic strings, eingeschlossen in " ") und literale Zeichenketten (literal strings, eingeschlossenin ' '). Empfehlung ist nur literale Zeichenketten (in ' ') in der Konfigurationsdatei zu verwenden. Wenn man Basis-Zeichenketten (in " ") verwenden will, dann muss man den Backslash mit einem Backslash markieren (d.h. '\\' verwenden). - -Die folgenden Bespiele für eine Formatierungszeichenkette sind gleich, wenn man ein `$` Symbol in einer neuen Zeile ausgeben will: - -```toml -# with basic string -format = "\n\\$" - -# with multiline basic string -format = """ - -\\$""" - -# with literal string -format = ''' - -\$''' -``` +- `'(@$region)'` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. +- `'(some text)'` will always show nothing since there are no variables wrapped in the braces. +- When `$combined` is a shortcut for `\[$a$b\]`, `'($combined)'` will show nothing only if `$a` and `$b` are both `None`. This works the same as `'(\[$a$b\] )'`. ### Negative matching -Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched. +Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading '!' character. The presence of _any_ negative indicator in the directory will result in the module not being matched. Extensions are matched against both the characters after the last dot in a filename, and the characters after the first dot in a filename. For example, `foo.bar.tar.gz` will be matched against `bar.tar.gz` and `gz` in the `detect_extensions` variable. Files whose name begins with a dot are not considered to have extensions at all. To see how this works in practice, you could match TypeScript but not MPEG Transport Stream files thus: ```toml -detect_extensions = ["ts", "!video.ts", "!audio.ts"] +detect_extensions = ['ts', '!video.ts', '!audio.ts'] ``` ## Prompt @@ -165,11 +200,11 @@ Dies ist eine Liste mit Prompt-weiten Konfigurationsoptionen. | Option | Standardwert | Beschreibung | | ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `format` | [link](#default-prompt-format) | Das Aussehen des Prompts festlegen. | -| `right_format` | `""` | Sieh [Enable Right Prompt](/advanced-config/#enable-right-prompt) | +| `right_format` | `''` | Sieh [Enable Right Prompt](/advanced-config/#enable-right-prompt) | | `scan_timeout` | `30` | Timeout für das Scannen von Dateien (in Millisekunden). | | `command_timeout` | `500` | Maximale Zeit für von Starship ausgeführte Kommandos. | | `add_newline` | `true` | Fügt leere Zeilen zwischen Shell Prompts ein. | -| `palette` | `""` | Sets which color palette from `palettes` to use. | +| `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | ### Beispiel @@ -177,27 +212,27 @@ Dies ist eine Liste mit Prompt-weiten Konfigurationsoptionen. ```toml # ~/.config/starship.toml -# Verwende benutzerdefiniertes Format -format = """ +# Use custom format +format = ''' [┌───────────────────>](bold green) [│](bold green)$directory$rust$package -[└─>](bold green) """ +[└─>](bold green) ''' -# Warte 10 Millisekunden damit Starship die Dateien im aktuellen Ordner überprüfen kann. +# Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 # Disable the blank line at the start of the prompt add_newline = false -# Set "foo" as custom color palette -palette = "foo" +# Set 'foo' as custom color palette +palette = 'foo' # Define custom colors [palettes.foo] # Overwrite existing color -blue = "21" +blue = '21' # Define new color -mustard = "#af8700" +mustard = '#af8700' ``` ### Vordefiniertes Aussehen des Prompts @@ -205,7 +240,7 @@ mustard = "#af8700" The default `format` is used to define the format of the prompt, if empty or no `format` is provided. Die Standardwerte sind folgende: ```toml -format = "$all" +format = '$all' # Which is equivalent to format = """ @@ -236,7 +271,9 @@ $elixir\ $elm\ $erlang\ $golang\ +$guix_shell\ $haskell\ +$haxe\ $helm\ $java\ $julia\ @@ -245,6 +282,7 @@ $lua\ $nim\ $nodejs\ $ocaml\ +$opa\ $perl\ $php\ $pulumi\ @@ -281,6 +319,7 @@ $jobs\ $battery\ $time\ $status\ +$os\ $container\ $shell\ $character""" @@ -290,7 +329,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format = "$all$directory$character" +format = '$all$directory$character' ``` ## AWS @@ -305,15 +344,17 @@ When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. +When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. + ### Optionen | Option | Standardwert | Beschreibung | | ------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | Das Format für das Modul. | -| `symbol` | `"☁️ "` | Symbol das vor dem aktuellen AWS-Profil angezeigt wird. | -| `region_aliases` | | Tabelle der Regionaliasen, die zusätzlich zum AWS-Namen angezeigt werden sollen. | -| `profile_aliases` | | Table of profile aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | Stil für dieses Modul. | +| `symbol` | `'☁️ '` | Symbol das vor dem aktuellen AWS-Profil angezeigt wird. | +| `region_aliases` | `{}` | Tabelle der Regionaliasen, die zusätzlich zum AWS-Namen angezeigt werden sollen. | +| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | +| `style` | `'bold yellow'` | Stil für dieses Modul. | | `expiration_symbol` | `X` | Das Symbol, das angezeigt wird, wenn die temporären Anmeldeinformationen abgelaufen sind. | | `disabled` | `false` | Deaktiviert das `aws`-Modul. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -339,11 +380,11 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL [aws] format = 'on [$symbol($profile )(\($region\) )]($style)' -style = "bold blue" -symbol = "🅰 " +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' [aws.profile_aliases] CompanyGroupFrobozzOnCallAccess = 'Frobozz' ``` @@ -354,12 +395,12 @@ CompanyGroupFrobozzOnCallAccess = 'Frobozz' # ~/.config/starship.toml [aws] -format = "on [$symbol$region]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$region]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' ``` #### Profil anzeigen @@ -368,34 +409,48 @@ us-east-1 = "va" # ~/.config/starship.toml [aws] -format = "on [$symbol$profile]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$profile]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.profile_aliases] Enterprise_Naming_Scheme-voidstars = 'void**' ``` ## Azure -The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription, as defined in the `~/.azure/azureProfile.json` file. +The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription or the username, as defined in the `~/.azure/azureProfile.json` file. ### Optionen | Variable | Standardwert | Beschreibung | | ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `"on [$symbol($subscription)]($style) "` | The format for the Azure module to render. | -| `symbol` | `"ﴃ "` | The symbol used in the format. | -| `style` | `"blue bold"` | The style used in the format. | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'ﴃ '` | The symbol used in the format. | +| `style` | `'blue bold'` | The style used in the format. | | `disabled` | `true` | Disables the `azure` module. | -### Beispiel +### Beispiele + +#### Display Subscription Name ```toml # ~/.config/starship.toml [azure] disabled = false -format = "on [$symbol($subscription)]($style) " +format = 'on [$symbol($subscription)]($style) ' +symbol = 'ﴃ ' +style = 'blue bold' +``` + +#### Display Username + +```toml +# ~/.config/starship.toml + +[azure] +disabled = false +format = "on [$symbol($username)]($style) " symbol = "ﴃ " style = "blue bold" ``` @@ -408,12 +463,12 @@ Das `battery` Modul zeigt, wie hoch der Akku des Geräts geladen ist und den akt | Option | Standardwert | 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` | `" "` | Das Symbol, das angezeigt wird, wenn der Batteriezustand unbekannt ist. | -| `empty_symbol` | `" "` | Das Symbol, das angezeigt wird, wenn die Batterie leer ist. | -| `format` | `"[$symbol$percentage]($style) "` | Das Format für das Modul. | +| `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` | `' '` | Das Symbol, das angezeigt wird, wenn der Batteriezustand unbekannt ist. | +| `empty_symbol` | `' '` | Das Symbol, das angezeigt wird, wenn die Batterie leer ist. | +| `format` | `'[$symbol$percentage]($style) '` | Das Format für das Modul. | | `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. | @@ -423,9 +478,9 @@ Das `battery` Modul zeigt, wie hoch der Akku des Geräts geladen ist und den akt # ~/.config/starship.toml [battery] -full_symbol = "🔋 " -charging_symbol = "⚡️ " -discharging_symbol = "💀 " +full_symbol = '🔋 ' +charging_symbol = '⚡️ ' +discharging_symbol = '💀 ' ``` ### Anzeige des Akkustandes @@ -435,7 +490,7 @@ The `display` configuration option is used to define when the battery indicator ```toml [[battery.display]] threshold = 10 -style = "bold red" +style = 'bold red' ``` The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. @@ -447,21 +502,21 @@ Die `display`-Option beinhaltet ein Array mit den folgenden Werten. | Option | Standardwert | Beschreibung | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | | `threshold` | `10` | Der Schwellenwert zur Anzeige dieser Option. | -| `style` | `"red bold"` | Der Stil, der zur Anzeige dieser Option verwendet wird. | +| `style` | `'red bold'` | Der Stil, der zur Anzeige dieser Option verwendet wird. | | `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. | | `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. | #### Beispiel ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% threshold = 10 -style = "bold red" +style = 'bold red' -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% threshold = 30 -style = "bold yellow" -discharging_symbol = "💦" +style = 'bold yellow' +discharging_symbol = '💦' # when capacity is over 30%, the battery indicator will not be displayed ``` @@ -477,13 +532,13 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil | Option | Standardwert | Beschreibung | | ------------------- | ----------------------------------------------- | ----------------------------------------------------- | -| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. | -| `version_format` | `"v${raw}"` | The version format. | -| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. | +| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. | +| `version_format` | `'v${raw}'` | The version format. | +| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | -| `style` | `"bold blue"` | Stil für dieses Modul. | +| `style` | `'bold blue'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `elixir` module. | ### Variables @@ -502,7 +557,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil # ~/.config/starship.toml [buf] -symbol = "🦬 " +symbol = '🦬 ' ``` ## Bun @@ -516,13 +571,13 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🍞 "` | A format string representing the symbol of Node.js. | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["bun.lockb", "bunfig.toml"]` | Which filenames should trigger this module. | +| `detect_files` | `['bun.lockb', 'bunfig.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | Stil für dieses Modul. | +| `style` | `'bold red'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `bun` module. | ### Variables @@ -541,7 +596,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. # ~/.config/starship.toml [bun] -format = "via [🍔 $version](bold green) " +format = 'via [🍔 $version](bold green) ' ``` ## C @@ -552,14 +607,14 @@ The `c` module shows some information about your C compiler. By default the modu | Option | Standardwert | Beschreibung | | ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version(-$name) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"C "` | The symbol used before displaying the compiler details | -| `detect_extensions` | `["c", "h"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ "cc", "--version" ], [ "gcc", "--version" ], [ "clang", "--version" ] ] | How to detect what the compiler is | -| `style` | `"bold 149"` | Stil für dieses Modul. | +| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | +| `style` | `'bold 149'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `c` module. | ### Variables @@ -577,7 +632,7 @@ NB that `version` is not in the default format. The `commands` option accepts a list of commands to determine the compiler version and name. -Each command is represented as a list of the executable name, followed by its arguments, usually something like `["mycc", "--version"]`. Starship will try executing each command until it gets a result on STDOUT. +Each command is represented as a list of the executable name, followed by its arguments, usually something like `['mycc', '--version']`. Starship will try executing each command until it gets a result on STDOUT. If a C compiler is not supported by this module, you can request it by [raising an issue on GitHub](https://github.com/starship/starship/). @@ -587,7 +642,7 @@ If a C compiler is not supported by this module, you can request it by [raising # ~/.config/starship.toml [c] -format = "via [$name $version]($style)" +format = 'via [$name $version]($style)' ``` ## Zeichen @@ -611,13 +666,13 @@ By default it only changes color. If you also want to change its shape take a lo | Option | Standardwert | Beschreibung | | --------------------------- | -------------------- | --------------------------------------------------------------------------------------- | -| `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. | -| `vimcmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | -| `vimcmd_replace_one_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim `replace_one` mode. | -| `vimcmd_replace_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim replace mode. | -| `vimcmd_visual_symbol` | `"[❮](bold yellow)"` | The format string used before the text input if the shell is in vim replace mode. | +| `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. | +| `vimcmd_symbol` | `'[❮](bold green)'` | The format string used before the text input if the shell is in vim normal mode. | +| `vimcmd_replace_one_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim `replace_one` mode. | +| `vimcmd_replace_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim replace mode. | +| `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | | `disabled` | `false` | Deaktiviert das `character`-Modul. | ### Variables @@ -634,8 +689,8 @@ By default it only changes color. If you also want to change its shape take a lo # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[✗](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[✗](bold red) ' ``` #### Without custom error shape @@ -644,8 +699,8 @@ error_symbol = "[✗](bold red) " # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[➜](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[➜](bold red) ' ``` #### With custom vim shape @@ -654,7 +709,7 @@ error_symbol = "[➜](bold red) " # ~/.config/starship.toml [character] -vicmd_symbol = "[V](bold green) " +vicmd_symbol = '[V](bold green) ' ``` ## CMake @@ -668,13 +723,13 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | Option | Standardwert | Beschreibung | | ------------------- | -------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"△ "` | The symbol used before the version of cmake. | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'△ '` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this module | -| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | +| `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | -| `style` | `"bold blue"` | Stil für dieses Modul. | +| `style` | `'bold blue'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -698,11 +753,11 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold blue"` | Stil für dieses Modul. | -| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Which extensions should trigger this module. | +| `symbol` | `'⚙️ '` | The symbol used before displaying the version of COBOL. | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold blue'` | Stil für dieses Modul. | +| `detect_extensions` | `['cbl', 'cob', 'CBL', 'COB']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `cobol` module. | @@ -719,7 +774,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t ## 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 <0>cmd_duration angezeigt wird. +Das `cmd_duration` Modul zeigt an wie lange der letzte Befehl ausgeführt wurde. Das Modul wird nur angezeigt wenn der letzte Befehl länger als zwei Sekunden ausgeführt wurde. Mit der `min_time` Option kann die Zeit eingestellt werden ab der `cmd_duration` angezeigt wird. ::: warning Nicht die DEBUG-trap in der Bash hooken @@ -735,8 +790,8 @@ Bash Nutzer, die eine "preexec" ähnliche Funktion benötigen, können [rcaloras | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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) "` | Das Format für das Modul. | -| `style` | `"bold yellow"` | Stil für dieses Modul. | +| `format` | `'took [$duration]($style) '` | Das Format für das Modul. | +| `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). | @@ -758,7 +813,7 @@ Bash Nutzer, die eine "preexec" ähnliche Funktion benötigen, können [rcaloras [cmd_duration] min_time = 500 -format = "underwent [$duration](bold yellow)" +format = 'underwent [$duration](bold yellow)' ``` ## Conda @@ -776,9 +831,9 @@ Hinweis: Dies unterdrückt nicht conda's eigenen Prompt-Modifikator, sie können | 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` | `"via [$symbol$environment]($style) "` | Das Format für das Modul. | +| `symbol` | `'🅒 '` | Symbol das vor dem Umgebungsnamen angezeigt wird. | +| `style` | `'bold green'` | Stil für dieses Modul. | +| `format` | `'via [$symbol$environment]($style) '` | Das Format für das Modul. | | `ignore_base` | `true` | Ignores `base` environment when activated. | | `disabled` | `false` | Deaktiviert das `conda`-Modul. | @@ -798,7 +853,7 @@ Hinweis: Dies unterdrückt nicht conda's eigenen Prompt-Modifikator, sie können # ~/.config/starship.toml [conda] -format = "[$symbol$environment](dimmed green) " +format = '[$symbol$environment](dimmed green) ' ``` ## Container @@ -809,8 +864,8 @@ The `container` module displays a symbol and container name, if inside a contain | Option | Standardwert | Beschreibung | | ---------- | ---------------------------------- | ----------------------------------------- | -| `symbol` | `"⬢"` | The symbol shown, when inside a container | -| `style` | `"bold red dimmed"` | Stil für dieses Modul. | +| `symbol` | `'⬢'` | The symbol shown, when inside a container | +| `style` | `'bold red dimmed'` | Stil für dieses Modul. | | `format` | `'[$symbol \[$name\]]($style) '` | Das Format für das Modul. | | `disabled` | `false` | Disables the `container` module. | @@ -844,12 +899,12 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold red"` | Stil für dieses Modul. | -| `detect_extensions` | `["cr"]` | Which extensions should trigger this module. | -| `detect_files` | `["shard.yml"]` | Which filenames should trigger this module. | +| `symbol` | `'🔮 '` | The symbol used before displaying the version of crystal. | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold red'` | Stil für dieses Modul. | +| `detect_extensions` | `['cr']` | Which extensions should trigger this module. | +| `detect_files` | `['shard.yml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `crystal` module. | @@ -869,7 +924,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// # ~/.config/starship.toml [crystal] -format = "via [✨ $version](bold blue) " +format = 'via [✨ $version](bold blue) ' ``` ## Daml @@ -882,12 +937,12 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"Λ "` | A format string representing the symbol of Daml | -| `style` | `"bold cyan"` | Stil für dieses Modul. | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'Λ '` | A format string representing the symbol of Daml | +| `style` | `'bold cyan'` | Stil für dieses Modul. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['daml.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `daml` module. | @@ -907,7 +962,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d # ~/.config/starship.toml [daml] -format = "via [D $version](bold bright-green) " +format = 'via [D $version](bold bright-green) ' ``` ## Dart @@ -922,13 +977,13 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `detect_extensions` | `["dart"]` | Which extensions should trigger this module. | -| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".dart_tool"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | Stil für dieses Modul. | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🎯 '` | A format string representing the symbol of Dart | +| `detect_extensions` | `['dart']` | Which extensions should trigger this module. | +| `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | Which filenames should trigger this module. | +| `detect_folders` | `['.dart_tool']` | Which folders should trigger this module. | +| `style` | `'bold blue'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -947,7 +1002,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d # ~/.config/starship.toml [dart] -format = "via [🔰 $version](bold red) " +format = 'via [🔰 $version](bold red) ' ``` ## Deno @@ -960,13 +1015,13 @@ The `deno` module shows you your currently installed version of [Deno](https://d | Option | Standardwert | Beschreibung | | ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦕 "` | A format string representing the symbol of Deno | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦕 '` | A format string representing the symbol of Deno | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["deno.json", "deno.jsonc", "mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. | +| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"green bold"` | Stil für dieses Modul. | +| `style` | `'green bold'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `deno` module. | ### Variables @@ -983,7 +1038,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d # ~/.config/starship.toml [deno] -format = "via [🦕 $version](green bold) " +format = 'via [🦕 $version](green bold) ' ``` ## Verzeichnis @@ -996,20 +1051,21 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Optionen -| Option | Standardwert | Beschreibung | -| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | Die Anzahl der übergeordneten Ordner, die angezeigt werden. | -| `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) "` | Das Format für das Modul. | -| `style` | `"bold cyan"` | Stil für dieses Modul. | -| `disabled` | `false` | Deaktiviert das `directory`-Modul. | -| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | -| `read_only_style` | `"red"` | The style for the read only symbol. | -| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | -| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | -| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) | +| Option | Standardwert | Beschreibung | +| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | Die Anzahl der übergeordneten Ordner, die angezeigt werden. | +| `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) '` | Das Format für das Modul. | +| `style` | `'bold cyan'` | Stil für dieses Modul. | +| `disabled` | `false` | Deaktiviert das `directory`-Modul. | +| `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: '…/' | +| `before_repo_root_style` | | The style for the path segment above the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `'[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) '` | The format of a git repo when `before_repo_root_style` and `repo_root_style` is defined. | +| `home_symbol` | `'~'` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
Dieses Modul hat einige erweiterte Konfigurationsoptionen, welche die Darstellung von Verzeichnissen steuern. @@ -1024,8 +1080,8 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ```toml [directory.substitutions] -"/Volumes/network/path" = "/net" -"src/com/long/java/path" = "mypath" +'/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`. @@ -1036,8 +1092,8 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | Variable | Beispiel | Beschreibung | | --------- | --------------------- | ------------------------------------ | -| path | `"D:/Projects"` | The current directory path | -| style\* | `"black bold dimmed"` | Spiegelt den Wert der Option `style` | +| path | `'D:/Projects'` | The current directory path | +| style\* | `'black bold dimmed'` | Spiegelt den Wert der Option `style` | *: This variable can only be used as a part of a style string @@ -1048,11 +1104,11 @@ Let us consider the path `/path/to/home/git_repo/src/lib` | Variable | Beispiel | Beschreibung | | ------------------ | --------------------- | --------------------------------------- | -| before_root_path | `"/path/to/home/"` | The path before git root directory path | -| repo_root | `"git_repo"` | The git root directory name | -| path | `"/src/lib"` | The remaining path | -| style | `"black bold dimmed"` | Spiegelt den Wert der Option `style` | -| repo_root_style | `"underline white"` | Style for git root directory name | +| before_root_path | `'/path/to/home/'` | The path before git root directory path | +| repo_root | `'git_repo'` | The git root directory name | +| path | `'/src/lib'` | The remaining path | +| style | `'black bold dimmed'` | Spiegelt den Wert der Option `style` | +| repo_root_style | `'underline white'` | Style for git root directory name |
@@ -1063,7 +1119,7 @@ Let us consider the path `/path/to/home/git_repo/src/lib` [directory] truncation_length = 8 -truncation_symbol = "…/" +truncation_symbol = '…/' ``` ## Docker Context @@ -1074,13 +1130,13 @@ The `docker_context` module shows the currently active [Docker context](https:// | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | Das Format für das Modul. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `format` | `'via [$symbol$context]($style) '` | Das Format für das Modul. | +| `symbol` | `'🐳 '` | The symbol used before displaying the Docker context. | | `only_with_files` | `true` | Only show when there's a match | | `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | +| `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | Which filenames should trigger this module (needs `only_with_files` to be true). | | `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | -| `style` | `"blue bold"` | Stil für dieses Modul. | +| `style` | `'blue bold'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -1099,7 +1155,7 @@ The `docker_context` module shows the currently active [Docker context](https:// # ~/.config/starship.toml [docker_context] -format = "via [🐋 $context](blue bold)" +format = 'via [🐋 $context](blue bold)' ``` ## Dotnet @@ -1127,14 +1183,14 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$var_cluster" +'dev.local.cluster.k8s' = 'dev' +'.*/openshift-cluster/.*' = 'openshift' +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' [kubernetes.user_aliases] -"dev.local.cluster.k8s" = "dev" -"root/.*" = "root" +'dev.local.cluster.k8s' = 'dev' +'root/.*' = 'root' ``` Only show the module in directories that contain a `k8s` file. @@ -2121,14 +2249,14 @@ Long and automatically generated cluster names can be identified and shortened u ```toml [kubernetes.context_aliases] # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -".*/openshift-cluster/.*" = "openshift" +'.*/openshift-cluster/.*' = 'openshift' # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$var_cluster" +'.*/(?P[\\w-]+)/.*' = '$var_cluster' # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' ``` ## Zeilenumbruch @@ -2159,8 +2287,8 @@ The `localip` module shows the IPv4 address of the primary network interface. | Option | Standardwert | Beschreibung | | ---------- | ------------------------- | ------------------------------------------------------ | | `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | Das Format für das Modul. | -| `style` | `"bold yellow"` | Stil für dieses Modul. | +| `format` | `'[$localipv4]($style) '` | Das Format für das Modul. | +| `style` | `'bold yellow'` | Stil für dieses Modul. | | `disabled` | `true` | Disables the `localip` module. | ### Variables @@ -2179,7 +2307,7 @@ The `localip` module shows the IPv4 address of the primary network interface. [localip] ssh_only = false -format = "@[$localipv4](bold red) " +format = '@[$localipv4](bold red) ' disabled = false ``` @@ -2195,14 +2323,14 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | -------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | -| `detect_extensions` | `["lua"]` | Which extensions should trigger this module. | -| `detect_files` | `[".lua-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["lua"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | Stil für dieses Modul. | -| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🌙 '` | A format string representing the symbol of Lua. | +| `detect_extensions` | `['lua']` | Which extensions should trigger this module. | +| `detect_files` | `['.lua-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['lua']` | Which folders should trigger this module. | +| `style` | `'bold blue'` | Stil für dieses Modul. | +| `lua_binary` | `'lua'` | Configures the lua binary that Starship executes when getting the version. | | `disabled` | `false` | Disables the `lua` module. | ### Variables @@ -2221,7 +2349,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o # ~/.config/starship.toml [lua] -format = "via [🌕 $version](bold blue) " +format = 'via [🌕 $version](bold blue) ' ``` ## Speicherauslastung @@ -2241,9 +2369,9 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis | Option | Standardwert | Beschreibung | | ----------- | ----------------------------------------------- | --------------------------------------------------------------------- | | `threshold` | `75` | Speicherauslastung ausblenden, wenn sie unter diesem Prozentsatz ist. | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | Das Format für das Modul. | -| `symbol` | `"🐏"` | Symbol das vor der Speicherauslastung angezeigt wird. | -| `style` | `"bold dimmed white"` | Stil für dieses Modul. | +| `format` | `'via $symbol [${ram}( \| ${swap})]($style) '` | Das Format für das Modul. | +| `symbol` | `'🐏'` | Symbol das vor der Speicherauslastung angezeigt wird. | +| `style` | `'bold dimmed white'` | Stil für dieses Modul. | | `disabled` | `true` | Deaktiviert das `memory_usage`-Modul. | ### Variables @@ -2267,8 +2395,8 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis [memory_usage] disabled = false threshold = -1 -symbol = " " -style = "bold dimmed green" +symbol = ' ' +style = 'bold dimmed green' ``` ## Meson @@ -2282,10 +2410,10 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. | Option | Standardwert | Beschreibung | | ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- | | `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | -| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. | -| `format` | `"via [$symbol$project]($style) "` | Das Format für das Modul. | -| `symbol` | `"⬢ "` | The symbol used before displaying the project name. | -| `style` | `"blue bold"` | Stil für dieses Modul. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | +| `format` | `'via [$symbol$project]($style) '` | Das Format für das Modul. | +| `symbol` | `'⬢ '` | The symbol used before displaying the project name. | +| `style` | `'blue bold'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `meson` module. | ### Variables @@ -2305,9 +2433,9 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. [meson] disabled = false -truncation_symbol = "--" -symbol = " " -style = "bold dimmed green" +truncation_symbol = '--' +symbol = ' ' +style = 'bold dimmed green' ``` ## Mercurial Branch @@ -2318,11 +2446,11 @@ The `hg_branch` module shows the active branch of the repo in your current direc | Option | Standardwert | Beschreibung | | ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | -| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | -| `style` | `"bold purple"` | Stil für dieses Modul. | -| `format` | `"on [$symbol$branch]($style) "` | Das Format für das Modul. | +| `symbol` | `' '` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `style` | `'bold purple'` | Stil für dieses Modul. | +| `format` | `'on [$symbol$branch]($style) '` | Das Format für das Modul. | | `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | -| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a branch name was truncated. | | `disabled` | `true` | Disables the `hg_branch` module. | ### Variables @@ -2341,9 +2469,9 @@ The `hg_branch` module shows the active branch of the repo in your current direc # ~/.config/starship.toml [hg_branch] -format = "on [🌱 $branch](bold purple)" +format = 'on [🌱 $branch](bold purple)' truncation_length = 4 -truncation_symbol = "" +truncation_symbol = '' ``` ## Nim @@ -2359,13 +2487,13 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | -| `detect_extensions` | `["nim", "nims", "nimble"]` | Which extensions should trigger this module. | -| `detect_files` | `["nim.cfg"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'👑 '` | The symbol used before displaying the version of Nim. | +| `detect_extensions` | `['nim', 'nims', 'nimble']` | Which extensions should trigger this module. | +| `detect_files` | `['nim.cfg']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | Stil für dieses Modul. | +| `style` | `'bold yellow'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `nim` module. | ### Variables @@ -2384,8 +2512,8 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang # ~/.config/starship.toml [nim] -style = "yellow" -symbol = "🎣 " +style = 'yellow' +symbol = '🎣 ' ``` ## Nix-Shell @@ -2397,10 +2525,10 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | Option | Standardwert | Beschreibung | | ------------ | ---------------------------------------------- | ----------------------------------------------------- | | `format` | `'via [$symbol$state( \($name\))]($style) '` | Das Format für das Modul. | -| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | -| `style` | `"bold blue"` | Stil für dieses Modul. | -| `impure_msg` | `"impure"` | A format string shown when the shell is impure. | -| `pure_msg` | `"pure"` | A format string shown when the shell is pure. | +| `symbol` | `'❄️ '` | A format string representing the symbol of nix-shell. | +| `style` | `'bold blue'` | Stil für dieses Modul. | +| `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` | Deaktiviert das `nix_shell`-Modul. | ### Variables @@ -2421,8 +2549,8 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ [nix_shell] disabled = true -impure_msg = "[impure shell](bold red)" -pure_msg = "[pure shell](bold green)" +impure_msg = '[impure shell](bold red)' +pure_msg = '[pure shell](bold green)' format = 'via [☃️ $state( \($name\))](bold blue) ' ``` @@ -2441,13 +2569,13 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string representing the symbol of Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts", "mts", "cts"]` | Which extensions should trigger this module. | -| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | -| `style` | `"bold green"` | Stil für dieses Modul. | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string representing the symbol of Node.js. | +| `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Which extensions should trigger this module. | +| `detect_files` | `['package.json', '.node-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['node_modules']` | Which folders should trigger this module. | +| `style` | `'bold green'` | Stil für dieses Modul. | | `disabled` | `false` | Deaktiviert das `nodejs`-Modul. | | `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | @@ -2467,7 +2595,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n # ~/.config/starship.toml [nodejs] -format = "via [🤖 $version](bold green) " +format = 'via [🤖 $version](bold green) ' ``` ## OCaml @@ -2485,15 +2613,15 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | Option | Standardwert | Beschreibung | | ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | -| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | -| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | -| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Which extensions should trigger this module. | -| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Which filenames should trigger this module. | -| `detect_folders` | `["_opam", "esy.lock"]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | Stil für dieses Modul. | +| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐫 '` | The symbol used before displaying the version of OCaml. | +| `global_switch_indicator` | `''` | The format string used to represent global OPAM switch. | +| `local_switch_indicator` | `'*'` | The format string used to represent local OPAM switch. | +| `detect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | Which extensions should trigger this module. | +| `detect_files` | `['dune', 'dune-project', 'jbuild', 'jbuild-ignore', '.merlin']` | Which filenames should trigger this module. | +| `detect_folders` | `['_opam', 'esy.lock']` | Which folders should trigger this module. | +| `style` | `'bold yellow'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `ocaml` module. | ### Variables @@ -2514,7 +2642,43 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam # ~/.config/starship.toml [ocaml] -format = "via [🐪 $version]($style) " +format = 'via [🐪 $version]($style) ' +``` + +## Open Policy Agent + +The `opa` module shows the currently installed version of the OPA tool. By default the module will be shown if the current directory contains a `.rego` file. + +### Optionen + +| Option | Standardwert | Beschreibung | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | +| `detect_extensions` | `['rego']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'bold blue'` | Stil für dieses Modul. | +| `disabled` | `false` | Disables the `opa` module. | + +### Variables + +| Variable | Beispiel | Beschreibung | +| --------- | --------- | ------------------------------------- | +| version | `v0.44.0` | The version of `opa` | +| symbol | | Spiegelt den Wert der Option `symbol` | +| style\* | | Spiegelt den Wert der Option `style` | + +*: This variable can only be used as a part of a style string + +### Beispiel + +```toml +# ~/.config/starship.toml + +[opa] +format = 'via [⛑️ $version](bold red) ' ``` ## OpenStack @@ -2526,8 +2690,8 @@ The `openstack` module shows the current OpenStack cloud and project. The module | Option | Standardwert | Beschreibung | | ---------- | ----------------------------------------------- | -------------------------------------------------------------- | | `format` | `'on [$symbol$cloud(\($project\))]($style) '` | Das Format für das Modul. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | -| `style` | `"bold yellow"` | Stil für dieses Modul. | +| `symbol` | `'☁️ '` | The symbol used before displaying the current OpenStack cloud. | +| `style` | `'bold yellow'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `openstack` module. | ### Variables @@ -2548,8 +2712,105 @@ The `openstack` module shows the current OpenStack cloud and project. The module [openstack] format = 'on [$symbol$cloud(\($project\))]($style) ' -style = "bold yellow" -symbol = "☁️ " +style = 'bold yellow' +symbol = '☁️ ' +``` + +## OS + +The `os` module shows the current operating system. OS information is detected via the [os_info](https://lib.rs/crates/os_info) crate. + +::: warning + +The [os_info](https://lib.rs/crates/os_info) crate used by this module is known to be inaccurate on some systems. + +::: + +::: tip + +Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren. + +::: + +### Optionen + +| Option | Standardwert | Beschreibung | +| ---------- | --------------------- | ------------------------------------------------------ | +| `format` | `"[$symbol]($style)"` | Das Format für das Modul. | +| `style` | `"bold white"` | Stil für dieses Modul. | +| `disabled` | `true` | Disables the `os` module. | +| `symbols` | | A table that maps each operating system to its symbol. | + +`symbols` allows you to define arbitrary symbols to display for each operating system type. Operating system types not defined by your configuration use the default symbols table below. All operating systems currently supported by the module are listed below. If you would like an operating system to be added, feel free to open a [feature request](https://github.com/starship/starship/issues/new/choose). + +```toml +# This is the default symbols table. +[os.symbols] +Alpine = "🏔️ " +Amazon = "🙂 " +Android = "🤖 " +Arch = "🎗️ " +CentOS = "💠 " +Debian = "🌀 " +DragonFly = "🐉 " +Emscripten = "🔗 " +EndeavourOS = "🚀 " +Fedora = "🎩 " +FreeBSD = "😈 " +Garuda = "🦅 " +Gentoo = "🗜️ " +HardenedBSD = "🛡️ " +Illumos = "🐦 " +Linux = "🐧 " +Macos = "🍎 " +Manjaro = "🥭 " +Mariner = "🌊 " +MidnightBSD = "🌘 " +Mint = "🌿 " +NetBSD = "🚩 " +NixOS = "❄️ " +OpenBSD = "🐡 " +openSUSE = "🦎 " +OracleLinux = "🦴 " +Pop = "🍭 " +Raspbian = "🍓 " +Redhat = "🎩 " +RedHatEnterprise = "🎩 " +Redox = "🧪 " +Solus = "⛵ " +SUSE = "🦎 " +Ubuntu = "🎯 " +Unknown = "❓ " +Windows = "🪟 " +``` + +### Variables + +| Variable | Beispiel | Beschreibung | +| --------- | ------------ | ------------------------------------------------------------------ | +| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | +| name | `Arch Linux` | The current operating system name | +| type | `Arch` | The current operating system type | +| codename | | The current operating system codename, if applicable | +| edition | | The current operating system edition, if applicable | +| version | | The current operating system version, if applicable | +| style\* | | Spiegelt den Wert der Option `style` | + +*: This variable can only be used as a part of a style string + +### Beispiel + +```toml +# ~/.config/starship.toml + +[os] +format = "on [($name )]($style)" +style = "bold blue" +disabled = false + +[os.symbols] +Windows = " " +Arch = "Arch is the best! " ``` ## Paketversion @@ -2580,10 +2841,10 @@ Das `Package` Modul wird angezeigt, wenn das aktuelle Verzeichnis das Repository | Option | Standardwert | Beschreibung | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"is [$symbol$version]($style) "` | Das Format für das Modul. | -| `symbol` | `"📦 "` | Symbol das vor der Paketversion angezeigt wird. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold 208"` | Stil für dieses Modul. | +| `format` | `'is [$symbol$version]($style) '` | Das Format für das Modul. | +| `symbol` | `'📦 '` | Symbol das vor der Paketversion angezeigt wird. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold 208'` | Stil für dieses Modul. | | `display_private` | `false` | Enable displaying version for packages marked as private. | | `disabled` | `false` | Deaktiviert das `package`-Modul. | @@ -2603,7 +2864,7 @@ Das `Package` Modul wird angezeigt, wenn das aktuelle Verzeichnis das Repository # ~/.config/starship.toml [package] -format = "via [🎁 $version](208 bold) " +format = 'via [🎁 $version](208 bold) ' ``` ## Perl @@ -2620,13 +2881,13 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe | Option | Standardwert | Beschreibung | | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | -| `detect_extensions` | `["pl", "pm", "pod"]` | Which extensions should trigger this module. | -| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | +| `detect_extensions` | `['pl', 'pm', 'pod']` | Which extensions should trigger this module. | +| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | Stil für dieses Modul. | +| `style` | `'bold 149'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `perl` module. | ### Variables @@ -2643,14 +2904,14 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe # ~/.config/starship.toml [perl] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## PHP The `php` module shows the currently installed version of [PHP](https://www.php.net/). By default the module will be shown if any of the following conditions are met: -- Das aktuelle Verzeichnis enthält eine `composer.json`-Datei +- The current directory contains a `composer.json` file - The current directory contains a `.php-version` file - The current directory contains a `.php` extension @@ -2658,13 +2919,13 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | Symbol das vor der PHP-Version angezeigt wird. | -| `detect_extensions` | `["php"]` | Which extensions should trigger this module. | -| `detect_files` | `["composer.json", ".php-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐘 '` | Symbol das vor der PHP-Version angezeigt wird. | +| `detect_extensions` | `['php']` | Which extensions should trigger this module. | +| `detect_files` | `['composer.json', '.php-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"147 bold"` | Stil für dieses Modul. | +| `style` | `'147 bold'` | Stil für dieses Modul. | | `disabled` | `false` | Deaktiviert das `php`-Modul. | ### Variables @@ -2683,7 +2944,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. # ~/.config/starship.toml [php] -format = "via [🔹 $version](147 bold) " +format = 'via [🔹 $version](147 bold) ' ``` ## Pulumi @@ -2705,10 +2966,10 @@ By default the module will be shown if any of the following conditions are met: | Option | Standardwert | Beschreibung | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string shown before the Pulumi stack. | -| `style` | `"bold 5"` | Stil für dieses Modul. | +| `format` | `'via [$symbol($username@)$stack]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string shown before the Pulumi stack. | +| `style` | `'bold 5'` | Stil für dieses Modul. | | `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | | `disabled` | `false` | Disables the `pulumi` module. | @@ -2732,7 +2993,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [pulumi] -format = "[🛥 ($version )$stack]($style) " +format = '[🛥 ($version )$stack]($style) ' ``` #### Without Pulumi version @@ -2740,8 +3001,8 @@ format = "[🛥 ($version )$stack]($style) " ```toml # ~/.config/starship.toml [pulumi] -symbol = "🛥 " -format = "[$symbol$stack]($style) " +symbol = '🛥 ' +format = '[$symbol$stack]($style) ' ``` ## PureScript @@ -2755,13 +3016,13 @@ The `purescript` module shows the currently installed version of [PureScript](ht | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | -| `detect_extensions` | `["purs"]` | Which extensions should trigger this module. | -| `detect_files` | `["spago.dhall"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'<=> '` | The symbol used before displaying the version of PureScript. | +| `detect_extensions` | `['purs']` | Which extensions should trigger this module. | +| `detect_files` | `['spago.dhall']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold white"` | Stil für dieses Modul. | +| `style` | `'bold white'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -2780,7 +3041,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht # ~/.config/starship.toml [purescript] -format = "via [$symbol$version](bold white)" +format = 'via [$symbol$version](bold white)' ``` ## Python @@ -2806,14 +3067,14 @@ By default the module will be shown if any of the following conditions are met: | Option | Standardwert | Beschreibung | | -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | | `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | Stil für dieses Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐍 '` | A format string representing the symbol of Python | +| `style` | `'yellow bold'` | Stil für dieses Modul. | | `pyenv_version_name` | `false` | Verwende `pyenv` um die Python-Versionzu beziehen. | | `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | -| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `detect_extensions` | `["py"]` | Which extensions should trigger this module | -| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module | +| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | +| `detect_extensions` | `['py']` | Which extensions should trigger this module | +| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | | `disabled` | `false` | Deaktiviert das `python`-Modul. | @@ -2821,7 +3082,7 @@ By default the module will be shown if any of the following conditions are met: 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. +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. ::: @@ -2829,11 +3090,11 @@ The default values and order for `python_binary` was chosen to first identify th | Variable | Beispiel | Beschreibung | | ------------ | --------------- | ------------------------------------------ | -| version | `"v3.8.1"` | The version of `python` | -| symbol | `"🐍 "` | Spiegelt den Wert der Option `symbol` | -| style | `"yellow bold"` | Spiegelt den Wert der Option `style` | -| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | -| virtualenv | `"venv"` | The current `virtualenv` name | +| version | `'v3.8.1'` | The version of `python` | +| symbol | `'🐍 '` | Spiegelt den Wert der Option `symbol` | +| style | `'yellow bold'` | Spiegelt den Wert der Option `style` | +| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` | +| virtualenv | `'venv'` | The current `virtualenv` name | ### Beispiel @@ -2841,7 +3102,7 @@ The default values and order for `python_binary` was chosen to first identify th # ~/.config/starship.toml [python] -symbol = "👾 " +symbol = '👾 ' pyenv_version_name = true ``` @@ -2850,7 +3111,7 @@ pyenv_version_name = true [python] # Only use the `python3` binary to get the version. -python_binary = "python3" +python_binary = 'python3' ``` ```toml @@ -2869,7 +3130,7 @@ detect_extensions = [] # # Note this will only work when the venv is inside the project and it will only # work in the directory that contains the venv dir but maybe this is ok? -python_binary = ["./venv/bin/python", "python", "python3", "python2"] +python_binary = ['./venv/bin/python', 'python', 'python3', 'python2'] ``` ## R @@ -2888,13 +3149,13 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"📐"` | A format string representing the symbol of R. | -| `style` | `"blue bold"` | Stil für dieses Modul. | -| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module | -| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module | -| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'📐'` | A format string representing the symbol of R. | +| `style` | `'blue bold'` | Stil für dieses Modul. | +| `detect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | Which extensions should trigger this module | +| `detect_files` | `['.Rprofile']` | Which filenames should trigger this module | +| `detect_folders` | `['.Rproj.user']` | Which folders should trigger this module | | `disabled` | `false` | Disables the `r` module. | ### Variables @@ -2903,7 +3164,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | -------- | ------------- | ------------------------------------- | | version | `v4.0.5` | The version of `R` | | symbol | | Spiegelt den Wert der Option `symbol` | -| style | `"blue bold"` | Spiegelt den Wert der Option `style` | +| style | `'blue bold'` | Spiegelt den Wert der Option `style` | ### Beispiel @@ -2911,7 +3172,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr # ~/.config/starship.toml [rlang] -format = "with [📐 $version](blue bold) " +format = 'with [📐 $version](blue bold) ' ``` ## Raku @@ -2925,13 +3186,13 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version-$vm_version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦋 "` | The symbol used before displaying the version of Raku | -| `detect_extensions` | `["p6", "pm6", "pod6", "raku", "rakumod"]` | Which extensions should trigger this module. | -| `detect_files` | `["META6.json"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version-$vm_version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦋 '` | The symbol used before displaying the version of Raku | +| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Which extensions should trigger this module. | +| `detect_files` | `['META6.json']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | Stil für dieses Modul. | +| `style` | `'bold 149'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `raku` module. | ### Variables @@ -2949,12 +3210,12 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra # ~/.config/starship.toml [raku] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## Red -By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: +By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: - The current directory contains a file with `.red` or `.reds` extension @@ -2962,13 +3223,13 @@ By default the `red` module shows the currently installed version of [Red](https | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | -| `detect_extensions` | `["red"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🔺 '` | A format string representing the symbol of Red. | +| `detect_extensions` | `['red']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"red bold"` | Stil für dieses Modul. | +| `style` | `'red bold'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `red` module. | ### Variables @@ -2987,12 +3248,12 @@ By default the `red` module shows the currently installed version of [Red](https # ~/.config/starship.toml [red] -symbol = "🔴 " +symbol = '🔴 ' ``` ## Ruby -By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: +By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: - Das aktuelle Verzeichnis enthält eine `Gemfile`-Datei - The current directory contains a `.ruby-version` file @@ -3005,14 +3266,14 @@ Starship gets the current Ruby version by running `ruby -v`. | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. | -| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💎 '` | A format string representing the symbol of Ruby. | +| `detect_extensions` | `['rb']` | Which extensions should trigger this module. | +| `detect_files` | `['Gemfile', '.ruby-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | -| `style` | `"bold red"` | Stil für dieses Modul. | +| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Which environment variables should trigger this module. | +| `style` | `'bold red'` | Stil für dieses Modul. | | `disabled` | `false` | Deaktiviert das `ruby`-Modul. | ### Variables @@ -3031,12 +3292,12 @@ Starship gets the current Ruby version by running `ruby -v`. # ~/.config/starship.toml [ruby] -symbol = "🔺 " +symbol = '🔺 ' ``` ## Rust -By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: +By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: - Das aktuelle Verzeichnis enthält eine `Cargo.toml`-Datei - Das aktuelle Verzeichnis enthält eine Datei mit der `.rs`-Erweiterung @@ -3045,13 +3306,13 @@ By default the `rust` module shows the currently installed version of [Rust](htt | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. | -| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦀 '` | A format string representing the symbol of Rust | +| `detect_extensions` | `['rs']` | Which extensions should trigger this module. | +| `detect_files` | `['Cargo.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | Stil für dieses Modul. | +| `style` | `'bold red'` | Stil für dieses Modul. | | `disabled` | `false` | Deaktiviert das `rust`-Modul. | ### Variables @@ -3072,7 +3333,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt # ~/.config/starship.toml [rust] -format = "via [⚙️ $version](red bold)" +format = 'via [⚙️ $version](red bold)' ``` ## Scala @@ -3087,13 +3348,13 @@ The `scala` module shows the currently installed version of [Scala](https://www. | Option | Standardwert | Beschreibung | | ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [${symbol}(${version} )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | -| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | -| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | -| `style` | `"red dimmed"` | Stil für dieses Modul. | +| `format` | `'via [${symbol}(${version} )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. | +| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. | +| `detect_folders` | `['.metals']` | Which folders should trigger this modules. | +| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. | +| `style` | `'red dimmed'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `scala` module. | ### Variables @@ -3112,7 +3373,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. # ~/.config/starship.toml [scala] -symbol = "🌟 " +symbol = '🌟 ' ``` ## Shell @@ -3129,19 +3390,19 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis | Option | Standardwert | Beschreibung | | ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `"bsh"` | A format string used to represent bash. | -| `fish_indicator` | `"fsh"` | A format string used to represent fish. | -| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. | -| `powershell_indicator` | `"psh"` | A format string used to represent powershell. | -| `ion_indicator` | `"ion"` | A format string used to represent ion. | -| `elvish_indicator` | `"esh"` | A format string used to represent elvish. | -| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. | -| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. | -| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. | -| `nu_indicator` | `"nu"` | A format string used to represent nu. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `"[$indicator]($style) "` | Das Format für das Modul. | -| `style` | `"white bold"` | Stil für dieses Modul. | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | Das Format für das Modul. | +| `style` | `'white bold'` | Stil für dieses Modul. | | `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3159,26 +3420,26 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis # ~/.config/starship.toml [shell] -fish_indicator = "" -powershell_indicator = "_" -unknown_indicator = "mystery shell" -style = "cyan bold" +fish_indicator = '' +powershell_indicator = '_' +unknown_indicator = 'mystery shell' +style = 'cyan bold' disabled = false ``` ## SHLVL -The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ('shell level') environment variable, if it is set to a number and meets or exceeds the specified threshold. ### Optionen | Option | Standardwert | Beschreibung | | ----------- | ---------------------------- | ------------------------------------------------------------- | | `threshold` | `2` | Display threshold. | -| `format` | `"[$symbol$shlvl]($style) "` | Das Format für das Modul. | -| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. | +| `format` | `'[$symbol$shlvl]($style) '` | Das Format für das Modul. | +| `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. | +| `style` | `'bold yellow'` | Stil für dieses Modul. | | `disabled` | `true` | Disables the `shlvl` module. | ### Variables @@ -3198,7 +3459,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int [shlvl] disabled = false -format = "$shlvl level(s) down" +format = '$shlvl level(s) down' threshold = 3 ``` @@ -3211,8 +3472,8 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | Option | Standardwert | Beschreibung | | ---------- | -------------------------------- | ------------------------------------------------ | | `format` | `'[$symbol\[$env\]]($style) '` | Das Format für das Modul. | -| `symbol` | `""` | A format string displayed before the image name. | -| `style` | `"bold dimmed blue"` | Stil für dieses Modul. | +| `symbol` | `''` | A format string displayed before the image name. | +| `style` | `'bold dimmed blue'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `singularity` module. | ### Variables @@ -3243,9 +3504,9 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | Option | Standardwert | Beschreibung | | ------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | The number of directories the environment path should be truncated to. `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 blue"` | Stil für dieses Modul. | -| `format` | `"via [$symbol$environment]($style) "` | Das Format für das Modul. | +| `symbol` | `'🅢 '` | Symbol das vor dem Umgebungsnamen angezeigt wird. | +| `style` | `'bold blue'` | Stil für dieses Modul. | +| `format` | `'via [$symbol$environment]($style) '` | Das Format für das Modul. | | `disabled` | `false` | Disables the `spack` module. | ### Variables @@ -3264,7 +3525,7 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat # ~/.config/starship.toml [spack] -format = "[$symbol$environment](dimmed blue) " +format = '[$symbol$environment](dimmed blue) ' ``` ## Status @@ -3281,14 +3542,14 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis | Option | Standardwert | Beschreibung | | --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `format` | `"[$symbol$status]($style) "` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `success_symbol` | `""` | The symbol displayed on program success | -| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | -| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | -| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | -| `style` | `"bold red"` | Stil für dieses Modul. | +| `format` | `'[$symbol$status]($style) '` | The format of the module | +| `symbol` | `'❌'` | The symbol displayed on program error | +| `success_symbol` | `''` | The symbol displayed on program success | +| `not_executable_symbol` | `'🚫'` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `'🔍'` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `'🧱'` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `'⚡'` | The symbol displayed on any signal | +| `style` | `'bold red'` | Stil für dieses Modul. | | `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code | | `pipestatus` | `false` | Enable pipestatus reporting | @@ -3320,9 +3581,9 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis # ~/.config/starship.toml [status] -style = "bg:blue" -symbol = "🔴 " -success_symbol = "🟢 SUCCESS" +style = 'bg:blue' +symbol = '🔴 ' +success_symbol = '🟢 SUCCESS' format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false @@ -3342,9 +3603,9 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis | Option | Standardwert | Beschreibung | | --------------- | ------------------------ | ------------------------------------------------------- | -| `format` | `"[as $symbol]($style)"` | The format of the module | -| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached | -| `style` | `"bold blue"` | Stil für dieses Modul. | +| `format` | `'[as $symbol]($style)'` | The format of the module | +| `symbol` | `'🧙 '` | The symbol displayed when credentials are cached | +| `style` | `'bold blue'` | Stil für dieses Modul. | | `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | | `disabled` | `true` | Disables the `sudo` module. | @@ -3363,8 +3624,8 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis # ~/.config/starship.toml [sudo] -style = "bold green" -symbol = "👩‍💻 " +style = 'bold green' +symbol = '👩‍💻 ' disabled = false ``` @@ -3379,7 +3640,7 @@ disabled = false ## Swift -By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: +By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: - The current directory contains a `Package.swift` file - The current directory contains a file with the `.swift` extension @@ -3388,13 +3649,13 @@ By default the `swift` module shows the currently installed version of [Swift](h | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `detect_extensions` | `["swift"]` | Which extensions should trigger this module. | -| `detect_files` | `["Package.swift"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐦 '` | A format string representing the symbol of Swift | +| `detect_extensions` | `['swift']` | Which extensions should trigger this module. | +| `detect_files` | `['Package.swift']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 202"` | Stil für dieses Modul. | +| `style` | `'bold 202'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -3413,7 +3674,7 @@ By default the `swift` module shows the currently installed version of [Swift](h # ~/.config/starship.toml [swift] -format = "via [🏎 $version](red bold)" +format = 'via [🏎 $version](red bold)' ``` ## Terraform @@ -3435,13 +3696,13 @@ By default the module will be shown if any of the following conditions are met: | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol$workspace]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💠'` | A format string shown before the terraform workspace. | +| `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | -| `style` | `"bold 105"` | Stil für dieses Modul. | +| `detect_folders` | `['.terraform']` | Which folders should trigger this module. | +| `style` | `'bold 105'` | Stil für dieses Modul. | | `disabled` | `false` | Deaktiviert das `terraform` Modul. | ### Variables @@ -3463,7 +3724,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [terraform] -format = "[🏎💨 $version$workspace]($style) " +format = '[🏎💨 $version$workspace]($style) ' ``` #### Without Terraform version @@ -3472,7 +3733,7 @@ format = "[🏎💨 $version$workspace]($style) " # ~/.config/starship.toml [terraform] -format = "[🏎💨 $workspace]($style) " +format = '[🏎💨 $workspace]($style) ' ``` ## Uhrzeit @@ -3489,15 +3750,15 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis | Option | Standardwert | Beschreibung | | ----------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `format` | `"at [$time]($style) "` | The format string for the module. | +| `format` | `'at [$time]($style) '` | The format string for the module. | | `use_12hr` | `false` | Aktiviert 12-Stunden-Format | | `time_format` | siehe unten | Das Format zum Anzeigen der Uhrzeit in [chrono-Formatierung](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html). | -| `style` | `"bold yellow"` | Stil für dieses Modul | -| `utc_time_offset` | `"local"` | Verwendetes Zeitzonen-Offset. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. | +| `style` | `'bold yellow'` | Stil für dieses Modul | +| `utc_time_offset` | `'local'` | Verwendetes Zeitzonen-Offset. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. | | `disabled` | `true` | Deaktiviert das `time`-Modul. | -| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | +| `time_range` | `'-'` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | -If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Andernfalls ist es standardmäßig `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. +If `use_12hr` is `true`, then `time_format` defaults to `'%r'`. Otherwise, it defaults to `'%T'`. Manually setting `time_format` will override the `use_12hr` setting. ### Variables @@ -3516,19 +3777,19 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Andernfalls ist [time] disabled = false format = '🕙[\[ $time \]]($style) ' -time_format = "%T" -utc_time_offset = "-5" -time_range = "10:00:00-14:00:00" +time_format = '%T' +utc_time_offset = '-5' +time_range = '10:00:00-14:00:00' ``` ## Username -Das `username` Modul zeigt den Namen des aktiven Benutzers. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: +Das `username` Modul zeigt den Namen des aktiven Benutzers. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: - The current user is root/admin -- Der aktuelle Benutzer ist nicht derjenige, der derzeit angemeldet ist -- Der Benutzer ist über eine SSH-Sitzung verbunden -- Die Variale `show_always` ist auf `true` gesetzt +- Der aktuelle Benutzer ist nicht der eingeloggte Benutzer +- Der Benutzer ist aktuell via SSH verbunden +- Die Variable `show_always` ist auf true gesetzt ::: tip @@ -3540,9 +3801,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Option | Standardwert | Beschreibung | | ------------- | ----------------------- | ---------------------------------------------- | -| `style_root` | `"bold red"` | The style used when the user is root/admin. | -| `style_user` | `"bold yellow"` | Stil wenn der Benutzer nicht unter root läuft. | -| `format` | `"[$user]($style) in "` | Das Format für das Modul. | +| `style_root` | `'bold red'` | The style used when the user is root/admin. | +| `style_user` | `'bold yellow'` | Stil wenn der Benutzer nicht unter root läuft. | +| `format` | `'[$user]($style) in '` | Das Format für das Modul. | | `show_always` | `false` | Immer das `username` Modul anzeigen. | | `disabled` | `false` | Deavktiviert das `username` Modul. | @@ -3550,8 +3811,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Variable | Beispiel | Beschreibung | | -------- | ------------ | ------------------------------------------------------------------------------------------- | -| `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. | +| `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. | ### Beispiel @@ -3559,9 +3820,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` # ~/.config/starship.toml [username] -style_user = "white bold" -style_root = "black bold" -format = "user: [$user]($style) " +style_user = 'white bold' +style_root = 'black bold' +format = 'user: [$user]($style) ' disabled = false show_always = true ``` @@ -3576,13 +3837,13 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'⍱ '` | A format string representing the symbol of Vagrant. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["Vagrantfile"]` | Which filenames should trigger this module. | +| `detect_files` | `['Vagrantfile']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"cyan bold"` | Stil für dieses Modul. | +| `style` | `'cyan bold'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `vagrant` module. | ### Variables @@ -3601,7 +3862,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// # ~/.config/starship.toml [vagrant] -format = "via [⍱ $version](bold white) " +format = 'via [⍱ $version](bold white) ' ``` ## V @@ -3615,13 +3876,13 @@ The `vlang` module shows you your currently installed version of [V](https://vla | Option | Standardwert | Beschreibung | | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"V "` | A format string representing the symbol of V | -| `detect_extensions` | `["v"]` | Which extensions should trigger this module. | -| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'V '` | A format string representing the symbol of V | +| `detect_extensions` | `['v']` | Which extensions should trigger this module. | +| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"blue bold"` | Stil für dieses Modul. | +| `style` | `'blue bold'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `vlang` module. | ### Variables @@ -3637,7 +3898,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla ```toml # ~/.config/starship.toml [vlang] -format = "via [V $version](blue bold) " +format = 'via [V $version](blue bold) ' ``` ## VCSH @@ -3648,9 +3909,9 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | Option | Standardwert | Beschreibung | | ---------- | -------------------------------- | ------------------------------------------------------ | -| `symbol` | | The symbol used before displaying the repository name. | -| `style` | `"bold yellow"` | Stil für dieses Modul. | -| `format` | `"vcsh [$symbol$repo]($style) "` | Das Format für das Modul. | +| `symbol` | `''` | The symbol used before displaying the repository name. | +| `style` | `'bold yellow'` | Stil für dieses Modul. | +| `format` | `'vcsh [$symbol$repo]($style) '` | Das Format für das Modul. | | `disabled` | `false` | Disables the `vcsh` module. | ### Variables @@ -3669,12 +3930,12 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v # ~/.config/starship.toml [vcsh] -format = "[🆅 $repo](bold blue) " +format = '[🆅 $repo](bold blue) ' ``` ## Zig -By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: +By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: - The current directory contains a `.zig` file @@ -3682,12 +3943,12 @@ By default the the `zig` module shows the currently installed version of [Zig](h | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | Stil für dieses Modul. | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'↯ '` | The symbol used before displaying the version of Zig. | +| `style` | `'bold yellow'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `zig` module. | -| `detect_extensions` | `["zig"]` | Which extensions should trigger this module. | +| `detect_extensions` | `['zig']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -3707,7 +3968,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h # ~/.config/starship.toml [zig] -symbol = "⚡️ " +symbol = '⚡️ ' ``` ## Custom commands @@ -3752,16 +4013,16 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `command` | `''` | The command whose output should be printed. The command will be passed on stdin to the shell. | | `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `beschreibung` | `""` | The description of the module that is shown when running `starship explain`. | +| `beschreibung` | `''` | The description of the module that is shown when running `starship explain`. | | `detect_files` | `[]` | The files that will be searched in the working directory for a match. | | `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. | | `detect_extensions` | `[]` | The extensions that will be searched in the working directory for a match. | -| `symbol` | `""` | The symbol used before displaying the command output. | -| `style` | `"bold green"` | Stil für dieses Modul. | -| `format` | `"[$symbol($output )]($style)"` | Das Format für das Modul. | +| `symbol` | `''` | The symbol used before displaying the command output. | +| `style` | `'bold green'` | Stil für dieses Modul. | +| `format` | `'[$symbol($output )]($style)'` | Das Format für das Modul. | | `disabled` | `false` | Disables this `custom` module. | | `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | | `use_stdin` | | An optional boolean value that overrides whether commands should be forwarded to the shell via the standard input or as an argument. If unset standard input is used by default, unless the shell does not support it (cmd, nushell). Setting this disables shell-specific argument handling. | @@ -3784,14 +4045,14 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt - 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. +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 -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. ```toml -shell = ["pwsh", "-Command", "-"] +shell = ['pwsh', '-Command', '-'] ``` ::: warning Make sure your custom shell configuration exits gracefully @@ -3812,19 +4073,19 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -detect_files = ["foo"] # can specify filters but wildcards are not supported -when = """ test "$HOME" = "$PWD" """ -format = " transcending [$output]($style)" +command = 'echo foo' # shows output of command +detect_files = ['foo'] # can specify filters but wildcards are not supported +when = ''' test "$HOME" = "$PWD" ''' +format = ' transcending [$output]($style)' [custom.time] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command', '-'] [custom.time-as-arg] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command'] use_stdin = false ``` diff --git a/docs/de-DE/guide/README.md b/docs/de-DE/guide/README.md index b4b7b934..4e985237 100644 --- a/docs/de-DE/guide/README.md +++ b/docs/de-DE/guide/README.md @@ -219,7 +219,6 @@ Alternatively, install Starship using any of the following package managers: | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | | Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | -| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | @@ -271,7 +270,7 @@ Konfigurieren deine Shell um Starship zu initialisieren. Wähle dafür deine She
Bash -Füge dies ans Ende von `~/.bashrc`: +Trage folgendes am Ende der `~/.bashrc` ein: ```sh eval "$(starship init bash)" @@ -282,7 +281,7 @@ eval "$(starship init bash)"
⌘ Cmd -You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: +Du musst [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) mit Cmd verwenden. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: ```lua load(io.popen('starship init cmd'):read("*a"))() @@ -335,7 +334,7 @@ mkdir ~/.cache/starship starship init nu | save ~/.cache/starship/init.nu ``` -And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`): +Und füge folgendes am Ende deiner Nushell-Konfiguration hinzu (du findest diese, indem du folgenden Befehl in Nushell ausführst `$nu.config-path`): ```sh source ~/.cache/starship/init.nu @@ -381,7 +380,7 @@ execx($(starship init xonsh))
Zsh -Füge dies ans Ende von `~/.zshrc`: +Trage folgendes am Ende der `~/.zshrc` ein: ```sh eval "$(starship init zsh)" @@ -417,11 +416,19 @@ Checkt bitte diese älteren Projekte, die das Entstehen von Starhip inspiriert h - **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons. +## ❤️ Sponsors + +Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website. + +**Supporter Tier** + +- [Dimension](https://dimension.dev/) +


- Starship Raketen Icon + Starship Raketen-Symbol

## 📝 Lizenz -Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).
Unter der [ISC](https://github.com/starship/starship/blob/master/LICENSE) Lizens. +Copyright © 2019-heute [Starship-Mitwirkende](https://github.com/starship/starship/graphs/contributors).
Dieses Projekt ist [ISC](https://github.com/starship/starship/blob/master/LICENSE) lizenziert. diff --git a/docs/de-DE/installing/README.md b/docs/de-DE/installing/README.md index 351a651b..cdf0ac48 100644 --- a/docs/de-DE/installing/README.md +++ b/docs/de-DE/installing/README.md @@ -2,18 +2,18 @@ Um Starship zu installieren, musst du zwei Dinge tun: -1. Holen Sie sich das **starship** Binary auf Ihren Computer -1. Sagen Sie ihrer Shell, dass sie das Starship-Binary als Prompt benutzt, indem sie die Initialisierungs-Skripte ändern +1. Lade die **starship** Datei auf den Computer herunter +1. Weise deine Shell an die Starship Datei als Eingabeaufforderung zu nutzen, indem du eines der Initialisierungs-Skripte benutzt -Die Anweisungen auf [der Hauptseite](/guide/#🚀-installation) werden für die meisten Benutzer gut funktionieren. Für einige speziellere Plattformen werden jedoch andere Anweisungen benötigt. +Die Anleitung auf [der Hauptseite](/guide/#🚀-installation) wird für die meisten Benutzer ausreichend sein. Für einige speziellere Plattformen wird jedoch eine speziellere Anleitung benötigt. -Es gibt so viele Plattformen, dass sie nicht in das Haupt-README passen, also hier einige Installationsanweisungen für andere Plattformen von der Community. Ist Ihre nicht hier? Bitte fügen Sie es hier hinzu, wenn Sie es herausfinden! +Es gibt sehr viele Plattformen, sodass diese nicht alle in die Hauptanleitung passen, aus diesem Grund sind hier ein paar Installationsanweisungen für ein paar Plattformen von der Community. Ist deine Platform nicht dabei? Dann füge bitte deine hinzu, sobald du herausgefunden hast wie man starship mit dieser benutzt! ## [Chocolatey](https://chocolatey.org) ### Voraussetzungen -Gehen Sie zur [Chocolatey's Installations-Seite](https://chocolatey.org/install) und folge den Anweisungen um Chocolatey zu installieren. +Gehe zur [Chocolatey's Installations-Seite](https://chocolatey.org/install) und folge den Anweisungen um Chocolatey zu installieren. ### Installation @@ -39,7 +39,7 @@ curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir /data/data/com.term ### Installation -On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage: +Unter Funtoo Linux kann starship von [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) über Portage installiert werden: ```sh emerge app-shells/starship @@ -57,13 +57,13 @@ nix-env -iA nixos.starship #### Deklarativ, Einzel-Benutzer, über [home-manager](https://github.com/nix-community/home-manager) -Aktivieren Sie das Modul `programs.starship` in Ihrer `home.nix`-Datei und fügen Sie Ihre Einstellungen hinzu +Aktiviere das Modul `programs.starship` in deiner `home.nix`-Datei und füge deine Einstellungen hinzu ```nix { programs.starship = { enable = true; - # Configuration written to ~/.config/starship.toml + # Konfiguration die nach ~/.config/starship.toml geschrieben wird settings = { # add_newline = false; @@ -78,7 +78,7 @@ Aktivieren Sie das Modul `programs.starship` in Ihrer `home.nix`-Datei und füge } ``` -und führen Sie dann folgendes aus +führe danach folgendes aus ```sh home-manager switch @@ -86,7 +86,7 @@ home-manager switch #### Deklarativ, systemweit, mit NixOS -Fügen Sie `pkgs.starship` zu `environment.systemPackages` in Ihrer `configuration.nix` hinzu, und führen Sie folgendes aus +Füge `pkgs.starship` zu der Sektion `environment.systemPackages` in deiner `configuration.nix` hinzu, und führe folgenden Befehl aus ```sh sudo nixos-rebuild switch diff --git a/docs/de-DE/presets/README.md b/docs/de-DE/presets/README.md index 6933f974..5bea36f0 100644 --- a/docs/de-DE/presets/README.md +++ b/docs/de-DE/presets/README.md @@ -10,6 +10,14 @@ This preset changes the symbols for each module to use Nerd Font symbols. [![Screenshot of Nerd Font Symbols preset](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font) +## [No Nerd Fonts](./no-nerd-font.md) + +This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt. + +::: tip This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). ::: + +[Click to view No Nerd Font preset](./no-nerd-font) + ## [Bracketed Segments](./bracketed-segments.md) This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.). @@ -28,14 +36,26 @@ This preset hides the version of language runtimes. If you work in containers or [![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes) +## [No Empty Icons](./no-empty-icons.md) + +This preset does not show icons if the toolset is not found. + +[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Click to view No Runtime Versions preset")](./no-empty-icons.md) + ## [Pure Prompt](./pure-preset.md) -This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). +Diese Voreinstellung emuliert das Aussehen und das Verhalten von [Pure](https://github.com/sindresorhus/pure). -[![Screenshot of Pure preset](/presets/img/pure-preset.png "Click to view Pure Prompt preset")](./pure-preset) +[![Screenshot der Pure Voreinstellung](/presets/img/pure-preset.png "Click to view Pure Prompt preset")](./pure-preset) ## [Pastel Powerline](./pastel-powerline.md) This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship. [![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png "Click to view Pure Prompt preset")](./pastel-powerline) + +## [Tokyo Night](./tokyo-night.md) + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) diff --git a/docs/de-DE/presets/bracketed-segments.md b/docs/de-DE/presets/bracketed-segments.md index 26e3980e..453aaf0f 100644 --- a/docs/de-DE/presets/bracketed-segments.md +++ b/docs/de-DE/presets/bracketed-segments.md @@ -1,4 +1,4 @@ -[Return to Presets](./README.md#bracketed-segments) +[Zurück zu den Voreinstellungen](./README.md#bracketed-segments) # Bracketed Segments Preset @@ -12,6 +12,6 @@ This preset changes the format of all the built-in modules to show their segment starship preset bracketed-segments > ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/bracketed-segments.toml) +[Zum Herunterladen der TOML Datei klicken](/presets/toml/bracketed-segments.toml) <<< @/.vuepress/public/presets/toml/bracketed-segments.toml diff --git a/docs/de-DE/presets/nerd-font.md b/docs/de-DE/presets/nerd-font.md index 8cf6c360..e291ebf7 100644 --- a/docs/de-DE/presets/nerd-font.md +++ b/docs/de-DE/presets/nerd-font.md @@ -1,4 +1,4 @@ -[Return to Presets](./README.md#nerd-font-symbols) +[Zurück zu den Voreinstellungen](./README.md#nerd-font-symbols) # Nerd Font Symbols Preset @@ -16,6 +16,6 @@ This preset changes the symbols for each module to use Nerd Font symbols. starship preset nerd-font-symbols > ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/nerd-font-symbols.toml) +[Zum Herunterladen der TOML Datei klicken](/presets/toml/nerd-font-symbols.toml) <<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml diff --git a/docs/de-DE/presets/no-empty-icons.md b/docs/de-DE/presets/no-empty-icons.md new file mode 100644 index 00000000..5244f41d --- /dev/null +++ b/docs/de-DE/presets/no-empty-icons.md @@ -0,0 +1,17 @@ +[Zurück zu den Voreinstellungen](./README.md#no-empty-icons) + +# No Empty Icons Preset + +If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. + +![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) + +### Konfiguration + +```sh +starship preset no-empty-icons > ~/.config/starship.toml +``` + +[Zum Herunterladen der TOML Datei klicken](/presets/toml/no-empty-icons.toml) + +<<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/de-DE/presets/no-nerd-font.md b/docs/de-DE/presets/no-nerd-font.md new file mode 100644 index 00000000..69c7dfbe --- /dev/null +++ b/docs/de-DE/presets/no-nerd-font.md @@ -0,0 +1,19 @@ +[Zurück zu den Voreinstellungen](./README.md#no-nerd-fonts) + +# No Nerd Fonts Preset + +This preset restricts the use of symbols to those from emoji and powerline sets. + +This means that even without a Nerd Font installed, you should be able to view all module symbols. + +This preset will become the default preset in a future release of starship. + +### Konfiguration + +```sh +starship preset no-nerd-font > ~/.config/starship.toml +``` + +[Zum Herunterladen der TOML Datei klicken](/presets/toml/no-nerd-font.toml) + +<<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/de-DE/presets/no-runtimes.md b/docs/de-DE/presets/no-runtimes.md index d18faeae..2f359d75 100644 --- a/docs/de-DE/presets/no-runtimes.md +++ b/docs/de-DE/presets/no-runtimes.md @@ -1,4 +1,4 @@ -[Return to Presets](./README.md#no-runtime-versions) +[Zurück zu den Voreinstellungen](./README.md#no-runtime-versions) # No Runtime Versions Preset @@ -12,6 +12,6 @@ This preset hides the version of language runtimes. If you work in containers or starship preset no-runtime-versions > ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/no-runtime-versions.toml) +[Zum Herunterladen der TOML Datei klicken](/presets/toml/no-runtime-versions.toml) <<< @/.vuepress/public/presets/toml/no-runtime-versions.toml diff --git a/docs/de-DE/presets/pastel-powerline.md b/docs/de-DE/presets/pastel-powerline.md index 21e0ae32..39297f4d 100644 --- a/docs/de-DE/presets/pastel-powerline.md +++ b/docs/de-DE/presets/pastel-powerline.md @@ -1,4 +1,4 @@ -[Return to Presets](./README.md#pastel-powerline) +[Zurück zu den Voreinstellungen](./README.md#pastel-powerline) # Pastel Powerline Preset @@ -16,6 +16,6 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m starship preset pastel-powerline > ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/pastel-powerline.toml) +[Zum Herunterladen der TOML Datei klicken](/presets/toml/pastel-powerline.toml) <<< @/.vuepress/public/presets/toml/pastel-powerline.toml diff --git a/docs/de-DE/presets/plain-text.md b/docs/de-DE/presets/plain-text.md index 09f07c1b..fdcc1f71 100644 --- a/docs/de-DE/presets/plain-text.md +++ b/docs/de-DE/presets/plain-text.md @@ -1,4 +1,4 @@ -[Return to Presets](./README.md#plain-text-symbols) +[Zurück zu den Voreinstellungen](./README.md#plain-text-symbols) ## Plain Text Symbols Preset @@ -12,6 +12,6 @@ This preset changes the symbols for each module into plain text. Great if you do starship preset plain-text-symbols > ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/plain-text-symbols.toml) +[Zum Herunterladen der TOML Datei klicken](/presets/toml/plain-text-symbols.toml) <<< @/.vuepress/public/presets/toml/plain-text-symbols.toml diff --git a/docs/de-DE/presets/pure-preset.md b/docs/de-DE/presets/pure-preset.md index 0c30bee5..2f238459 100644 --- a/docs/de-DE/presets/pure-preset.md +++ b/docs/de-DE/presets/pure-preset.md @@ -1,10 +1,10 @@ -[Return to Presets](./README.md#pure) +[Zurück zu den Voreinstellungen](./README.md#pure) -# Pure Preset +# Pure Voreinstellung -This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). +Diese Voreinstellung emuliert das Aussehen und das Verhalten von [Pure](https://github.com/sindresorhus/pure). -![Screenshot of Pure preset](/presets/img/pure-preset.png) +![Screenshot der Pure Voreinstellung](/presets/img/pure-preset.png) ### Konfiguration @@ -12,6 +12,6 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso starship preset pure-preset > ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/pure-preset.toml) +[Zum Herunterladen der TOML Datei klicken](/presets/toml/pure-preset.toml) <<< @/.vuepress/public/presets/toml/pure-preset.toml diff --git a/docs/de-DE/presets/tokyo-night.md b/docs/de-DE/presets/tokyo-night.md new file mode 100644 index 00000000..9fd57a10 --- /dev/null +++ b/docs/de-DE/presets/tokyo-night.md @@ -0,0 +1,21 @@ +[Zurück zu den Voreinstellungen](./README.md#pastel-powerline) + +# Tokyo Night Preset + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) + +### Voraussetzungen + +- Eine [Nerd Font](https://www.nerdfonts.com/) installiert und aktiviert in deinem Terminal + +### Konfiguration + +```sh +starship preset tokyo-night > ~/.config/starship.toml +``` + +[Zum Herunterladen der TOML Datei klicken](/presets/toml/tokyo-night.toml) + +<<< @/.vuepress/public/presets/toml/tokyo-night.toml diff --git a/docs/es-ES/advanced-config/README.md b/docs/es-ES/advanced-config/README.md index 1bb1a86e..0a100eb5 100644 --- a/docs/es-ES/advanced-config/README.md +++ b/docs/es-ES/advanced-config/README.md @@ -205,7 +205,9 @@ Algunos intérpretes de comandos soportan un prompt derecho que se renderiza en Nota: El prompt derecho es una sola línea siguiendo la ubicación de entrada. Para alinear los módulos arriba de la línea de entrada en un prompt multi-línea, vea el [módulo `fill`](/config/#fill). -`right_format` está actualmente soportado para los siguientes intérpretes de comandos: elvish, fish, zsh, xonsh, cmd. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. + +Note: Nushell 0.71.0 or later is required ### Ejemplo @@ -280,5 +282,5 @@ Si se especifican varios colores para el primer plano/fondo, el último en la ca Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: - Many terminals disable support for `blink` by default -- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564). +- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). - `strikethrough` is not supported by the default macOS Terminal.app diff --git a/docs/es-ES/config/README.md b/docs/es-ES/config/README.md index cbac4983..65d08938 100644 --- a/docs/es-ES/config/README.md +++ b/docs/es-ES/config/README.md @@ -9,21 +9,23 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Toda la configuración de starship se incluye en este fichero [TOML](https://github.com/toml-lang/toml): ```toml -# Obtiene las completaciones del editor basadas en el esquema de configuración +# Get editor completions based on the config schema "$schema" = 'https://starship.rs/config-schema.json' -# Inserta una línea en blanco entre los prompts del intérprete de comandos +# Inserts a blank line between shell prompts add_newline = true -# Reemplaza el símbolo "❯" en el prompt por "➜" -[character] # El nombre del módulo que estamos configurando es "character" -success_symbol = "[➜](bold green)" # El segmento "success_symbol" se está oonfigurando es "➜" con el color "bold green" +# 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' -# Deshabilita el módulo "package", ocultándolo del prompt completamente +# Disable the package module, hiding it from the prompt completely [package] disabled = true ``` +### Config File Location + Puedes cambiar la ubicación por defecto del archivo de configuración con la variable de entorno `STARSHIP_CONFIG`: ```sh @@ -70,6 +72,62 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') 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. +### Strings + +In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. + +The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. + +| Symbol | Type | Notes | +| ------ | ------------------------- | ------------------------------------------------------ | +| `'` | literal string | less escaping | +| `"` | string | more escaping | +| `'''` | multi-line literal string | less escaping | +| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | + +Por ejemplo: + +```toml +# literal string +format = '☺\☻ ' + +# regular string +format = "☺\\☻ " + +# escaping Starship symbols +format = '\[\$\] ' +``` + +When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: + +```toml +# with literal string +format = ''' + +\$''' + +# with multiline basic string +format = """ + +\\$""" + +# with basic string +format = "\n\\$" +``` + +In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. + +```toml +format = """ +line1\ +line1\ +line1 +line2\ +line2\ +line2 +""" +``` + ### Cadenas de Formato Es el formato con el que un módulo imprime todas sus variables. La mayoría de los módulos tienen una entrada llamada `format` que configura el formato de visualización del módulo. Se puede utilizar textos, variables y grupos de texto. @@ -80,36 +138,36 @@ Una variable contiene un símbolo `$` seguido por el nombre de la variable. El n Por ejemplo: -- `$version` es una cadena de formato con una variable llamada `version`. -- `$git_branch$git_commit` es un formato de cadena de texto con dos variables nombradas `git_branch` y `git_commit`. -- `$git_branch $git_commit` tiene las dos variables separadas por un espacio. +- `'$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. #### Grupo de Texto Un grupo de texto se compone de dos partes diferentes. -La primera parte, que está encerrada en un `[]`, es un [formato de cadena de texto](#format-strings). Se puede agregar textos, variables, o incluso grupos de texto anidados. +La primera parte, que está encerrada en un `[]`, es una [cadena de formato](#format-strings). Se puede agregar textos, variables, o incluso grupos de texto anidados. -En la segunda parte, que está encerrada en un `()`, es un [formato de cadena de texto](#style-strings). Esto se puede utilizar para diseñar la primera parte. +En la segunda parte, que está encerrada entre `()`, es una [cadena de estilo](#style-strings). Esto se puede utilizar para diseñar la primera parte. Por ejemplo: -- `[en](bold red)` imprimirá una cadena `en` con texto en negrita color rojo. -- `[⌘ $version](bold green)` imprimirá un símbolo `⌘` seguido por el contenido de la variable `version`, con texto en negrita color verde. -- `[a [b](red) c](green)` imprimirá `a b c` con `b` en rojo, `a` y `c` en verde. +- `'[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. #### Cadenas de Estilo -La mayoría de los módulos de starship permiten configurar los estilos de su cadenas texto. Esto se consigue con una entrada (normalmente llamada `style` - estilo) que no es más que un texto donde se especifica la configuración. A continuación mostramos algunos ejemplos de textos estilados junto con su funcionalidad. Para más detalles sobre la sintaxis completa, consulta [la guía de configuración avanzada](/advanced-config/). +La mayoría de los módulos de starship permiten configurar sus estilos de visualización. Esto se consigue con una entrada (normalmente llamada `style`) que no es más que un texto donde se especifica la configuración. A continuación mostramos algunos ejemplos de cadenas de estilo junto con su funcionalidad. Para más detalles sobre la sintaxis completa, consultar [la guía de configuración avanzada](/advanced-config/). -- `"fg:green bg:blue"` pone texto verde sobre un fondo azul -- `"bg:blue fg:bright-green"` pone texto verde claro sobre un fondo azul -- `"bold fg:27"` pone texto en negrita con [color ANSI](https://i.stack.imgur.com/KTSQa.png) 27 -- `"underline bg:#bf5700"` subraya el texto sobre un fondo naranja oscuro -- `"bold italic fg:purple"` pone texto color morado, en negrita y cursiva -- `""` desactiva explícitamente cualquier estilo +- `'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 -Nótese que el estilo es similar a como se controlaría por el emulador de su terminal. Por ejemplo, algunos emuladores de terminal harán los colores más brillantes en lugar de más gruesos, y algunos temas usan los mismos valores para texto normal y colores brillantes. Además, para mostrar textos en cursiva tu terminal debe tener soporte para hacerlo. +Nótese que el estilo es similar a como se controlaría por el emulador de terminal. Por ejemplo, algunos emuladores de terminal harán los colores más brillantes en lugar de más gruesos, y algunos temas de colores usan los mismos valores para texto normal y colores brillantes. Además, para mostrar textos en cursiva tu terminal debe tener soporte para hacerlo. #### Cadenas de Formato Condicional @@ -117,96 +175,72 @@ Una cadena de formato condicional envuelto en `(` y `)` no se renderizará si to Por ejemplo: -- `(@$region)` no mostrará nada si la variable `region` es `None` o una cadena vacía, de lo contrario `@` seguido por el valor de la región. -- `(algún texto)` siempre mostrará nada ya que no hay variables envueltas entre llaves. -- Cuando `$all` es un atajo para `\[$a$b\]`, `($all)` no mostrará nada solo si `$a` y `$b` ambos son `None`. Esto funciona igual que `(\[$a$b\] )`. - -#### Caracteres especiales - -Los siguientes símbolos tienen un uso especial en una cadena de formato y deben ser escapados: `$ \ [ ] ( )`. - -Ten en cuenta que TOML tiene [cadenas de caracteres básicas y cadenas de caracteres literales](https://toml.io/en/v1.0.0#string). Se recomienda usar una cadena de caracteres literal (rodeada de comillas simples) en tu configuración. Si quieres utilizar una cadena de caracteres básica (rodeada de comillas dobles), debes escapar la barra inversa, en sí misma (es decir, utilizar `\\`). - -Por ejemplo, cuando se desea imprimir un símbolo `$` en una nueva línea, las siguientes configuraciones para el `format` son equivalentes: - -```toml -# con cadena básica -format = "\n\\$" - -# con cadena básica multilínea -format = """ - -\\$""" - -# con cadena literal -format = ''' - -\$''' -``` +- `'(@$region)'` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. +- `'(some text)'` will always show nothing since there are no variables wrapped in the braces. +- When `$combined` is a shortcut for `\[$a$b\]`, `'($combined)'` will show nothing only if `$a` and `$b` are both `None`. This works the same as `'(\[$a$b\] )'`. ### Coincidencia negativa -Varios módulos tienen variables `detect_extensions`, `detect_files`y `detect_folders`. Estas toman listas de cadenas de texto para que coincidan o no coincidan. Las opciones "negativas", aquellas que no deben coincidir, están indicadas con un carácter "!" al inicio. La presencia de _cualquier_ indicador negativo en el directorio hará que el módulo no coincida. +Varios módulos tienen variables `detect_extensions`, `detect_files`y `detect_folders`. Estas toman listas de cadenas de texto para que coincidan o no coincidan. "Negative" options, those which should not be matched, are indicated with a leading '!' character. La presencia de _cualquier_ indicador negativo en el directorio hará que el módulo no coincida. Las extensiones coinciden tanto con los caracteres después del último punto en un nombre de archivo, como con los caracteres después del primer punto en un nombre de archivo. Por ejemplo, `foo.bar.tar.gz` será emparejado contra `bar.tar.gz` y `gz` en la variable `detect_extensions`. Los archivos cuyo nombre comienza con un punto no se consideran extensiones en absoluto. Para ver cómo funciona esto en la práctica, puede hacer coincidir con archivos TypeScript, pero no con archivos MPEG Transport Stream, así: ```toml -detect_extensions = ["ts", "!video.ts", "!audio.ts"] +detect_extensions = ['ts', '!video.ts', '!audio.ts'] ``` ## Prompt -Esta es la lista de opciones de configuración. +Esta es la lista de opciones de configuración del prompt. ### Opciones -| Opción | Predeterminado | Descripción | -| ----------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `format` | [link](#default-prompt-format) | Configura el formato del prompt. | -| `right_format` | `""` | Ver [Habilitar prompt derecho](/advanced-config/#enable-right-prompt) | -| `scan_timeout` | `30` | Tiempo de espera tras el que starship escanea archivos (en milisegundos). | -| `command_timeout` | `500` | Tiempo de espera para los comandos ejecutados por starship (en milisegundos). | -| `add_newline` | `true` | Inserta un línea en blanco entre las instrucciones del intérprete de comandos. | -| `paleta` | `""` | Establece la paleta de color de `paletas` a utilizar. | -| `paletas` | `{}` | Colección de paletas de colores que asignan [colores](/advanced-config/#style-strings) a nombres definidos por el usuario. Tenga en cuenta que las paletas de colores no pueden hacer referencia a sus propias definiciones de color. | +| Opción | Por defecto | Descripción | +| ----------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `format` | [ver aquí](#default-prompt-format) | Configura el formato del prompt. | +| `right_format` | `''` | Ver [Habilitar prompt derecho](/advanced-config/#enable-right-prompt) | +| `scan_timeout` | `30` | Tiempo de espera tras el que Starship escanea archivos (en milisegundos). | +| `command_timeout` | `500` | Tiempo de espera para los comandos ejecutados por Starship (en milisegundos). | +| `add_newline` | `true` | Inserta un línea en blanco entre las instrucciones del intérprete de comandos. | +| `paleta` | `''` | Establece la paleta de color de `paletas` a utilizar. | +| `paletas` | `{}` | Colección de paletas de colores que asignan [colores](/advanced-config/#style-strings) a nombres definidos por el usuario. Tenga en cuenta que las paletas de colores no pueden hacer referencia a sus propias definiciones de color. | ### Ejemplo ```toml # ~/.config/starship.toml -# Usar formato personalizado -format = """ +# Use custom format +format = ''' [┌───────────────────>](bold green) [│](bold green)$directory$rust$package -[└─>](bold green) """ +[└─>](bold green) ''' -# Espera 10 milisegundos para que starship revise los archivos del directorio actual. +# Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 # Disable the blank line at the start of the prompt add_newline = false -# Establece "foo" como paleta de color personalizado -as custom color palette -palette = "foo" +# Set 'foo' as custom color palette +palette = 'foo' -# Definir colores personalizados +# Define custom colors [palettes.foo] -# Sobreescribir actual color -blue = "21" -# Definir nuevo color -mustard = "#af8700" +# Overwrite existing color +blue = '21' +# Define new color +mustard = '#af8700' ``` -### Formato predeterminado del Prompt +### Formato por Defecto del Prompt -El `format` predeterminado se utiliza para definir el formato del prompt, si está vacío o no `format` se proporciona. El valor por defecto es el siguiente: +La varieble `format` por defecto se utiliza para definir el formato del prompt, si está vacía o `format` no se proporciona. El valor predeterminado es el siguiente: ```toml -format = "$all" +format = '$all' # Which is equivalent to format = """ @@ -237,7 +271,9 @@ $elixir\ $elm\ $erlang\ $golang\ +$guix_shell\ $haskell\ +$haxe\ $helm\ $java\ $julia\ @@ -246,6 +282,7 @@ $lua\ $nim\ $nodejs\ $ocaml\ +$opa\ $perl\ $php\ $pulumi\ @@ -282,16 +319,17 @@ $jobs\ $battery\ $time\ $status\ +$os\ $container\ $shell\ $character""" ``` -Si solo quieres extender el formato predeterminado, puedes usar `$all`; los módulos que se añaden explícitamente al formato no serán duplicados. Por ejemplo. +Si solo quieres extender el formato predeterminado, puedes usar `$all`; los módulos que se añaden explícitamente al formato no serán duplicados. Ej. ```toml -# Mueve el módulo directorio a la segunda línea -format="$all$directory$character" +# Move the directory to the second line +format = '$all$directory$character' ``` ## AWS @@ -300,21 +338,23 @@ El módulo `aws` muestra la región y el perfil actual de AWS y un temporizador The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. -Cuando se utiliza [aws-vault](https://github.com/99designs/aws-vault), el perfil se lee de la variable de entorno `AWS_VAULT` y la fecha de expiración de credenciales se lee de la variable de entorno `AWS_SESSION_EXPIRATION`. +Cuando se utiliza [aws-vault](https://github.com/99designs/aws-vault), el perfil se obtiene de la variable de entorno `AWS_VAULT` y la fecha de expiración de credenciales se obtiene de la variable de entorno `AWS_SESSION_EXPIRATION`. -Cuando uses [awsu](https://github.com/kreuzwerker/awsu) el perfil se obtiene de la variable de entorno `AWSU_PROFILE`. +Cuando se utiliza [awsu](https://github.com/kreuzwerker/awsu) el perfil se lee de la variable de entorno `AWSU_PROFILE`. -Cuando se utiliza [AWSume](https://awsu.me), el perfil se lee de la variable de entorno `AWSUME_PROFILE` y la fecha de expiración de credenciales se lee de la variable de entorno `AWSUME_EXPIRATION`. +Cuando se utiliza [AWSume](https://awsu.me), el perfil se obtiene de la variable de entorno `AWSUME_PROFILE` y la fecha de expiración de credenciales se obtiene de la variable de entorno `AWSUME_EXPIRATION`. + +When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. ### Opciones | Opción | Por defecto | Descripción | | ------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | El formato del módulo. | -| `symbol` | `"☁️ "` | El símbolo que se muestra antes del perfil de AWS. | -| `region_aliases` | | Tabla de alias de región para mostrar además del nombre AWS. | -| `profile_aliases` | | Tabla de alias de región para mostrar además del nombre AWS. | -| `style` | `"bold yellow"` | El estilo del módulo. | +| `symbol` | `'☁️ '` | El símbolo que se muestra antes del perfil de AWS. | +| `region_aliases` | `{}` | Tabla de alias de región para mostrar además del nombre AWS. | +| `profile_aliases` | `{}` | Tabla de alias de región para mostrar además del nombre AWS. | +| `style` | `'bold yellow'` | El estilo del módulo. | | `expiration_symbol` | `X` | El símbolo mostrado cuando las credenciales temporales han caducado. | | `disabled` | `false` | Desactiva el módulo AWS. | | `force_display` | `false` | Si `true` muestra información incluso si `credentials`, `credential_process` o `sso_start_url` no han sido configuradas. | @@ -340,11 +380,11 @@ Cuando se utiliza [AWSume](https://awsu.me), el perfil se lee de la variable de [aws] format = 'on [$symbol($profile )(\($region\) )]($style)' -style = "bold blue" -symbol = "🅰 " +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' [aws.profile_aliases] CompanyGroupFrobozzOnCallAccess = 'Frobozz' ``` @@ -355,12 +395,12 @@ CompanyGroupFrobozzOnCallAccess = 'Frobozz' # ~/.config/starship.toml [aws] -format = "on [$symbol$region]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$region]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' ``` #### Mostrar perfil @@ -369,53 +409,67 @@ us-east-1 = "va" # ~/.config/starship.toml [aws] -format = "on [$symbol$profile]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$profile]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.profile_aliases] Enterprise_Naming_Scheme-voidstars = 'void**' ``` ## Azure -El módulo `azure` muestra la suscripción Azure actual. Esto consiste en mostrar el nombre de la suscripción predeterminada, como se define en el archivo `~/.azure/azureProfile.json`. +El módulo `azure` muestra la suscripción Azure actual. This is based on showing the name of the default subscription or the username, as defined in the `~/.azure/azureProfile.json` file. ### Opciones | Variable | Por defecto | Descripción | | ---------- | ---------------------------------------- | ------------------------------------------- | -| `format` | `"on [$symbol($subscription)]($style) "` | El formato para renderizar el módulo Azure. | -| `symbol` | `"ﴃ "` | El símbolo utilizado en el formato. | -| `style` | `"blue bold"` | El estilo utilizado en el formato. | +| `format` | `'on [$symbol($subscription)]($style) '` | El formato para renderizar el módulo Azure. | +| `symbol` | `'ﴃ '` | El símbolo utilizado en el formato. | +| `style` | `'blue bold'` | El estilo utilizado en el formato. | | `disabled` | `true` | Deshabilita el módulo `azure`. | -### Ejemplo +### Ejemplos + +#### Display Subscription Name ```toml # ~/.config/starship.toml [azure] disabled = false -format = "on [$symbol($subscription)]($style) " +format = 'on [$symbol($subscription)]($style) ' +symbol = 'ﴃ ' +style = 'blue bold' +``` + +#### Display Username + +```toml +# ~/.config/starship.toml + +[azure] +disabled = false +format = "on [$symbol($username)]($style) " symbol = "ﴃ " style = "blue bold" ``` ## Battery -El módulo `battery` muestra la cantidad de batería y si está cargando o no. El módulo es solo visible cuando la batería está por debajo del 10%. +El módulo `battery` muestra la cantidad de batería y si se está cargando o no. El módulo solamente es visible cuando la batería del dispositivo está por debajo del 10%. ### 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 está cargando. | -| `discharging_symbol` | `" "` | Se muestra cuando la batería se está descargando. | -| `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. | -| `format` | `"[$symbol$percentage]($style) "` | El formato del módulo. | -| `display` | [link](#battery-display) | Define cuándo mostrar el indicador y el estilo. | +| `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` | `' '` | 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. | +| `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`. | ### Ejemplo @@ -424,47 +478,47 @@ El módulo `battery` muestra la cantidad de batería y si está cargando o no. E # ~/.config/starship.toml [battery] -full_symbol = "🔋 " -charging_symbol = "⚡️ " -discharging_symbol = "💀 " +full_symbol = '🔋 ' +charging_symbol = '⚡️ ' +discharging_symbol = '💀 ' ``` ### Indicador de batería -La opción de configuración `display` se utiliza para definir cuándo debe mostrarse el indicador de batería (threshold), qué symbol se utilizaría (symbol), y cómo sería (style). Si no se provee ningún valor para `display` El valor por defecto es el siguiente: +La opción de configuración `display` se utiliza para definir cuándo debe mostrarse el indicador de batería (threshold), cuál símbolo se utilizaría (symbol), y cómo sería (style). Si no se provee ningún valor para `display`. El valor predeterminado es el siguiente: ```toml [[battery.display]] threshold = 10 -style = "bold red" +style = 'bold red' ``` -El valor por defecto para las opciones `charging_symbol` y `discharging_symbol` son respectivamente los valores `charging_symbol` y `discharging_symbol` de las opción de `battery`. +El valor por defecto para las opciones `charging_symbol` y `discharging_symbol` son respectivamente los valores `charging_symbol` y `discharging_symbol` de las opciones de `battery`. #### Opciones -La opción `display` es un array de la siguiente tabla. +La opción `display` es un arreglo de la siguiente tabla. | Opción | Por defecto | Descripción | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------- | | `threshold` | `10` | El umbral para la opción de visualización. | -| `style` | `"red bold"` | El estilo usado cuando si la opción <0>display está activa. | +| `style` | `'red bold'` | El estilo usado cuando si la opción <0>display está activa. | | `charging_symbol` | | Símbolo opcional que se muestra si la opción de visualización está en uso, por defecto en la opción `charging_symbol` de la batería. | | `discharging_symbol` | | Símbolo opcional que se muestra si la opción de visualización está en uso, por defecto en la opción `discharging_symbol` de la batería. | #### Ejemplo ```toml -[[battery.display]] # Estilo "rojo fuerte" y símbolo de descarga cuando la capacidad está entre 0% y 10% +[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% threshold = 10 -style = "bold red" +style = 'bold red' -[[battery.display]] # Estilo "amarillo fuerte" y símbolo 💦 cuando la capacidad está entre 10% y 30% +[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% threshold = 30 -style = "bold yellow" -discharging_symbol = "💦" +style = 'bold yellow' +discharging_symbol = '💦' -# cuando la capacidad está sobre el 30%, el indicador de batería no se visualizara +# when capacity is over 30%, the battery indicator will not be displayed ``` ## Buf @@ -478,14 +532,14 @@ El módulo `buf` muestra la versión instalada de [Buf](https://buf.build). Por | Opción | Por defecto | Descripción | | ------------------- | ----------------------------------------------- | ---------------------------------------------------- | -| `format` | `"with [$symbol($version )]($style)"` | El formato para el módulo `buf`. | -| `version_format` | `"v${raw}"` | El formato de versión. | -| `symbol` | `"🦬 "` | El símbolo usado antes de mostrar la versión de Buf. | +| `format` | `'with [$symbol($version )]($style)'` | El formato para el módulo `buf`. | +| `version_format` | `'v${raw}'` | El formato de versión. | +| `symbol` | `'🦬 '` | El símbolo usado antes de mostrar la versión de Buf. | | `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Qué nombres de archivo deberían activar este módulo. | +| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. | -| `style` | `"bold blue"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `elixir`. | +| `style` | `'bold blue'` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo `elixir`. | ### Variables @@ -503,7 +557,7 @@ El módulo `buf` muestra la versión instalada de [Buf](https://buf.build). Por # ~/.config/starship.toml [buf] -symbol = "🦬 " +symbol = '🦬 ' ``` ## Bun @@ -517,13 +571,13 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🍞 "` | Una cadena de formato que representa el símbolo de Node.js. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. | | `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["bun.lockb", "bunfig.toml"]` | Qué nombres de archivo deberían activar este módulo. | +| `detect_files` | `['bun.lockb', 'bunfig.toml']` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | -| `style` | `"bold red"` | El estilo del módulo. | +| `style` | `'bold red'` | El estilo del módulo. | | `disabled` | `false` | Disables the `bun` module. | ### Variables @@ -542,7 +596,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. # ~/.config/starship.toml [bun] -format = "via [🍔 $version](bold green) " +format = 'via [🍔 $version](bold green) ' ``` ## C @@ -553,14 +607,14 @@ El módulo `c` muestra información sobre su compilador de C. Por defecto el mó | Opción | Por defecto | Descripción | | ------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version(-$name) )]($style)"` | La cadena de formato para el módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"C "` | El símbolo usado antes de mostrar los detalles del compilador | -| `detect_extensions` | `["c", "h"]` | Qué extensiones deberían activar este módulo. | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | La cadena de formato para el módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | El símbolo usado antes de mostrar los detalles del compilador | +| `detect_extensions` | `['c', 'h']` | Qué extensiones deberían activar este módulo. | | `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | -| `commands` | [ [ "cc", "--version" ], [ "gcc", "--version" ], [ "clang", "--version" ] ] | Cómo detectar cuál compilador es | -| `style` | `"bold 149"` | El estilo del módulo. | +| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | Cómo detectar cuál compilador es | +| `style` | `'bold 149'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `c`. | ### Variables @@ -578,7 +632,7 @@ NB que `versión` no está en el formato por defecto. La opción de `commands` acepta una lista de comandos para determinar la versión y el nombre del compilador. -Cada comando se representa como una lista del nombre del ejecutable seguido de sus argumentos, generalmente algo como `["mycc", "--version"]`. Starship intentará ejecutar cada comando hasta que obtenga un resultado en STDOUT. +Each command is represented as a list of the executable name, followed by its arguments, usually something like `['mycc', '--version']`. Starship intentará ejecutar cada comando hasta que obtenga un resultado en STDOUT. Si un compilador C no es compatible con este módulo, puede solicitarlo [planteando un problema en GitHub](https://github.com/starship/starship/). @@ -588,14 +642,14 @@ Si un compilador C no es compatible con este módulo, puede solicitarlo [plantea # ~/.config/starship.toml [c] -format = "via [$name $version]($style)" +format = 'via [$name $version]($style)' ``` ## Character -El módulo `character` muestra un carater (normalmente una flecha) tras el texto que introduces en el terminal. +El módulo `character` muestra un carácter (normalmente una flecha) al lado del texto que introduces en la terminal. -El carácter te dirá si el último comando funcionó o no. Se puede hacer de dos maneras: +El caracter te dirá si el último comando fue exitoso o no. Se puede hacer de dos maneras: - Cambiando el color (`red`/`green`) - Cambiando la forma (`.`/`✖`) @@ -612,13 +666,13 @@ Por defecto sólo cambia el color. Si también se quiere cambiar su forma, ver [ | 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ó. | -| `vimcmd_symbol` | `"[❮](bold green)"` | El cadena de formato antes de la entrada de texto si el intérprete de comandos está en modo vim normal. | -| `vimcmd_replace_one_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim `replace_one` mode. | -| `vimcmd_replace_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim replace mode. | -| `vimcmd_visual_symbol` | `"[❮](bold yellow)"` | The format string used before the text input if the shell is in vim replace mode. | +| `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ó. | +| `vimcmd_symbol` | `'[❮](bold green)'` | El cadena de formato antes de la entrada de texto si el intérprete de comandos está en modo vim normal. | +| `vimcmd_replace_one_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim `replace_one` mode. | +| `vimcmd_replace_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim replace mode. | +| `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | | `disabled` | `false` | Desactiva el módulo `character`. | ### Variables @@ -635,8 +689,8 @@ Por defecto sólo cambia el color. Si también se quiere cambiar su forma, ver [ # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[✗](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[✗](bold red) ' ``` #### Sin formato de error personalizado @@ -645,8 +699,8 @@ error_symbol = "[✗](bold red) " # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[➜](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[➜](bold red) ' ``` #### Con formato de vim personalizado @@ -655,7 +709,7 @@ error_symbol = "[➜](bold red) " # ~/.config/starship.toml [character] -vicmd_symbol = "[V](bold green) " +vicmd_symbol = '[V](bold green) ' ``` ## CMake @@ -669,14 +723,14 @@ El módulo `cmake` muestra la versión actualmente instalada de [CMake](https:// | Opción | Por defecto | Descripción | | ------------------- | -------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"△ "` | El símbolo usado antes de la versión de cmake. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'△ '` | El símbolo usado antes de la versión de cmake. | | `detect_extensions` | `[]` | Qué extensiones deben activar este módulo | -| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Qué nombres de archivo deben activar este módulo | +| `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | Qué nombres de archivo deben activar este módulo | | `detect_folders` | `[]` | Qué carpetas deben activar este módulo | -| `style` | `"bold blue"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `cmake`. | +| `style` | `'bold blue'` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo `cmake`. | ### Variables @@ -699,11 +753,11 @@ El módulo `cobol` muestra la versión instalada de COBOL. Por defecto, el módu | Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `symbol` | `"⚙️ "` | El símbolo usado antes de mostrar la versión de COBOL. | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold blue"` | El estilo del módulo. | -| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Qué extensiones deberían activar este módulo. | +| `symbol` | `'⚙️ '` | El símbolo usado antes de mostrar la versión de COBOL. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold blue'` | El estilo del módulo. | +| `detect_extensions` | `['cbl', 'cob', 'CBL', 'COB']` | Qué extensiones deberían activar este módulo. | | `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | | `disabled` | `false` | Deshabilita el módulo `cobol`. | @@ -720,27 +774,27 @@ El módulo `cobol` muestra la versión instalada de COBOL. Por defecto, el módu ## Tiempo de ejecución -El módulo `cmd_duration` muestra cuánto tiempo tardó el último comando en ejecutarse. El módulo se mostrará solo si el comando llevó dos segundos o más, o el valor de `min_time`, si existe. +El módulo `cmd_duration` muestra cuánto tiempo tomó ejecutarse el último comando. El módulo se mostrará solo si el comando llevó dos segundos o más, o el valor de `min_time` si existe. -::: warning No utilizar DEBUG en Bash +::: warning No utilizar la trampa DEBUG en 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á**. +Si estás usando Starship con `Bash`, no uses `DEBUG` después de ejecutar `eval $(starship init $0)`, o el módulo **se romperá**. ::: -Los usuarios de bash que necesiten la funcionalidad preexec-like pueden usar el framework rcaloras's bash_preexec. Simplemente define los arrays preexec_functions y precmd_functions antes de ejecutar eval $(starship init $0), y continúa con normalidad. Basta con definir los arrays `preexec_functions` y `precmd_functions` antes de ejecutar `eval $(starship init $0)`, y luego proceder como siempre. +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 arreglos `preexec_functions` y `precmd_functions` antes de ejecutar `eval $(starship init $0)`, y luego proceder como siempre. ### 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`. | +| `min_time` | `2_000` | Duración más corta para mostrar el tiempo (en milisegundos). | +| `show_milliseconds` | `false` | Mostrar milisegundos además de segundos para la duración. | +| `format` | `'took [$duration]($style) '` | El formato del módulo. | +| `style` | `'bold yellow'` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita 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ínima para mostrar el tiempo de ejecución (en milisegundos). | +| `min_time_to_notify` | `45_000` | Duración más corta para la notificación (en milisegundos). | | `notification_timeout` | | Duración para mostrar la notificación (en milisegundos). Si no se establece, el tiempo de espera para notificar será determinado por el demonio. No todos los demonios de notificaciones honran esta opción. | ### Variables @@ -759,7 +813,7 @@ Los usuarios de bash que necesiten la funcionalidad preexec-like pueden usar el [cmd_duration] min_time = 500 -format = "underwent [$duration](bold yellow)" +format = 'underwent [$duration](bold yellow)' ``` ## Conda @@ -768,26 +822,26 @@ El módulo `conda` muestra el entorno actual [Conda](https://docs.conda.io/en/la ::: tip -Esto no modifica el propio símbolo de sistema de conda. En caso de querer suprimirlo, ejecuta `conda config --set changeps1 False`. +Esto no modifica el propio símbolo de sistema de Conda. En caso de querer suprimirlo, ejecuta `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` | `"via [$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` | El número de directorios a los que se debe truncar la ruta de entorno, si el entorno fue creado a través de `conda create -p [path]`. `0` significa sin truncamiento. Vea 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` | `'via [$symbol$environment]($style) '` | El formato del módulo. | +| `ignore_base` | `true` | Ignora el entorno `base` cuando se activa. | +| `disabled` | `false` | Deshabilita el módulo `conda`. | ### Variables | Variable | Ejemplo | Descripción | | ----------- | ------------ | -------------------------------------- | -| environment | `astronauts` | El entorno conda actual | +| environment | `astronauts` | El entorno Conda actual | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -799,7 +853,7 @@ Esto no modifica el propio símbolo de sistema de conda. En caso de querer supri # ~/.config/starship.toml [conda] -format = "[$symbol$environment](dimmed green) " +format = '[$symbol$environment](dimmed green) ' ``` ## Contenedor @@ -810,8 +864,8 @@ El módulo `container` muestra el símbolo y nombre del contenedor, si está den | Opción | Por defecto | Descripción | | ---------- | ---------------------------------- | ---------------------------------------------------------------- | -| `symbol` | `"⬢"` | El símbolo mostrado, cuando se encuentra dentro de un contenedor | -| `style` | `"bold red dimmed"` | El estilo del módulo. | +| `symbol` | `'⬢'` | El símbolo mostrado, cuando se encuentra dentro de un contenedor | +| `style` | `'bold red dimmed'` | El estilo del módulo. | | `format` | `'[$symbol \[$name\]]($style) '` | El formato del módulo. | | `disabled` | `false` | Deshabilita el módulo `container`. | @@ -845,14 +899,14 @@ El módulo `cristal` muestra la versión instalada de [Crystal](https://crystal- | Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `symbol` | `"🔮 "` | Símbolo usado antes de la versión de Crystal. | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold red"` | El estilo del módulo. | -| `detect_extensions` | `["cr"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["shard.yml"]` | Qué nombres de archivo deberían activar este módulo. | +| `symbol` | `'🔮 '` | El símbolo usado antes de mostrar la versión del crystal. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold red'` | El estilo del módulo. | +| `detect_extensions` | `['cr']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['shard.yml']` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | -| `disabled` | `false` | Desactiva el módulo `crystal`. | +| `disabled` | `false` | Deshabilita el módulo `crystal`. | ### Variables @@ -870,7 +924,7 @@ El módulo `cristal` muestra la versión instalada de [Crystal](https://crystal- # ~/.config/starship.toml [crystal] -format = "via [✨ $version](bold blue) " +format = 'via [✨ $version](bold blue) ' ``` ## Daml @@ -881,14 +935,14 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d ### Opciones -| Opción | Predeterminado | Descripción | +| Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"Λ "` | A format string representing the symbol of Daml | -| `style` | `"bold cyan"` | El estilo del módulo. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'Λ '` | A format string representing the symbol of Daml | +| `style` | `'bold cyan'` | El estilo del módulo. | | `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["daml.yaml"]` | Qué nombres de archivo deberían activar este módulo. | +| `detect_files` | `['daml.yaml']` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | | `disabled` | `false` | Deshabilita el módulo `daml`. | @@ -908,7 +962,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d # ~/.config/starship.toml [daml] -format = "via [D $version](bold bright-green) " +format = 'via [D $version](bold bright-green) ' ``` ## Dart @@ -921,16 +975,16 @@ El módulo `dart` muestra la versión instalada de [Dart](https://dart.dev/). Po ### Opciones -| Opción | Predeterminado | Descripción | +| Opción | Por defecto | Descripción | | ------------------- | ------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | Una cadena de formato que representa el símbolo de Dart | -| `detect_extensions` | `["dart"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `[".dart_tool"]` | Qué carpetas deberían activar este módulo. | -| `style` | `"bold blue"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `dart`. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🎯 '` | Una cadena de formato que representa el símbolo de Dart | +| `detect_extensions` | `['dart']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | Qué nombres de archivo deberían activar este módulo. | +| `detect_folders` | `['.dart_tool']` | Qué carpetas deberían activar este módulo. | +| `style` | `'bold blue'` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo `dart`. | ### Variables @@ -948,7 +1002,7 @@ El módulo `dart` muestra la versión instalada de [Dart](https://dart.dev/). Po # ~/.config/starship.toml [dart] -format = "via [🔰 $version](bold red) " +format = 'via [🔰 $version](bold red) ' ``` ## Deno @@ -959,15 +1013,15 @@ El módulo `deno` le muestra la versión instalada de [Deno](https://deno.land/) ### Opciones -| Opción | Predeterminado | Descripción | +| Opción | Por defecto | Descripción | | ------------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦕 "` | Una cadena de formato que representa el símbolo de Deno | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦕 '` | Una cadena de formato que representa el símbolo de Deno | | `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["deno.json", "deno.jsonc", "mod.ts", "mod.js", "deps.ts", "deps.js"]` | Qué nombres de archivo deberían activar este módulo. | +| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | -| `style` | `"green bold"` | El estilo del módulo. | +| `style` | `'green bold'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `deno`. | ### Variables @@ -984,49 +1038,50 @@ El módulo `deno` le muestra la versión instalada de [Deno](https://deno.land/) # ~/.config/starship.toml [deno] -format = "via [🦕 $version](green bold) " +format = 'via [🦕 $version](green bold) ' ``` ## Directory -El módulo `directory` muestra la ruta hasta el directorio actual, mostrando tres directorios padre como máximo. Tu directorio se truncará a la raíz del repositorio git en el que estés. +El módulo `directory` muestra la ruta a tu directorio actual, truncado a tres carpetas padres. Tu directorio se truncará a la raíz del repositorio git en el que te encuentres. -Cuando usas el estilo fish de la opción pwd, en lugar de ocultar la ruta truncada, verás una versión acortada del nombre de cada directorio basada en el número que activa la opción. +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. -Por ejemplo, dado `~/Dev/Nix/nixpkgs/pkgs` donde `nixpkgs` es la raíz del repositorio y el valor de la opción es `1`. En ese caso, verás `~/D/N/nixpkgs/pkgs`, cuando antes hubiera sido `nixpkgs/pkgs`. +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`. ### Opciones -| Opción | Predeterminado | Descripción | -| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | El número de directorios padre a los que se debe truncar el directorio actual. | -| `truncate_to_repo` | `true` | Trunca o no hasta la raíz del repositorio git en el que estés. | -| `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: "…/" | -| `repo_root_style` | | El estilo para la raíz del repositorio de git. El valor por defecto es equivalente al `style`. | -| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | El formato de un repositorio de git cuando `repo_root_style` está definido. | -| `home_symbol` | `"~"` | El símbolo que indica el directorio personal. | -| `use_os_path_sep` | `true` | Utiliza el separador de ruta del sistema operativo específico en lugar de usar siempre `/` (por ejemplo, `\` en Windows) | +| 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` | Deshabilita el módulo `directory`. | +| `read_only` | `'🔒'` | El símbolo que indica 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. eg: '…/' | +| `before_repo_root_style` | | The style for the path segment above the root of the git repo. El valor por defecto es equivalente al `style`. | +| `repo_root_style` | | El estilo para la raíz del repositorio de git. El valor por defecto es equivalente al `style`. | +| `repo_root_format` | `'[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) '` | The format of a git repo when `before_repo_root_style` and `repo_root_style` is defined. | +| `home_symbol` | `'~'` | El símbolo que indica el directorio de inicio. | +| `use_os_path_sep` | `true` | Utiliza el separador de ruta del sistema operativo específico en lugar de usar siempre `/` (por ejemplo, `\` en Windows) |
Este módulo tiene algunas opciones avanzadas de configuración que controlan cómo se muestra el directorio. -| Opciones avanzadas | Predeterminado | 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` | Si `true` renderiza la ruta lógica originada desde el intérprete de comandos a través de `PWD` o `--logical-path`. Si `false` en su lugar renderiza la ruta física del sistema de archivos con enlaces simbólicos resueltos. | +| Opción avanzada | Por defecto | Descripción | +| --------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `sustituciones` | | 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 del intérprete de comandos de Fish. | +| `use_logical_path` | `true` | Si `true` renderiza la ruta lógica originada desde el intérprete de comandos a través de `PWD` o `--logical-path`. Si `false` en su lugar renderiza la ruta física del sistema de archivos con enlaces simbólicos resueltos. | `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. ```toml [directory.substitutions] -"/Volumes/network/path" = "/net" -"src/com/long/java/path" = "mypath" +'/Volumes/network/path' = '/net' +'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`. @@ -1037,8 +1092,8 @@ 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 | -| style\* | `"black bold dimmed"` | Refleja el valor de la opción `style` | +| ruta | `'D:/Projects'` | La ruta del directorio actual | +| 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 @@ -1049,11 +1104,11 @@ Consideremos la ruta `/path/to/home/git_repo/src/lib` | Variable | Ejemplo | Descripción | | ------------------ | --------------------- | --------------------------------------------------- | -| before_root_path | `"/path/to/home/"` | La ruta antes de la ruta del directorio raíz de git | -| repo_root | `"git_repo"` | El nombre del directorio raíz de git | -| path | `"/src/lib"` | La ruta restante | -| style | `"black bold dimmed"` | Refleja el valor de la opción `style` | -| repo_root_style | `"underline white"` | Estilo para el nombre del directorio raíz de git | +| before_root_path | `'/path/to/home/'` | La ruta antes de la ruta del directorio raíz de git | +| repo_root | `'git_repo'` | El nombre del directorio raíz de git | +| ruta | `'/src/lib'` | La ruta restante | +| style | `'black bold dimmed'` | Refleja el valor de la opción `style` | +| repo_root_style | `'underline white'` | Estilo para el nombre del directorio raíz de git |
@@ -1064,7 +1119,7 @@ Consideremos la ruta `/path/to/home/git_repo/src/lib` [directory] truncation_length = 8 -truncation_symbol = "…/" +truncation_symbol = '…/' ``` ## Docker context @@ -1073,22 +1128,22 @@ El módulo `docker_context` muestra el [contexto de Docker](https://docs.docker. ### 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. | -| `only_with_files` | `true` | Mostrar solo cuando haya una coincidencia | -| `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo (necesita que `solly_with_files` sea verdadero, con un valor "true"). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Qué nombres de archivo deberían activar este módulo (necesita que `solly_with_files` sea verdadero, con un valor "true"). | -| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo (necesita que `solly_with_files` sea verdadero, con un valor "true"). | -| `style` | `"blue bold"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `docker_context`. | +| 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. | +| `only_with_files` | `true` | Mostrar solo cuando haya una coincidencia | +| `detect_extensions` | `[]` | Qué extensiones deben activar este módulo (necesita `solly_with_files` para ser verdadero). | +| `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | Qué nombres de archivo deberían activar este módulo (necesita que `only_with_files` sea verdadero, con un valor "true"). | +| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo (necesita que `only_with_files` sea verdadero, con un valor "true"). | +| `style` | `'blue bold'` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo `docker_context`. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------------- | -------------------------------------- | -| context | `test_context` | El contexto actual de docker | +| contexto | `test_context` | El contexto actual de docker | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1100,14 +1155,14 @@ El módulo `docker_context` muestra el [contexto de Docker](https://docs.docker. # ~/.config/starship.toml [docker_context] -format = "via [🐋 $context](blue bold)" +format = 'via [🐋 $context](blue bold)' ``` ## Dotnet -El módulo `dotnet` muestra la versión usada de .NET Core SDK para el directorio actual. Si el SDK ha sido anclado en el directorio actual, se mostrará la versión fijada. De lo contrario, el módulo muestra la última versión instalada del SDK. +El módulo `dotnet` muestra la versión relevante del [.NET Core SDK](https://dotnet.microsoft.com/) para el directorio actual. Si el SDK ha sido anclado en el directorio actual, se mostrará la versión fijada. De lo contrario, el módulo muestra la última versión instalada del SDK. -Por defecto, este módulo solo se mostrará en tu prompt cuando uno o más de de los siguientes archivos estén presentes en el directorio actual: +Por defecto, 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: - `global.json` - `project.json` @@ -1118,9 +1173,9 @@ Por defecto, este módulo solo se mostrará en tu prompt cuando uno o más de de - `*.fsproj` - `*.xproj` -También necesitará tener instalado .NET Core SDK para poder usarlo correctamente. +También necesitarás tener instalado el SDK de .NET Core para poder usarlo correctamente. -Internamente, este módulo utiliza su propio mecanismo para la detección de versiones. Normalmente es el doble de rápido que ejecutar `dotnet --version`, pero puede mostrar una versión incorrecta si tu proyecto .NET tiene un diseño de directorio inusual. Si la precisión es más importante que la velocidad, puede desactivar el mecanismo estableciendo `heuristic = false` en las opciones del módulo. +Internamente, este módulo utiliza su propio mecanismo para la detección de versiones. Normalmente es el doble de rápido que ejecutar `dotnet --version`, pero puede mostrar una versión incorrecta si tu proyecto .NET tiene un diseño de directorio inusual. Si la precisión es más importante que la velocidad, puedes desactivar el mecanismo estableciendo `heuristic = false` en las opciones del módulo. El módulo también mostrará el Target Framework Moniker ([https://docs.microsoft. om/es/dotnet/standard/frameworks#supported-target-framework-versions](https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-frameworks)) cuando exista un archivo `.csproj` en el directorio actual. @@ -1128,21 +1183,21 @@ El módulo también mostrará el Target Framework Moniker ([https://docs.microso | Opción | Por defecto | Descripción | | ------------------- | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `".NET "` | Símbolo usado antes de mostrar la versión de .NET | -| `heuristic` | `true` | Usa una detección de versiones más rápida para mantener a starship veloz. | -| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Qué nombres de archivo deberían activar este módulo. | +| `format` | `'via [$symbol($version )(🎯 $tfm )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `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 la nave espacial veloz. | +| `detect_extensions` | `['csproj', 'fsproj', 'xproj']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['global.json', 'project.json', 'Directory.Build.props', 'Directory.Build.targets', 'Packages.props']` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. | -| `style` | `"bold blue"` | El estilo del módulo. | -| `disabled` | `false` | Deshabilita el módulo `dotnet`. | +| `style` | `'bold blue'` | El estilo del módulo. | +| `disabled` | `false` | Desactiva el módulo `dotnet`. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ---------------- | --------------------------------------------------------------- | -| version | `v3.1.201` | La version del sdk de `dotnet` | +| 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` | @@ -1155,8 +1210,8 @@ El módulo también mostrará el Target Framework Moniker ([https://docs.microso # ~/.config/starship.toml [dotnet] -symbol = "🥅 " -style = "green" +symbol = '🥅 ' +style = 'green' heuristic = false ``` @@ -1170,21 +1225,21 @@ El módulo `elixir` muestra la versión instalada de [Elixir](https://elixir-lan | Opción | Por defecto | Descripción | | ------------------- | ----------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version \(OTP $otp_version\) )]($style)'` | El formato para el módulo elixir. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💧 "` | El símbolo usado antes de mostrar la version de Elixir/Erlang. | +| `format` | `'via [$symbol($version \(OTP $otp_version\) )]($style)'` | El formato para el módulo de elixir. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💧 '` | El símbolo usado antes de mostrar la versión de Elixir/Erlang. | | `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["mix.exs"]` | Qué nombres de archivo deberían activar este módulo. | +| `detect_files` | `['mix.exs']` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. | -| `style` | `"bold purple"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `elixir`. | +| `style` | `'bold purple'` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo `elixir`. | ### Variables | Variable | Ejemplo | Descripción | | ----------- | ------- | -------------------------------------- | | version | `v1.10` | La version de `elixir` | -| otp_version | | La version de otp de `elixir` | +| otp_version | | La versión de otp de `elixir` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1196,7 +1251,7 @@ El módulo `elixir` muestra la versión instalada de [Elixir](https://elixir-lan # ~/.config/starship.toml [elixir] -symbol = "🔮 " +symbol = '🔮 ' ``` ## Elm @@ -1211,16 +1266,16 @@ El módulo `elm` muestra la versión instalada de [Elm](https://elm-lang.org/). ### Opciones -| Opción | Predeterminado | Descripción | +| Opción | Por defecto | Descripción | | ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🌳 "` | Una cadena de formato que representa el símbolo de Elm. | -| `detect_extensions` | `["elm"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["elm.json", "elm-package.json", ".elm-version"]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `["elm-stuff"]` | Qué carpetas deberían activar estos módulos. | -| `style` | `"cyan bold"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `elm`. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🌳 '` | Una cadena de formato que representa el símbolo de Elm. | +| `detect_extensions` | `['elm']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['elm.json', 'elm-package.json', '.elm-version']` | Qué nombres de archivo deberían activar este módulo. | +| `detect_folders` | `['elm-stuff']` | Qué carpetas deberían activar estos módulos. | +| `style` | `'cyan bold'` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo `elm`. | ### Variables @@ -1238,7 +1293,7 @@ El módulo `elm` muestra la versión instalada de [Elm](https://elm-lang.org/). # ~/.config/starship.toml [elm] -format = "via [ $version](cyan bold) " +format = 'via [ $version](cyan bold) ' ``` ## Variable de entorno @@ -1258,28 +1313,28 @@ Ejemplo: la siguiente configuración mostrará el valor de la variable de entorn # ~/.config/starship.toml [env_var.USER] -default = "unknown user" +default = 'unknown user' ``` ::: ### Opciones -| Opción | Predeterminado | Descripción | -| ---------- | ------------------------------ | -------------------------------------------------------------------------------------- | -| `symbol` | `""` | El símbolo usado antes de mostrar el valor de la variable. | -| `variable` | | La variable de entorno a mostrar. | -| `default` | | 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` | `''` | El símbolo usado antes de mostrar el valor de la variable. | +| `variable` | | La variable de entorno a mostrar. | +| `default` | | El valor por defecto que se mostrará cuando la variable seleccionada no está definida. | +| `format` | `'con [$env_value]($style) '` | El formato del módulo. | +| `disabled` | `false` | Deshabilita el módulo `env_var`. | ### 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`) | 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` | *: Esta variable sólo puede ser usada como parte de una cadena de estilo @@ -1289,8 +1344,8 @@ default = "unknown user" # ~/.config/starship.toml [env_var] -variable = "SHELL" -default = "unknown shell" +variable = 'SHELL' +default = 'unknown shell' ``` Mostrando múltiples variables de entorno: @@ -1299,10 +1354,10 @@ Mostrando múltiples variables de entorno: # ~/.config/starship.toml [env_var.SHELL] -variable = "SHELL" -default = "unknown shell" +variable = 'SHELL' +default = 'unknown shell' [env_var.USER] -default = "unknown user" +default = 'unknown user' ``` ## Erlang @@ -1314,16 +1369,16 @@ El módulo `erlang` muestra la versión instalada de [Erlang/OTP](https://erlang ### Opciones -| Opción | Predeterminado | Descripción | +| Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | 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. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | El símbolo usado antes de mostrar la versión de Erlang. | +| `style` | `'bold red'` | El estilo del módulo. | | `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["rebar.config", "elang.mk"]` | Qué nombres de archivo deberían activar este módulo. | +| `detect_files` | `['rebar.config', 'elang.mk']` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. | -| `disabled` | `false` | Desactiva el módulo `erlang`. | +| `disabled` | `false` | Deshabilita el módulo `erlang`. | ### Variables @@ -1341,7 +1396,7 @@ El módulo `erlang` muestra la versión instalada de [Erlang/OTP](https://erlang # ~/.config/starship.toml [erlang] -format = "via [e $version](bold red) " +format = 'via [e $version](bold red) ' ``` ## Llenar @@ -1350,21 +1405,21 @@ El módulo `fill` llena cualquier espacio extra en la línea con un símbolo. Si ### Opciones -| Opción | Predeterminado | Descripción | +| Opción | Por defecto | Descripción | | ---------- | -------------- | ------------------------------------------ | -| `symbol` | `"."` | El símbolo utilizado para llenar la línea. | -| `style` | `"bold black"` | El estilo del módulo. | +| `symbol` | `'.'` | El símbolo utilizado para llenar la línea. | +| `style` | `'bold black'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `fill` | ### Ejemplo ```toml # ~/.config/starship.toml -format = "AA $fill BB $fill CC" +format = 'AA $fill BB $fill CC' [fill] -symbol = "-" -style = "bold green" +symbol = '-' +style = 'bold green' ``` Produce un prompt que se ve como: @@ -1382,21 +1437,21 @@ El módulo `gcloud` muestra la configuración actual para el CLI de [`gcloud`](h | Opción | Por defecto | Descripción | | ----------------- | ---------------------------------------------------------- | ------------------------------------------------------------ | | `format` | `'on [$symbol$account(@$domain)(\($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. | -| `project_aliases` | | Tabla de alias del proyecto a mostrar además del nombre GCP. | -| `style` | `"bold blue"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `gcloud`. | +| `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. | +| `project_aliases` | `{}` | Tabla de alias del proyecto a mostrar además del nombre GCP. | +| `style` | `'bold blue'` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo `gcloud`. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ------------- | ----------------------------------------------------------------------------- | -| region | `us-central1` | La región GCP actual | -| account | `foo` | El perfil actual de GCP | +| region | `us-central1` | La actual región GCP | +| cuenta | `foo` | El perfil actual de GCP | | dominio | `ejemplo.com` | El dominio actual del perfil GCP | -| project | | El proyecto GCP actual | -| active | `default` | El nombre de configuración activo escrito en `~/.config/gcloud/active_config` | +| proyecto | | El proyecto GCP actual | +| activo | `default` | 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` | @@ -1419,8 +1474,8 @@ format = 'on [$symbol$account(@$domain)(\($project\))]($style) ' # ~/.config/starship.toml [gcloud] -format = "[$symbol$active]($style) " -style = "bold yellow" +format = '[$symbol$active]($style) ' +style = 'bold yellow' ``` #### Mostrar los alias de cuenta y región @@ -1429,10 +1484,10 @@ style = "bold yellow" # ~/.config/starship.toml [gcloud] -symbol = "️🇬️ " +symbol = '️🇬️ ' [gcloud.region_aliases] -us-central1 = "uc1" -asia-northeast1 = "an1" +us-central1 = 'uc1' +asia-northeast1 = 'an1' ``` #### Mostrar cuenta y proyecto con alias @@ -1443,7 +1498,7 @@ asia-northeast1 = "an1" [gcloud] format = 'on [$symbol$account(@$domain)(\($project\))]($style) ' [gcloud.project_aliases] -very-long-project-name = "vlpn" +very-long-project-name = 'vlpn' ``` ## Git Branch @@ -1452,27 +1507,27 @@ El módulo `git_branch` muestra la rama activa del repositorio en tu directorio ### Opciones -| Opción | Por defecto | Descripción | -| -------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `always_show_remote` | `false` | Muestra el nombre de la rama de seguimiento remoto, incluso si es igual al nombre de la rama local. | -| `format` | `"on [$symbol$branch(:$remote_branch)]($style) "` | El formato del módulo. Use `"$branch"` para referirse al nombre de la rama actual. | -| `symbol` | `" "` | Una cadena de formato que representa el símbolo de la rama git. | -| `style` | `"bold purple"` | El estilo del módulo. | -| `truncation_length` | `2^63 - 1` | Trunca una rama git a grafemas `N`. | -| `truncation_symbol` | `"…"` | El símbolo usado para indicar que un nombre de rama fue truncado. Puedes usar `""` para ningún símbolo. | -| `only_attached` | `false` | Mostrar solo el nombre de la rama cuando no esté en un estado `HEAD`. | -| `ignore_branches` | `[]` | Una lista de nombres para evitar mostrar. Útil para "master" o "main". | -| `disabled` | `false` | Desactiva el módulo `git_branch`. | +| Opción | Por defecto | Descripción | +| -------------------- | ------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `always_show_remote` | `false` | Muestra el nombre de la rama de seguimiento remoto, incluso si es igual al nombre de la rama local. | +| `format` | `'on [$symbol$branch(:$remote_branch)]($style) '` | El formato del módulo. Use `'$branch'` to refer to the current branch name. | +| `symbol` | `' '` | Una cadena de formato que representa el símbolo de la rama git. | +| `style` | `'bold purple'` | El estilo del módulo. | +| `truncation_length` | `2^63 - 1` | Trunca el nombre de la rama a `N` grafemas. | +| `truncation_symbol` | `'…'` | El símbolo usado para indicar que un nombre de rama fue truncado. You can use `''` for no symbol. | +| `only_attached` | `false` | Mostrar solo el hash de la confirmación de git cuando esté en estado "detached `HEAD`" | +| `ignore_branches` | `[]` | Una lista de nombres a evitar ser visualizados. Useful for 'master' or 'main'. | +| `disabled` | `false` | Deshabilita el módulo `git_branch`. | ### Variables -| Variable | Ejemplo | Descripción | -| ------------- | -------- | -------------------------------------------------------------------------------------------------------------- | -| branch | `master` | El nombre de la rama actual, vuelve a `HEAD` si no hay ninguna rama actual (por ejemplo, git detached `HEAD`). | -| remote_name | `origin` | El nombre remoto. | -| remote_branch | `master` | El nombre de la rama rastreada en `remote_name`. | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| ------------- | --------- | -------------------------------------------------------------------------------------------------------------- | +| rama | `maestro` | El nombre de la rama actual, vuelve a `HEAD` si no hay ninguna rama actual (por ejemplo, git detached `HEAD`). | +| remote_name | `origen` | El nombre remoto. | +| remote_branch | `maestro` | El nombre de la rama rastreada en `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 @@ -1482,10 +1537,10 @@ El módulo `git_branch` muestra la rama activa del repositorio en tu directorio # ~/.config/starship.toml [git_branch] -symbol = "🌱 " +symbol = '🌱 ' truncation_length = 4 -truncation_symbol = "" -ignore_branches = ["master", "main"] +truncation_symbol = '' +ignore_branches = ['master', 'main'] ``` ## Git commit @@ -1494,23 +1549,23 @@ El módulo `git_commit` muestra el hash de la confirmación actual y también la ### Opciones -| Opción | Predeterminado | Descripción | +| Opción | Por defecto | Descripción | | -------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `commit_hash_length` | `7` | La longitud del hash del commit de git mostrado. | +| `commit_hash_length` | `7` | La longitud del hash de la confirmación de git mostrado. | | `format` | `'[\($hash$tag\)]($style) '` | El formato del módulo. | -| `style` | `"bold green"` | El estilo del módulo. | +| `style` | `'bold green'` | El estilo del módulo. | | `only_detached` | `true` | Mostrar solo el hash de la confirmación de git cuando esté en estado "detached `HEAD`" | | `tag_disabled` | `true` | Deshabilita mostrar información de etiquetas en el módulo `git_commit`. | | `tag_max_candidates` | `0` | How many commits to consider for tag display. El valor por defecto sólo permite coincidencias exactas. | -| `tag_symbol` | `" 🏷 "` | Símbolo de etiqueta prefijando la información mostrada | +| `tag_symbol` | `' 🏷 '` | Símbolo de etiqueta prefijando la información mostrada | | `disabled` | `false` | Deshabilita el módulo `git_commit`. | ### Variables -| Variable | Ejemplo | Descripción | -| --------- | --------- | ------------------------------------- | -| hash | `b703eb3` | El hash actual del commit de git | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| --------- | --------- | ---------------------------------------- | +| hash | `b703eb3` | El hash actual de la confirmación de git | +| style\* | | Refleja el valor de la opción `style` | *: Esta variable sólo puede ser usada como parte de una cadena de estilo @@ -1521,7 +1576,7 @@ El módulo `git_commit` muestra el hash de la confirmación actual y también la [git_commit] commit_hash_length = 4 -tag_symbol = "🔖 " +tag_symbol = '🔖 ' ``` ## Git state @@ -1530,24 +1585,24 @@ El módulo `git_state` se mostrará en directorios que son parte de un repositor ### Opciones -| Opción | Predeterminado | Descripción | +| 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. | +| `rebase` | `'REBASING'` | Una cadena de formato que se muestra cuando un `rebase` está en progreso. | +| `fusionar` | `'FUSIONANDO'` | Una cadena de formato que se muestra cuando un `merge` está en progreso. | +| `revertir` | `'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-mailbox` 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`. | +| `disabled` | `false` | Deshabilita el módulo `git_state`. | ### Variables | Variable | Ejemplo | Descripción | | ---------------- | ---------- | ------------------------------------- | -| state | `REBASING` | El estado actual del repositorio | +| state | `REBASING` | The current state of the repo | | progress_current | `1` | El progreso de la operación actual | | progress_total | `2` | El progreso total de la operación | | style\* | | Refleja el valor de la opción `style` | @@ -1561,7 +1616,7 @@ El módulo `git_state` se mostrará en directorios que son parte de un repositor [git_state] format = '[\($state( $progress_current of $progress_total)\)]($style) ' -cherry_pick = "[🍒 PICKING](bold red)" +cherry_pick = '[🍒 PICKING](bold red)' ``` ## Métricas de Git @@ -1570,26 +1625,26 @@ El módulo `git_metrics` mostrará el número de líneas añadidas y eliminadas ::: tip -Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. +Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` como `false` en tu archivo de configuración. ::: ### Opciones -| Opción | Predeterminado | Descripción | +| Opción | Por defecto | Descripción | | -------------------- | ------------------------------------------------------------ | -------------------------------------------------- | -| `added_style` | `"bold green"` | El estilo para el recuento añadido. | -| `deleted_style` | `"bold red"` | El estilo para el recuento eliminado. | +| `added_style` | `'bold green'` | El estilo para el recuento añadido. | +| `deleted_style` | `'bold red'` | El estilo para el recuento eliminado. | | `only_nonzero_diffs` | `true` | Mostrar sólo el estado de los elementos cambiados. | -| `format` | `"([+$added]($added_style) )([-$deleted]($deleted_style) )"` | El formato del módulo. | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | El formato del módulo. | | `disabled` | `true` | Deshabilita el módulo `git_metrics`. | ### Variables | Variable | Ejemplo | Descripción | | ----------------- | ------- | --------------------------------------------- | -| added | `1` | El número actual de líneas añadidas | -| deleted | `2` | El número actual de líneas eliminadas | +| añadido | `1` | El número actual de líneas añadidas | +| borrado | `2` | El número actual de líneas eliminadas | | added_style\* | | Refleja el valor de la opción `added_style` | | deleted_style\* | | Refleja el valor de la opción `deleted_style` | @@ -1601,8 +1656,8 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable # ~/.config/starship.toml [git_metrics] -added_style = "bold blue" -format = "[+$added]($added_style)/[-$deleted]($deleted_style) " +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' ``` ## Git status @@ -1617,56 +1672,56 @@ El módulo Git Status es muy lento en los directorios de Windows (por ejemplo ba ### Opciones -| Opción | Predeterminado | Descripción | +| 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` | -| `up_to_date` | `""` | El formato de `up_to_date` | -| `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. | +| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | El formato predeterminado 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` | +| `up_to_date` | `''` | El formato de `up_to_date` | +| `sin seguimiento` | `'?'` | El formato de `untracked` | +| `stashed` | `'$'` | El formato de `stashed` | +| `modificado` | `'!'` | El formato de `modified` | +| `staged` | `'+'` | El formato de `staged` | +| `renamed` | `'»'` | El formato de `renamed` | +| `borrado` | `'✘'` | El formato de `deleted` | +| `style` | `'bold red'` | El estilo del módulo. | | `ignore_submodules` | `false` | Ignorar cambios a los submódulos. | -| `disabled` | `false` | Desactiva el módulo `git_status`. | +| `disabled` | `false` | Deshabilita el módulo `git_status`. | | `windows_starship` | | Utiliza esta ruta (Linux) a un ejecutable de Starship de Windows para renderizar `git_status` cuando está en las rutas de Windows en WSL. | ### Variables Las siguientes variables se pueden utilizar en `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` o `up_to_date` 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` | Atajo para `$conflicted$stashed$deleted$renamed$modified$staged$untracked` | +| `ahead_behind` | Muestra la cadena de formato de `diverged` `ahead` o `behind` o `up_to_date` basado en el estado actual del repositorio. | +| `conflicted` | Muestra `conflicted` cuando esta rama tiene conflictos de fusión. | +| `sin seguimiento` | Muestra `untracked` cuando hay archivos sin rastrear en el directorio de trabajo. | +| `stashed` | Muestra `stashed` cuando existe un archivo en el área de preparación para el repositorio local. | +| `modificado` | 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 preparación. | +| `renamed` | Muestra `renamed` cuando un archivo renombrado ha sido añadido al área de preparación. | +| `borrado` | Muestra `deleted` cuando un archivo ha sido añadido al área de preparación. | +| 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`: -| 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` | Número de confirmaciones por delante de la rama de seguimiento | +| `behind_count` | Número de confirmaciones detrás de la rama de seguimiento | Las siguientes variales pueden ser usadas en `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` y `deleted`: | Variable | Descripción | | -------- | ----------------------------- | -| `count` | Muestra el número de archivos | +| `count` | Mostrar el número de archivos | ### Ejemplo @@ -1674,28 +1729,28 @@ Las siguientes variales pueden ser usadas en `conflicted`, `ahead`, `behind`, `u # ~/.config/starship.toml [git_status] -conflicted = "🏳" -ahead = "🏎💨" -behind = "😰" -diverged = "😵" -up_to_date = "✓" -untracked = "🤷" -stashed = "📦" -modified = "📝" +conflicted = '🏳' +ahead = '🏎💨' +behind = '😰' +diverged = '😵' +up_to_date = '✓' +untracked = '🤷' +stashed = '📦' +modified = '📝' staged = '[++\($count\)](green)' -renamed = "👅" -deleted = "🗑" +renamed = '👅' +deleted = '🗑' ``` -Mostrar el recuento delante/detrás de la rama que está siendo rastreada +Muestra el conteo delante/detrás de la rama que está siendo rastreada ```toml # ~/.config/starship.toml [git_status] -ahead = "⇡${count}" -diverged = "⇕⇡${ahead_count}⇣${behind_count}" -behind = "⇣${count}" +ahead = '⇡${count}' +diverged = '⇕⇡${ahead_count}⇣${behind_count}' +behind = '⇣${count}' ``` Usar el ejecutable de Starship de Windows en las rutas de Windows en WSL @@ -1704,7 +1759,7 @@ Usar el ejecutable de Starship de Windows en las rutas de Windows en WSL # ~/.config/starship.toml [git_status] -windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.exe" +windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe' ``` ## Go @@ -1725,14 +1780,14 @@ El módulo `golang` muestra la versión instalada de [Go](https://golang.org/). | Opción | Por defecto | Descripción | | ------------------- | ----------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐹 "` | Una cadena de formato que representa el símbolo de Go. | -| `detect_extensions` | `["go"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["go.mod", "go.sum", "go.work", "glide.yaml", "Gopkg.yml", "Gopkg.lock", ".go-version"]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `["Godeps"]` | Qué carpetas deberían activar este módulo. | -| `style` | `"bold cyan"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo de `golang`. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐹 '` | Una cadena de formato que representa el símbolo de Go. | +| `detect_extensions` | `['go']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Qué nombres de archivo deberían activar este módulo. | +| `detect_folders` | `['Godeps']` | Qué carpetas deberían activar este módulo. | +| `style` | `'bold cyan'` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo de `golang`. | ### Variables @@ -1750,7 +1805,39 @@ El módulo `golang` muestra la versión instalada de [Go](https://golang.org/). # ~/.config/starship.toml [golang] -format = "via [🏎💨 $version](bold cyan) " +format = 'via [🏎💨 $version](bold cyan) ' +``` + +## Guix-shell + +The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. + +### Opciones + +| Opción | Por defecto | Descripción | +| ---------- | -------------------------- | ------------------------------------------------------ | +| `format` | `'vía [$symbol]($style) '` | El formato del módulo. | +| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. | +| `style` | `"yellow bold"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `guix_shell` module. | + +### Variables + +| Variable | Ejemplo | Descripción | +| --------- | ------- | -------------------------------------- | +| 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 + +[guix_shell] +disabled = true +format = 'via [🐂](yellow bold) ' ``` ## Haskell @@ -1766,12 +1853,12 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes | 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 Haskell | -| `detect_extensions` | `["hs", "cabal", "hs-boot"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["stack.yaml", "cabal.project"]` | Qué nombres de archivo deberían activar este módulo. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `symbol` | `'λ '` | Una cadena de formato que representa el símbolo de Haskell | +| `detect_extensions` | `['hs', 'cabal', 'hs-boot']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['stack.yaml', 'cabal.project']` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | -| `style` | `"bold purple"` | El estilo del módulo. | +| `style` | `'bold purple'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `haskell`. | ### Variables @@ -1786,6 +1873,46 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes *: Esta variable sólo puede ser usada como parte de una cadena de estilo +## Haxe + +The `haxe` module shows the currently installed version of [Haxe](https://haxe.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: + +- The current directory contains a `project.xml`, `Project.xml`, `application.xml`, `haxelib.json`, `hxformat.json` or `.haxerc` file +- The current directory contains a `.haxelib` or a `haxe_libraries` directory +- The current directory contains a file with the `.hx` or `.hxml` extension + +### Opciones + +| Opción | Por defecto | Descripción | +| ------------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | +| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `["hx", "hxml"]` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Qué nombres de archivo deberían activar este módulo. | +| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Qué carpetas deberían activar estos módulos. | +| `symbol` | `"⌘ "` | Una cadena de formato que representa el símbolo de Helm. | +| `style` | `"bold fg:202"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `haxe` module. | + +### Variables + +| Variable | Ejemplo | Descripción | +| --------- | -------- | -------------------------------------- | +| version | `v4.2.5` | The version of `haxe` | +| 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 + +[haxe] +format = "via [⌘ $version](bold fg:202) " +``` + ## Helm El módulo `helm` muestra la versión instalada de [Helm](https://helm.sh/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: @@ -1797,14 +1924,14 @@ El módulo `helm` muestra la versión instalada de [Helm](https://helm.sh/). Por | Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | | `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["helmfile.yaml", "Chart.yaml"]` | Qué nombres de archivo deberían activar este módulo. | +| `detect_files` | `['helmfile.yaml', 'Chart.yaml']` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. | -| `symbol` | `"⎈ "` | Una cadena de formato que representa el símbolo de Helm. | -| `style` | `"bold white"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `helm`. | +| `symbol` | `'⎈ '` | Una cadena de formato que representa el símbolo de Helm. | +| `style` | `'bold white'` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo `helm`. | ### Variables @@ -1822,7 +1949,7 @@ El módulo `helm` muestra la versión instalada de [Helm](https://helm.sh/). Por # ~/.config/starship.toml [helm] -format = "via [⎈ $version](bold white) " +format = 'via [⎈ $version](bold white) ' ``` ## Hostname @@ -1831,22 +1958,22 @@ El módulo `hostname` muestra el nombre de host del sistema. ### 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. | -| `ssh_symbol` | `"🌐 "` | Una cadena de formato que representa el símbolo cuando se conecta a la 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` | `"[$ssh_symbol$nombre de host]($style) en "` | 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` | Mostrar sólo el nombre de host cuando esté conectado a una sesión SSH. | +| `ssh_symbol` | `'🌐 '` | Una cadena de formato que representa el símbolo cuando se conecta a la sesión SSH. | +| `trim_at` | `'.'` | Cadena en la que el nombre del host se corta, después de la primera coincidencia. `'.'` will stop after the first dot. `''` will disable any truncation | +| `format` | `'[$ssh_symbol$hostname]($style) in '` | El formato del módulo. | +| `style` | `'negrita oscurecida verde'` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo `hostname`. | ### Variables -| Variable | Ejemplo | Descripción | -| --------------- | ---------- | -------------------------------------------------------------- | -| nombre del host | `computer` | El nombre de host del ordenador | -| style\* | | Refleja el valor de la opción `style` | -| ssh_symbol | `"🌏 "` | El símbolo a representar cuando está conectado a la sesión SSH | +| Variable | Ejemplo | Descripción | +| --------------- | ------------- | -------------------------------------------------------------- | +| nombre del host | `computadora` | El nombre de host de la computadora | +| style\* | | Refleja el valor de la opción `style` | +| ssh_symbol | `'🌏 '` | El símbolo a representar cuando está conectado a la sesión SSH | *: Esta variable sólo puede ser usada como parte de una cadena de estilo @@ -1857,8 +1984,8 @@ El módulo `hostname` muestra el nombre de host del sistema. [hostname] ssh_only = false -format = "[$ssh_symbol](bold blue) on [$hostname](bold red) " -trim_at = ".companyname.com" +format = '[$ssh_symbol](bold blue) on [$hostname](bold red) ' +trim_at = '.companyname.com' disabled = false ``` @@ -1873,14 +2000,14 @@ El módulo `java` muestra la versión instalada de [Java](https://www.oracle.com | Opción | Por defecto | Descripción | | ------------------- | -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [${symbol}(${version} )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", "deps.edn", "project.clj", "build.boot"]` | Qué nombres de archivo deberían activar este módulo. | +| `format` | `'via [${symbol}(${version} )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['java', 'class', 'gradle', 'jar', 'cljs', 'cljc']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['pom.xml', 'build.gradle.kts', 'build.sbt', '.java-version', 'deps.edn', 'project.clj', 'build.boot']` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. | -| `symbol` | `"☕ "` | Una cadena de formato que representa el símbolo de Java | -| `style` | `"red dimmed"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `java`. | +| `symbol` | `'☕ '` | Una cadena de formato que representa el símbolo de Java | +| `style` | `'red dimmed'` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo `java`. | ### Variables @@ -1898,16 +2025,16 @@ El módulo `java` muestra la versión instalada de [Java](https://www.oracle.com # ~/.config/starship.toml [java] -symbol = "🌟 " +symbol = '🌟 ' ``` -## Jobs +## Trabajos 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 ejecutados si hay al menos 2 tareas, o más del valor de configuración de `number_threshold`, si existe. El módulo mostrará un símbolo si hay al menos 1 tarea, o más del valor de configuración de `symbol_threshold`, si existe. Puedes establecer ambos valores a 0 para _siempre_ mostrar el símbolo y el número de tareas, incluso si hay 0 tareas en ejecución. La funcionalidad por defecto es: -- 0 tareas -> Nada se muestra. +- 0 tareas -> No se muestra nada. - 1 tarea -> `symbol` se muestra. - 2 tareas o más -> `symbol` + `number` son mostrados. @@ -1925,14 +2052,14 @@ La opción `threshold` está obsoleta, pero si deseas usarla, el módulo mostrar ### Opciones -| Opción | Predeterminado | Descripción | +| Opción | Por defecto | Descripción | | ------------------ | ----------------------------- | ---------------------------------------------------------------------------------- | | `threshold`* | `1` | Muestra el número de tareas si se exceden. | | `symbol_threshold` | `1` | Muestra `symbol` si el conteo de tareas es al menos `symbol_threshold`. | | `number_threshold` | `2` | Muestra el número de tareas si el conteo de tareas es al menos `symbol_threshold`. | -| `format` | `"[$symbol$number]($style) "` | El formato del módulo. | -| `symbol` | `"✦"` | La cadena utilizada para representar la variable `symbol`. | -| `style` | `"bold blue"` | El estilo del módulo. | +| `format` | `'[$symbol$number]($style) '` | El formato del módulo. | +| `symbol` | `'✦'` | La cadena utilizada para representar la variable `symbol`. | +| `style` | `'bold blue'` | El estilo del módulo. | | `disabled` | `false` | Desactiva el módulo `jobs`. | *: Esta opción está desaprobada, por favor utiliza las opciones `number_threshold` y `symbol_threshold` en su lugar. @@ -1941,7 +2068,7 @@ La opción `threshold` está obsoleta, pero si deseas usarla, el módulo mostrar | Variable | Ejemplo | Descripción | | --------- | ------- | -------------------------------------- | -| number | `1` | El número de tareas | +| número | `1` | El número de tareas | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1953,7 +2080,7 @@ La opción `threshold` está obsoleta, pero si deseas usarla, el módulo mostrar # ~/.config/starship.toml [jobs] -symbol = "+ " +symbol = '+ ' number_threshold = 4 symbol_threshold = 0 ``` @@ -1968,16 +2095,16 @@ El módulo `julia` muestra la versión instalada de [Julia](https://julialang.or ### Opciones -| Opción | Predeterminado | Descripción | +| Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["jl"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["Project.toml", "Manifest.toml"]` | Qué nombres de archivo deberían activar este módulo. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['jl']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['Project.toml', 'Manifest.toml']` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. | -| `symbol` | `"ஃ "` | Una cadena de formato que representa el símbolo de Julia. | -| `style` | `"bold purple"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `julia`. | +| `symbol` | `'ஃ '` | Una cadena de formato que representa el símbolo de Julia. | +| `style` | `'bold purple'` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo `julia`. | ### Variables @@ -1995,27 +2122,27 @@ El módulo `julia` muestra la versión instalada de [Julia](https://julialang.or # ~/.config/starship.toml [julia] -symbol = "∴ " +symbol = '∴ ' ``` ## Kotlin El módulo `kotlin` muestra la versión instalada de [Kotlin](https://kotlinlang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: -- El directorio actual contiene un archivo `.kt` o `.kts` +- El directorio actual contiene un archivo `.kt` o un `.kts` ### Opciones -| Opción | Predeterminado | Descripción | +| Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["kt", "kts"]` | Qué extensiones deberían activar este módulo. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['kt', 'kts']` | Qué extensiones deberían activar este módulo. | | `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. | -| `symbol` | `"🅺 "` | Una cadena de formato que representa el símbolo de Kotlin. | -| `style` | `"bold blue"` | El estilo del módulo. | -| `kotlin_binary` | `"kotlin"` | Configura el binario kotlin que Starship ejecuta al obtener la versión. | +| `symbol` | `'🅺 '` | Una cadena de formato que representa el símbolo de Kotlin. | +| `style` | `'bold blue'` | El estilo del módulo. | +| `kotlin_binary` | `'kotlin'` | Configura el binario kotlin que Starship ejecuta al obtener la versión. | | `disabled` | `false` | Deshabilita el módulo `kotlin`. | ### Variables @@ -2034,15 +2161,15 @@ El módulo `kotlin` muestra la versión instalada de [Kotlin](https://kotlinlang # ~/.config/starship.toml [kotlin] -symbol = "🅺 " +symbol = '🅺 ' ``` ```toml # ~/.config/starship.toml [kotlin] -# Utiliza el binario del Compilador de Kotlin para obtener la versión instalada -kotlin_binary = "kotlinc" +# Uses the Kotlin Compiler binary to get the installed version +kotlin_binary = 'kotlinc' ``` ## Kubernetes @@ -2051,21 +2178,21 @@ Muestra el nombre actual del [contexto de Kubernetes](https://kubernetes.io/docs ::: tip -Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. +Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` como `false` en tu archivo de configuración. -When the module is enabled it will always be active, unless any of `detect_extensions`, `detect_files` or `detect_folders` have been st in which case the module will only be active in directories that match those conditions. +When the module is enabled it will always be active, unless any of `detect_extensions`, `detect_files` or `detect_folders` have been set in which case the module will only be active in directories that match those conditions. ::: ### Opciones -| Opción | Predeterminado | Descripción | +| Opción | Por defecto | Descripción | | ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------------- | -| `symbol` | `"☸ "` | Una cadena de formato que representa el símbolo mostrado antes del Cluster. | +| `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. | -| `user_aliases` | | Table of user aliases to display. | +| `style` | `'cyan bold'` | El estilo del módulo. | +| `context_aliases` | `{}` | Tabla de alias de contexto a mostrar. | +| `user_aliases` | `{}` | Table of user aliases to display. | | `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. | @@ -2075,9 +2202,9 @@ When the module is enabled it will always be active, unless any of `detect_exten | Variable | Ejemplo | Descripción | | --------- | -------------------- | ----------------------------------------------------------- | -| context | `starship-context` | El nombre del contexto actual de kubernetes | +| contexto | `starship-context` | El nombre del contexto actual de kubernetes | | namespace | `starship-namespace` | Si se establece, el espacio de nombres actual de kubernetes | -| user | `starship-user` | Si se establece, el espacio de nombres actual de kubernetes | +| usuario | `starship-user` | Si se establece, el espacio de nombres actual de kubernetes | | cluster | `starship-cluster` | Si se establece, el clúster actual de kubernetes | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -2093,12 +2220,12 @@ When the module is enabled it will always be active, unless any of `detect_exten format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false [kubernetes.context_aliases] -"dev.local.cluster.k8s" = "dev" -".*/openshift-cluster/.*" = "openshift" -"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +'dev.local.cluster.k8s' = 'dev' +'.*/openshift-cluster/.*' = 'openshift' +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' [kubernetes.user_aliases] -"dev.local.cluster.k8s" = "dev" -"root/.*" = "root" +'dev.local.cluster.k8s' = 'dev' +'root/.*' = 'root' ``` Only show the module in directories that contain a `k8s` file. @@ -2121,26 +2248,26 @@ Los nombres de cluster generados de forma larga y automática pueden ser identif ```toml [kubernetes.context_aliases] -# los contextos de OpenShift llevan el espacio de nombres y el usuario en el contexto de kube: `namespace/name/user`: -".*/openshift-cluster/.*" = "openshift" +# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: +'.*/openshift-cluster/.*' = 'openshift' # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$var_cluster" +'.*/(?P[\\w-]+)/.*' = '$var_cluster' -# Los contextos de GKE, AWS y otros proveedores de nube normalmente llevan información adicional, como la región/zona. -# La siguiente entrada coincide con el formato GKE (`gke_projectname_zone_cluster-name`) -# y renombra cada contexto de kube coincidente a un formato más legible (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. +# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) +# and renames every matching kube context into a more readable format (`gke-cluster-name`): +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' ``` ## Salto de línea -El módulo `line_break` separa el indicador en dos líneas. +El módulo `line_break` separa el prompt en dos líneas. ### Opciones -| Opción | Predeterminado | 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` | Deshabilita el módulo `line_break`, haciendo que el prompt sea una sola línea. | ### Ejemplo @@ -2151,7 +2278,7 @@ El módulo `line_break` separa el indicador en dos líneas. disabled = true ``` -## Local IP +## IP local El módulo `localip` muestra la dirección IPv4 de la interfaz de red principal. @@ -2160,8 +2287,8 @@ El módulo `localip` muestra la dirección IPv4 de la interfaz de red principal. | Opción | Por defecto | Descripción | | ---------- | ------------------------- | ----------------------------------------------------------------------- | | `ssh_only` | `true` | Solo muestra la direccion IP cuando se está conectado a una sesión SSH. | -| `format` | `"[$localipv4]($style) "` | El formato del módulo. | -| `style` | `"bold yellow"` | El estilo del módulo. | +| `format` | `'[$localipv4]($style) '` | El formato del módulo. | +| `style` | `'bold yellow'` | El estilo del módulo. | | `disabled` | `true` | Deshabilita el módulo `localip`. | ### Variables @@ -2180,7 +2307,7 @@ El módulo `localip` muestra la dirección IPv4 de la interfaz de red principal. [localip] ssh_only = false -format = "@[$localipv4](bold red) " +format = '@[$localipv4](bold red) ' disabled = false ``` @@ -2196,15 +2323,15 @@ El módulo `lua` muestra la versión instalada de [Lua](http://www.lua.org/). Po | Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🌙 "` | Una cadena de formato que representa el símbolo de Lua. | -| `detect_extensions` | `["lua"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `[".lua-version"]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `["lua"]` | Qué carpetas deberían activar este módulo. | -| `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`. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🌙 '` | Una cadena de formato que representa el símbolo de Lua. | +| `detect_extensions` | `['lua']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['.lua-version']` | Qué nombres de archivo deberían activar este módulo. | +| `detect_folders` | `['lua']` | Qué carpetas deberían activar este módulo. | +| `style` | `'bold blue'` | El estilo del módulo. | +| `lua_binary` | `'lua'` | Configura el binario lua que Starship ejecuta al obtener la versión. | +| `disabled` | `false` | Deshabilita el módulo `lua`. | ### Variables @@ -2222,18 +2349,18 @@ El módulo `lua` muestra la versión instalada de [Lua](http://www.lua.org/). Po # ~/.config/starship.toml [lua] -format = "via [🌕 $version](bold blue) " +format = 'via [🌕 $version](bold blue) ' ``` -## Memoria utilizada +## Uso de la memoria -El módulo `memory_usage` muestra la memoria del sistema actual y el uso de memoria de intercambio. +El módulo `memory_usage` muestra la memoria del sistema actual y el uso de la memoria de intercambio. -Por defecto, el uso de swap se muestra si el intercambio total del sistema no es cero. +Por defecto, el uso de la memoria de intercambio se muestra si no es cero. ::: tip -Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. +Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` como `false` en tu archivo de configuración. ::: @@ -2242,9 +2369,9 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable | 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. | +| `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`. | ### Variables @@ -2268,8 +2395,8 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable [memory_usage] disabled = false threshold = -1 -symbol = " " -style = "bold dimmed green" +symbol = ' ' +style = 'bold dimmed green' ``` ## Meson @@ -2280,20 +2407,20 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. ### Opciones -| Opción | Por defecto | Descripción | -| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------- | -| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | -| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. Puedes usar `""` para ningún símbolo. | -| `format` | `"via [$symbol$project]($style) "` | El formato del módulo. | -| `symbol` | `"⬢ "` | The symbol used before displaying the project name. | -| `style` | `"blue bold"` | El estilo del módulo. | -| `disabled` | `false` | Disables the `meson` module. | +| Opción | Por defecto | Descripción | +| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- | +| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | +| `format` | `'via [$symbol$project]($style) '` | El formato del módulo. | +| `symbol` | `'⬢ '` | The symbol used before displaying the project name. | +| `style` | `'blue bold'` | El estilo del módulo. | +| `disabled` | `false` | Disables the `meson` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ---------- | -------------------------------------- | -| project | `starship` | El nombre actual del proyecto Meson | +| proyecto | `starship` | El nombre actual del proyecto Meson | | symbol | `🐏` | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -2306,9 +2433,9 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. [meson] disabled = false -truncation_symbol = "--" -symbol = " " -style = "bold dimmed green" +truncation_symbol = '--' +symbol = ' ' +style = 'bold dimmed green' ``` ## Rama Mercurial @@ -2319,20 +2446,20 @@ El módulo `hg_branch` muestra la rama activa del repositorio del directorio act | 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. | +| `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 `N` grafemas | -| `truncation_symbol` | `"…"` | El símbolo usado para indicar que un nombre de rama fue truncado. | +| `truncation_symbol` | `'…'` | El símbolo usado para indicar que un nombre de rama fue truncado. | | `disabled` | `true` | Deshabilita el módulo `hg_branch`. | ### Variables -| Variable | Ejemplo | Descripción | -| --------- | -------- | -------------------------------------- | -| branch | `master` | La rama mercurial activa | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| --------- | --------- | -------------------------------------- | +| rama | `maestro` | La rama mercurial activa | +| 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 @@ -2342,9 +2469,9 @@ El módulo `hg_branch` muestra la rama activa del repositorio del directorio act # ~/.config/starship.toml [hg_branch] -format = "on [🌱 $branch](bold purple)" +format = 'on [🌱 $branch](bold purple)' truncation_length = 4 -truncation_symbol = "" +truncation_symbol = '' ``` ## Nim @@ -2360,13 +2487,13 @@ El módulo `nim` muestra la versión instalada de [Nim](https://nim-lang.org/). | Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | El símbolo usado antes de mostrar la versión de Nim. | -| `detect_extensions` | `["nim", "nims", "nimble"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["nim.cfg"]` | Qué nombres de archivo deberían activar este módulo. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'👑 '` | El símbolo usado antes de mostrar la versión de Nim. | +| `detect_extensions` | `['nim', 'nims', 'nimble']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['nim.cfg']` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | -| `style` | `"bold yellow"` | El estilo del módulo. | +| `style` | `'bold yellow'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `nim`. | ### Variables @@ -2385,8 +2512,8 @@ El módulo `nim` muestra la versión instalada de [Nim](https://nim-lang.org/). # ~/.config/starship.toml [nim] -style = "yellow" -symbol = "🎣 " +style = 'yellow' +symbol = '🎣 ' ``` ## Nix-shell @@ -2398,10 +2525,10 @@ El módulo `nix_shell` muestra el entorno [nix-shell](https://nixos.org/guides/n | 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. | +| `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`. | ### Variables @@ -2422,8 +2549,8 @@ El módulo `nix_shell` muestra el entorno [nix-shell](https://nixos.org/guides/n [nix_shell] disabled = true -impure_msg = "[impure shell](bold red)" -pure_msg = "[pure shell](bold green)" +impure_msg = '[impure shell](bold red)' +pure_msg = '[pure shell](bold green)' format = 'via [☃️ $state( \($name\))](bold blue) ' ``` @@ -2442,13 +2569,13 @@ El módulo `nodejs` muestra la versión instalada de [Node.js](https://nodejs.or | Opción | Por defecto | Descripción | | ------------------- | ------------------------------------------ | --------------------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | Una cadena de formato que representa el símbolo de Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts", "mts", "cts"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["package.json", ".node-version"]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `["node_modules"]` | Qué carpetas deberían activar este módulo. | -| `style` | `"bold green"` | El estilo del módulo. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | Una cadena de formato que representa el símbolo de Node.js. | +| `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['package.json', '.node-version']` | Qué nombres de archivo deberían activar este módulo. | +| `detect_folders` | `['node_modules']` | Qué carpetas deberían activar este módulo. | +| `style` | `'bold green'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `nodejs`. | | `not_capable_style` | `bold red` | El estilo para el módulo cuando una propiedad de motores en package.json no coincide con la versión de Node.js. | @@ -2468,7 +2595,7 @@ El módulo `nodejs` muestra la versión instalada de [Node.js](https://nodejs.or # ~/.config/starship.toml [nodejs] -format = "via [🤖 $version](bold green) " +format = 'via [🤖 $version](bold green) ' ``` ## OCamlz @@ -2486,15 +2613,15 @@ El módulo `ocaml` muestra la versión instalada de [OCaml](https://ocaml.org/). | Opción | Por defecto | Descripción | | ------------------------- | -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | La cadena de formato para el módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | El símbolo usado antes de mostrar la versión de OCaml. | -| `global_switch_indicator` | `""` | La cadena de formato usada para representar el interruptor global de OPAM. | -| `local_switch_indicator` | `"*"` | La cadena de formato usada para representar el interruptor local de OPAM. | -| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `["_opam", "esy.lock"]` | Qué carpetas deberían activar este módulo. | -| `style` | `"bold yellow"` | El estilo del módulo. | +| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | La cadena de formato para el módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐫 '` | El símbolo usado antes de mostrar la versión de OCaml. | +| `global_switch_indicator` | `''` | La cadena de formato usada para representar el interruptor global de OPAM. | +| `local_switch_indicator` | `'*'` | La cadena de formato usada para representar el interruptor local de OPAM. | +| `detect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['dune', 'dune-project', 'jbuild', 'jbuild-ignore', '.merlin']` | Qué nombres de archivo deberían activar este módulo. | +| `detect_folders` | `['_opam', 'esy.lock']` | Qué carpetas deberían activar este módulo. | +| `style` | `'bold yellow'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `ocaml`. | ### Variables @@ -2515,7 +2642,43 @@ El módulo `ocaml` muestra la versión instalada de [OCaml](https://ocaml.org/). # ~/.config/starship.toml [ocaml] -format = "via [🐪 $version]($style) " +format = 'via [🐪 $version]($style) ' +``` + +## Open Policy Agent + +The `opa` module shows the currently installed version of the OPA tool. By default the module will be shown if the current directory contains a `.rego` file. + +### Opciones + +| Opción | Por defecto | Descripción | +| ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | +| `detect_extensions` | `['rego']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. | +| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | +| `style` | `'bold blue'` | El estilo del módulo. | +| `disabled` | `false` | Disables the `opa` module. | + +### Variables + +| Variable | Ejemplo | Descripción | +| --------- | --------- | -------------------------------------- | +| version | `v0.44.0` | The version of `opa` | +| 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 + +[opa] +format = 'via [⛑️ $version](bold red) ' ``` ## OpenStack @@ -2527,8 +2690,8 @@ El módulo `openstack` muestra la nube actual y el proyecto OpenStack. El módul | 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. | +| `symbol` | `'☁️ '` | El símbolo usado antes de mostrar la nube OpenStack actual. | +| `style` | `'bold yellow'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `openstack`. | ### Variables @@ -2536,7 +2699,7 @@ El módulo `openstack` muestra la nube actual y el proyecto OpenStack. El módul | Variable | Ejemplo | Descripción | | --------- | ------- | -------------------------------------- | | nube | `corp` | La nube OpenStack actual | -| project | `dev` | El actual proyecto OpenStack | +| proyecto | `dev` | El actual proyecto OpenStack | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -2549,8 +2712,105 @@ El módulo `openstack` muestra la nube actual y el proyecto OpenStack. El módul [openstack] format = 'on [$symbol$cloud(\($project\))]($style) ' -style = "bold yellow" -symbol = "☁️ " +style = 'bold yellow' +symbol = '☁️ ' +``` + +## OS + +The `os` module shows the current operating system. OS information is detected via the [os_info](https://lib.rs/crates/os_info) crate. + +::: warning + +The [os_info](https://lib.rs/crates/os_info) crate used by this module is known to be inaccurate on some systems. + +::: + +::: tip + +Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` como `false` en tu archivo de configuración. + +::: + +### Opciones + +| Opción | Por defecto | Descripción | +| ---------- | --------------------- | ------------------------------------------------------ | +| `format` | `"[$symbol]($style)"` | El formato del módulo. | +| `style` | `"bold white"` | El estilo del módulo. | +| `disabled` | `true` | Disables the `os` module. | +| `symbols` | | A table that maps each operating system to its symbol. | + +`symbols` allows you to define arbitrary symbols to display for each operating system type. Operating system types not defined by your configuration use the default symbols table below. All operating systems currently supported by the module are listed below. If you would like an operating system to be added, feel free to open a [feature request](https://github.com/starship/starship/issues/new/choose). + +```toml +# This is the default symbols table. +[os.symbols] +Alpine = "🏔️ " +Amazon = "🙂 " +Android = "🤖 " +Arch = "🎗️ " +CentOS = "💠 " +Debian = "🌀 " +DragonFly = "🐉 " +Emscripten = "🔗 " +EndeavourOS = "🚀 " +Fedora = "🎩 " +FreeBSD = "😈 " +Garuda = "🦅 " +Gentoo = "🗜️ " +HardenedBSD = "🛡️ " +Illumos = "🐦 " +Linux = "🐧 " +Macos = "🍎 " +Manjaro = "🥭 " +Mariner = "🌊 " +MidnightBSD = "🌘 " +Mint = "🌿 " +NetBSD = "🚩 " +NixOS = "❄️ " +OpenBSD = "🐡 " +openSUSE = "🦎 " +OracleLinux = "🦴 " +Pop = "🍭 " +Raspbian = "🍓 " +Redhat = "🎩 " +RedHatEnterprise = "🎩 " +Redox = "🧪 " +Solus = "⛵ " +SUSE = "🦎 " +Ubuntu = "🎯 " +Unknown = "❓ " +Windows = "🪟 " +``` + +### Variables + +| Variable | Ejemplo | Descripción | +| --------- | ------------ | ------------------------------------------------------------------ | +| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | +| name | `Arch Linux` | The current operating system name | +| type | `Arch` | The current operating system type | +| codename | | The current operating system codename, if applicable | +| edition | | The current operating system edition, if applicable | +| version | | The current operating system version, if applicable | +| 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 + +[os] +format = "on [($name )]($style)" +style = "bold blue" +disabled = false + +[os.symbols] +Windows = " " +Arch = "Arch is the best! " ``` ## Package Version @@ -2581,10 +2841,10 @@ El módulo `package` se muestra cuando el directorio actual es el repositorio de | Opción | Por defecto | Descripción | | ----------------- | --------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"is [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"📦 "` | El símbolo usado antes de mostrar la versión del paquete. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold 208"` | El estilo del módulo. | +| `format` | `'is [$symbol$version]($style) '` | El formato del módulo. | +| `symbol` | `'📦 '` | El símbolo usado antes de mostrar la versión del paquete. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold 208'` | El estilo del módulo. | | `display_private` | `false` | Activar la visualización de la versión para los paquetes marcados como privados. | | `disabled` | `false` | Desactiva el módulo `package`. | @@ -2604,7 +2864,7 @@ El módulo `package` se muestra cuando el directorio actual es el repositorio de # ~/.config/starship.toml [package] -format = "via [🎁 $version](208 bold) " +format = 'via [🎁 $version](208 bold) ' ``` ## Perl @@ -2621,13 +2881,13 @@ El módulo `perl` muestra la versión instalada de [Perl](https://www.perl.org/) | Opción | Por defecto | Descripción | | ------------------- | -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | La cadena de formato para el módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | El símbolo usado antes de mostrar la versión de Perl | -| `detect_extensions` | `["pl", "pm", "pod"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Qué nombres de archivo deberían activar este módulo. | +| `format` | `'via [$symbol($version )]($style)'` | La cadena de formato para el módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐪 '` | El símbolo usado antes de mostrar la versión de Perl | +| `detect_extensions` | `['pl', 'pm', 'pod']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | -| `style` | `"bold 149"` | El estilo del módulo. | +| `style` | `'bold 149'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `perl`. | ### Variables @@ -2644,7 +2904,7 @@ El módulo `perl` muestra la versión instalada de [Perl](https://www.perl.org/) # ~/.config/starship.toml [perl] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## PHP @@ -2659,13 +2919,13 @@ El módulo `php` muestra la versión instalada de [PHP](https://www.php.net/). P | Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | El símbolo usado antes de mostrar la versión de PHP. | -| `detect_extensions` | `["php"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["composer.json", ".php-version"]` | Qué nombres de archivo deberían activar este módulo. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐘 '` | El símbolo usado antes de mostrar la versión de PHP. | +| `detect_extensions` | `['php']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['composer.json', '.php-version']` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | -| `style` | `"147 bold"` | El estilo del módulo. | +| `style` | `'147 bold'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `php`. | ### Variables @@ -2684,7 +2944,7 @@ El módulo `php` muestra la versión instalada de [PHP](https://www.php.net/). P # ~/.config/starship.toml [php] -format = "via [🔹 $version](147 bold) " +format = 'via [🔹 $version](147 bold) ' ``` ## Pulumi @@ -2706,10 +2966,10 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes | Opción | Por defecto | Descripción | | ---------------- | -------------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($username@)$stack]($style) "` | La cadena de formato para el módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | Una cadena de formato que se muestra antes de la pila de Pulumi. | -| `style` | `"bold 5"` | El estilo del módulo. | +| `format` | `'via [$symbol($username@)$stack]($style) '` | La cadena de formato para el módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | Una cadena de formato que se muestra antes de la pila de Pulumi. | +| `style` | `'bold 5'` | El estilo del módulo. | | `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | | `disabled` | `false` | Deshabilita el módulo `pulumi`. | @@ -2733,7 +2993,7 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes # ~/.config/starship.toml [pulumi] -format = "[🛥 ($version )$stack]($style) " +format = '[🛥 ($version )$stack]($style) ' ``` #### Sin versión de Pulumi @@ -2741,8 +3001,8 @@ format = "[🛥 ($version )$stack]($style) " ```toml # ~/.config/starship.toml [pulumi] -symbol = "🛥 " -format = "[$symbol$stack]($style) " +symbol = '🛥 ' +format = '[$symbol$stack]($style) ' ``` ## PureScript @@ -2756,13 +3016,13 @@ El módulo `purescript` muestra la versión instalada de [PureScript](https://ww | Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"<=> "` | El símbolo usado antes de mostrar la versión de PureScript. | -| `detect_extensions` | `["purs"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["spago.dhall"]` | Qué nombres de archivo deberían activar este módulo. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'<=> '` | El símbolo usado antes de mostrar la versión de PureScript. | +| `detect_extensions` | `['purs']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['spago.dhall']` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | -| `style` | `"bold white"` | El estilo del módulo. | +| `style` | `'bold white'` | El estilo del módulo. | | `disabled` | `false` | Desactiva el módulo `purescript`. | ### Variables @@ -2781,7 +3041,7 @@ El módulo `purescript` muestra la versión instalada de [PureScript](https://ww # ~/.config/starship.toml [purescript] -format = "via [$symbol$version](bold white)" +format = 'via [$symbol$version](bold white)' ``` ## Python @@ -2807,14 +3067,14 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes | Opción | Por defecto | Descripción | | -------------------- | ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------- | | `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | Una cadena de formato que representa el símbolo de Python | -| `style` | `"yellow bold"` | El estilo del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐍 '` | Una cadena de formato que 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 | -| `python_binary` | `["python", "python3", "python2"]` | Configura los binarios de python que Starship debería ejecutar al obtener la versión. | -| `detect_extensions` | `["py"]` | Qué extensiones deben activar este módulo | -| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Qué nombres de archivo deben activar este módulo | +| `python_binary` | `['python', 'python3', 'python2']` | Configura los binarios de python que Starship debería ejecutar al obtener la versión. | +| `detect_extensions` | `['py']` | Qué extensiones deben activar este módulo | +| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Qué nombres de archivo deben activar este módulo | | `detect_folders` | `[]` | Qué carpetas deben activar este módulo | | `disabled` | `false` | Deshabilita el módulo `python`. | @@ -2822,7 +3082,7 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes La variable `python_binary` acepta una cadena o una lista de cadenas. La Starship intentará ejecutar cada binario hasta que obtenga un resultado. Ten en cuenta que sólo puedes cambiar el binario que Starship ejecuta para obtener la versión de Python no los argumentos que se utilizan. -Los valores por defecto y el orden para `python_binary` fue elegido para identificar primero la versión de Python en un entorno virtualenv/conda (que actualmente añade un `python`, no importa si apunta a `python3` o `python2`). Esto tiene el efecto secundario que si todavía tienes un sistema de Python 2 instalado, puede ser recogido antes de cualquier Python 3 (al menos en las Distros de Linux que siempre enlazan `/usr/bin/python` a Python 2). Si ya no trabajas con Python 2 pero no puedes removerlo del sistema, cambiando esto a `"python3"` ocultará cualquier versión de Python 2, ver ejemplo a continuación. +Los valores por defecto y el orden para `python_binary` fue elegido para identificar primero la versión de Python en un entorno virtualenv/conda (que actualmente añade un `python`, no importa si apunta a `python3` o `python2`). Esto tiene el efecto secundario que si todavía tienes un sistema de Python 2 instalado, puede ser recogido antes de cualquier Python 3 (al menos en las Distros de Linux que siempre enlazan `/usr/bin/python` a Python 2). 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. ::: @@ -2830,11 +3090,11 @@ Los valores por defecto y el orden para `python_binary` fue elegido para identif | Variable | Ejemplo | Descripción | | ------------ | --------------- | -------------------------------------------- | -| version | `"v3.8.1"` | La versión de `python` | -| symbol | `"🐍 "` | Refleja el valor de la opción `symbol` | -| style | `"yellow bold"` | Refleja el valor de la opción `style` | -| pyenv_prefix | `"pyenv "` | Refleja el valor de la opción `pyenv_prefix` | -| virtualenv | `"venv"` | El nombre actual del `virtualenv` | +| version | `'v3.8.1'` | La versión de `python` | +| symbol | `'🐍 '` | Refleja el valor de la opción `symbol` | +| style | `'yellow bold'` | Refleja el valor de la opción `style` | +| pyenv_prefix | `'pyenv '` | Refleja el valor de la opción `pyenv_prefix` | +| virtualenv | `'venv'` | El nombre actual del `virtualenv` | ### Ejemplo @@ -2842,7 +3102,7 @@ Los valores por defecto y el orden para `python_binary` fue elegido para identif # ~/.config/starship.toml [python] -symbol = "👾 " +symbol = '👾 ' pyenv_version_name = true ``` @@ -2851,7 +3111,7 @@ pyenv_version_name = true [python] # Solo usa el binario `python3` para obtener la versión. -python_binary = "python3" +python_binary = 'python3' ``` ```toml @@ -2870,7 +3130,7 @@ detect_extensions = [] # # Ten en cuenta que esto solo funcionará cuando el venv esté dentro del proyecto y sólo # funcionará en el directorio que contiene el directorio venv dir pero ¿tal vez esté bien? -python_binary = ["./venv/bin/python", "python", "python3", "python2"] +python_binary = ['./venv/bin/python', 'python', 'python3', 'python2'] ``` ## R @@ -2889,13 +3149,13 @@ El módulo `rlang` muestra la versión instalada de [R](https://www.r-project.or | Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"📐"` | Una cadena de formato que representa el símbolo de R. | -| `style` | `"blue bold"` | El estilo del módulo. | -| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Qué extensiones deben activar este módulo | -| `detect_files` | `[".Rprofile"]` | Qué nombres de archivo deben activar este módulo | -| `detect_folders` | `[".Rproj.user"]` | Qué carpetas deben activar este módulo | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'📐'` | Una cadena de formato que representa el símbolo de R. | +| `style` | `'blue bold'` | El estilo del módulo. | +| `detect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | Qué extensiones deben activar este módulo | +| `detect_files` | `['.Rprofile']` | Qué nombres de archivo deben activar este módulo | +| `detect_folders` | `['.Rproj.user']` | Qué carpetas deben activar este módulo | | `disabled` | `false` | Deshabilita el módulo `r`. | ### Variables @@ -2904,7 +3164,7 @@ El módulo `rlang` muestra la versión instalada de [R](https://www.r-project.or | -------- | ------------- | -------------------------------------- | | version | `v4.0.5` | La versión de `R` | | symbol | | Refleja el valor de la opción `symbol` | -| style | `"blue bold"` | Refleja el valor de la opción `style` | +| style | `'blue bold'` | Refleja el valor de la opción `style` | ### Ejemplo @@ -2912,7 +3172,7 @@ El módulo `rlang` muestra la versión instalada de [R](https://www.r-project.or # ~/.config/starship.toml [rlang] -format = "con [📐 $version](blue bold) " +format = 'with [📐 $version](blue bold) ' ``` ## Raku @@ -2926,13 +3186,13 @@ El módulo `raku` muestra la versión instalada de [Raku](https://www.raku.org/) | Opción | Por defecto | Descripción | | ------------------- | ------------------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version-$vm_version )]($style)"` | La cadena de formato para el módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦋 "` | El símbolo usado antes de mostrar la versión de Raku | -| `detect_extensions` | `["p6", "pm6", "pod6", "raku", "rakumod"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["META6.json"]` | Qué nombres de archivo deberían activar este módulo. | +| `format` | `'via [$symbol($version-$vm_version )]($style)'` | La cadena de formato para el módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦋 '` | El símbolo usado antes de mostrar la versión de Raku | +| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['META6.json']` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | -| `style` | `"bold 149"` | El estilo del módulo. | +| `style` | `'bold 149'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `raku`. | ### Variables @@ -2950,12 +3210,12 @@ El módulo `raku` muestra la versión instalada de [Raku](https://www.raku.org/) # ~/.config/starship.toml [raku] -format = "vía [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## Red -Por defecto, el módulo `red` muestra la versión actualmente instalada de [Red](https://www.red-lang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen: +Por defecto, el módulo `red` muestra la versión actualmente instalada de [Red](https://www.red-lang.org/). El módulo se mostrará si se cumplen alguna de las siguientes condiciones: - El directorio actual contiene un archivo con extensión `.red` o `.Red` @@ -2963,13 +3223,13 @@ Por defecto, el módulo `red` muestra la versión actualmente instalada de [Red] | Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🔺 "` | Una cadena de formato que representa el símbolo de Red. | -| `detect_extensions` | `["red"]` | Qué extensiones deberían activar este módulo. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🔺 '` | Una cadena de formato que representa el símbolo de Red. | +| `detect_extensions` | `['red']` | Qué extensiones deberían activar este módulo. | | `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | -| `style` | `"red bold"` | El estilo del módulo. | +| `style` | `'red bold'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `red`. | ### Variables @@ -2988,12 +3248,12 @@ Por defecto, el módulo `red` muestra la versión actualmente instalada de [Red] # ~/.config/starship.toml [red] -symbol = "🔴 " +symbol = '🔴 ' ``` ## Ruby -Por defecto, el módulo `ruby` muestra la versión actualmente instalada de [Ruby](https://www.ruby-lang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen: +Por defecto, el módulo `ruby` muestra la versión actualmente instalada de [Ruby](https://www.ruby-lang.org/). El módulo se mostrará si se cumplen alguna de las siguientes condiciones: - El directorio actual contiene un archivo `Gemfile` - El directorio actual contiene un archivo `.ruby-version` @@ -3006,14 +3266,14 @@ Starship obtiene la versión actual de Ruby ejecutando `ruby -v`. | Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💎 "` | Una cadena de formato que representa el símbolo de Ruby. | -| `detect_extensions` | `["rb"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["Gemfile", ".ruby-version"]` | Qué nombres de archivo deberían activar este módulo. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💎 '` | Una cadena de formato que representa el símbolo de Ruby. | +| `detect_extensions` | `['rb']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['Gemfile', '.ruby-version']` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | -| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Qué variables de entorno deben activar este módulo. | -| `style` | `"bold red"` | El estilo del módulo. | +| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Qué variables de entorno deben activar este módulo. | +| `style` | `'bold red'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `ruby`. | ### Variables @@ -3032,12 +3292,12 @@ Starship obtiene la versión actual de Ruby ejecutando `ruby -v`. # ~/.config/starship.toml [ruby] -symbol = "🔺 " +symbol = '🔺 ' ``` ## Rust -Por defecto, el módulo `rust` muestra la versión instalada de [Rust](https://www.rust-lang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen: +Por defecto, el módulo `rust` muestra la versión instalada de [Rust](https://www.rust-lang.org/). El módulo se mostrará si se cumplen alguna de las siguientes condiciones: - El directorio actual contiene un archivo `Cargo.toml` - El directorio actual contiene un archivo con la extensión `.rs` @@ -3046,13 +3306,13 @@ Por defecto, el módulo `rust` muestra la versión instalada de [Rust](https://w | Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦀 "` | Una cadena de formato que representa el símbolo de Rust | -| `detect_extensions` | `["rs"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["Cargo.toml"]` | Qué nombres de archivo deberían activar este módulo. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦀 '` | Una cadena de formato que representa el símbolo de Rust | +| `detect_extensions` | `['rs']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['Cargo.toml']` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | -| `style` | `"bold red"` | El estilo del módulo. | +| `style` | `'bold red'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `rust`. | ### Variables @@ -3073,7 +3333,7 @@ Por defecto, el módulo `rust` muestra la versión instalada de [Rust](https://w # ~/.config/starship.toml [rust] -format = "via [⚙️ $version](red bold)" +format = 'via [⚙️ $version](red bold)' ``` ## Scala @@ -3088,13 +3348,13 @@ El módulo `scala` muestra la versión actualmente instalada de [Scala](https:// | Opción | Por defecto | Descripción | | ------------------- | ---------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [${symbol}(${version} )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["sbt", "scala"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `[".metals"]` | Qué carpetas deberían activar estos módulos. | -| `symbol` | `"🆂 "` | Una cadena de formato que representa el símbolo de Scala. | -| `style` | `"red dimmed"` | El estilo del módulo. | +| `format` | `'via [${symbol}(${version} )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['sbt', 'scala']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Qué nombres de archivo deberían activar este módulo. | +| `detect_folders` | `['.metals']` | Qué carpetas deberían activar estos módulos. | +| `symbol` | `'🆂 '` | Una cadena de formato que representa el símbolo de Scala. | +| `style` | `'red dimmed'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `scala`. | ### Variables @@ -3113,7 +3373,7 @@ El módulo `scala` muestra la versión actualmente instalada de [Scala](https:// # ~/.config/starship.toml [scala] -symbol = "🌟 " +symbol = '🌟 ' ``` ## Shell @@ -3122,7 +3382,7 @@ El módulo `shell` muestra un indicador para el intérprete de comandos actualme ::: tip -Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. +Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` como `false` en tu archivo de configuración. ::: @@ -3130,27 +3390,27 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable | Opción | Por defecto | Descripción | | ---------------------- | ------------------------- | ----------------------------------------------------------------------- | -| `bash_indicator` | `"bsh"` | Una cadena de formato usada para representar bash. | -| `fish_indicator` | `"fsh"` | Una cadena de formato usada para representar fish. | -| `zsh_indicator` | `"zsh"` | Una cadena de formato usada para representar zsh. | -| `powershell_indicator` | `"psh"` | Una cadena de formato usada para representar powershell. | -| `ion_indicator` | `"ion"` | Una cadena de formato usada para representar ion. | -| `elvish_indicator` | `"esh"` | Una cadena de formato usada para representar elvish. | -| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. | -| `xonsh_indicator` | `"xsh"` | Una cadena de formato usada para representar xonsh. | -| `cmd_indicator` | `"cmd"` | Una cadena de formato usada para representar cmd. | -| `nu_indicator` | `"nu"` | Una cadena de formato usada para representar nu. | -| `unknown_indicator` | | El valor por defecto que se mostrará cuando se desconoce el intérprete. | -| `format` | `"[$indicator]($style) "` | El formato del módulo. | -| `style` | `"white bold"` | El estilo del módulo. | +| `bash_indicator` | `'bsh'` | Una cadena de formato usada para representar bash. | +| `fish_indicator` | `'fsh'` | Una cadena de formato usada para representar fish. | +| `zsh_indicator` | `'zsh'` | Una cadena de formato usada para representar zsh. | +| `powershell_indicator` | `'psh'` | Una cadena de formato usada para representar powershell. | +| `ion_indicator` | `'ion'` | Una cadena de formato usada para representar ion. | +| `elvish_indicator` | `'esh'` | Una cadena de formato usada para representar elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | Una cadena de formato usada para representar xonsh. | +| `cmd_indicator` | `'cmd'` | Una cadena de formato usada para representar cmd. | +| `nu_indicator` | `'nu'` | Una cadena de formato usada para representar nu. | +| `unknown_indicator` | `''` | El valor por defecto que se mostrará cuando se desconoce el intérprete. | +| `format` | `'[$indicator]($style) '` | El formato del módulo. | +| `style` | `'white bold'` | El estilo del módulo. | | `disabled` | `true` | Deshabilita el módulo `shell`. | ### Variables -| Variable | Predeterminado | Descripción | -| --------- | -------------- | ------------------------------------------------------------------------------------- | -| indicador | | Refleja el valor de `indicator` para el intérprete de comandos actualmente utilizado. | -| style\* | | Refleja el valor de la opción `style`. | +| Variable | Por defecto | Descripción | +| --------- | ----------- | ------------------------------------------------------------------------------------- | +| indicador | | Refleja el valor de `indicator` para el intérprete de comandos actualmente utilizado. | +| style\* | | Refleja el valor de la opción `style`. | *: Esta variable sólo puede ser usada como parte de una cadena de estilo @@ -3160,26 +3420,26 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable # ~/.config/starship.toml [shell] -fish_indicator = "" -powershell_indicator = "_" -unknown_indicator = "mystery shell" -style = "cyan bold" +fish_indicator = '' +powershell_indicator = '_' +unknown_indicator = 'mystery shell' +style = 'cyan bold' disabled = false ``` ## SHLVL -El módulo `shlvl` muestra la variable de entorno [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") actual, si está establecido en un número y reúne o supera el umbral especificado. +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ('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 el umbral. | -| `format` | `"[$symbol$shlvl]($style) "` | El formato del módulo. | -| `symbol` | `"↕️ "` | El símbolo utilizado para representar el `SHLVL`. | +| `format` | `'[$symbol$shlvl]($style) '` | El formato del módulo. | +| `symbol` | `'↕️ '` | El símbolo utilizado para representar el `SHLVL`. | | `repetir` | `false` | Hace que el `symbol` se repita con la cantidad actual de `SHLVL`. | -| `style` | `"bold yellow"` | El estilo del módulo. | +| `style` | `'bold yellow'` | El estilo del módulo. | | `disabled` | `true` | Deshabilita el módulo `shlvl`. | ### Variables @@ -3199,7 +3459,7 @@ El módulo `shlvl` muestra la variable de entorno [`SHLVL`](https://tldp.org/LDP [shlvl] disabled = false -format = "$shlvl nivel(es) abajo" +format = '$shlvl level(s) down' threshold = 3 ``` @@ -3212,8 +3472,8 @@ El módulo `singularity` muestra la imagen de [singularity](https://sylabs.io/si | 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. | +| `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` | Deshabilita el módulo de `singularity`. | ### Variables @@ -3241,13 +3501,13 @@ El módulo `spack` muestra el entorno actual [Spack](https://spack.readthedocs.i ### Opciones -| Opción | Por defecto | Descripción | -| ------------------- | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `truncation_length` | `1` | El número de directorios a los que se debe truncar la ruta de entorno. `0` significa sin truncamiento. Mirar también el módulo [`directory`](#directory). | -| `symbol` | `"🅢 "` | El símbolo usado antes del nombre del entorno. | -| `style` | `"bold blue"` | El estilo del módulo. | -| `format` | `"via [$symbol$environment]($style) "` | El formato del módulo. | -| `disabled` | `false` | Deshabilita el módulo `spack`. | +| Opción | Por defecto | Descripción | +| ------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | El número de directorios a los que se debe truncar la ruta de entorno. `0` significa sin truncamiento. Vea también el módulo [`directory`](#directory). | +| `symbol` | `'🅢 '` | El símbolo usado antes del nombre del entorno. | +| `style` | `'bold blue'` | El estilo del módulo. | +| `format` | `'via [$symbol$environment]($style) '` | El formato del módulo. | +| `disabled` | `false` | Deshabilita el módulo `spack`. | ### Variables @@ -3265,7 +3525,7 @@ El módulo `spack` muestra el entorno actual [Spack](https://spack.readthedocs.i # ~/.config/starship.toml [spack] -format = "[$symbol$environment](dimmed blue) " +format = '[$symbol$environment](dimmed blue) ' ``` ## Estado @@ -3274,7 +3534,7 @@ El módulo `status` muestra el código de salida del comando anterior. Si $succe ::: tip -Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. +Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` como `false` en tu archivo de configuración. ::: @@ -3282,14 +3542,14 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable | Opción | Por defecto | Descripción | | --------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | -| `format` | `"[$symbol$status]($style) "` | El formato del módulo | -| `symbol` | `"✖"` | El símbolo mostrado en el error del programa | -| `success_symbol` | `""` | El símbolo mostrado en el éxito del programa | -| `not_executable_symbol` | `"🚫"` | El símbolo mostrado cuando el archivo no es ejecutable | -| `not_found_symbol` | `"🔍"` | El símbolo mostrado cuando no se encuentra el comando | -| `sigint_symbol` | `"🧱"` | El símbolo mostrado en SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | El símbolo mostrado en cualquier señal | -| `style` | `"bold red"` | El estilo del módulo. | +| `format` | `'[$symbol$status]($style) '` | El formato del módulo | +| `symbol` | `'❌'` | El símbolo mostrado en el error del programa | +| `success_symbol` | `''` | El símbolo mostrado en el éxito del programa | +| `not_executable_symbol` | `'🚫'` | El símbolo mostrado cuando el archivo no es ejecutable | +| `not_found_symbol` | `'🔍'` | El símbolo mostrado cuando no se encuentra el comando | +| `sigint_symbol` | `'🧱'` | El símbolo mostrado en SIGINT (Ctrl + c) | +| `signal_symbol` | `'⚡'` | El símbolo mostrado en cualquier señal | +| `style` | `'bold red'` | El estilo del módulo. | | `recognize_signal_code` | `true` | Habilita el mapeo de señales desde el código de salida | | `map_symbol` | `false` | Habilita el mapeo de símbolos desde el código de salida | | `pipestatus` | `false` | Habilita el reporte de pipstatus | @@ -3302,7 +3562,7 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable | Variable | Ejemplo | Descripción | | -------------- | ------- | ------------------------------------------------------------------------------------------------------------------ | -| estado | `127` | El código de salida del último comando | +| status | `127` | El código de salida del último comando | | hex_status | `0x7F` | El código de salida del último comando en hexadecimal | | int | `127` | El código de salida del último comando | | common_meaning | `ERROR` | Comprobación del código si no es una señal | @@ -3321,9 +3581,9 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable # ~/.config/starship.toml [status] -style = "bg:blue" -symbol = "🔴 " -success_symbol = "🟢 SUCCESS" +style = 'bg:blue' +symbol = '🔴 ' +success_symbol = '🟢 SUCCESS' format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false @@ -3335,7 +3595,7 @@ El módulo `sudo` muestra si las credenciales de sudo están actualmente en cach ::: tip -Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. +Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` como `false` en tu archivo de configuración. ::: @@ -3343,9 +3603,9 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable | Opción | Por defecto | Descripción | | --------------- | ------------------------ | -------------------------------------------------------------------------------- | -| `format` | `"[as $symbol]($style)"` | El formato del módulo | -| `symbol` | `"🧙 "` | El símbolo mostrado cuando las credenciales se almacenan en caché | -| `style` | `"bold blue"` | El estilo del módulo. | +| `format` | `'[as $symbol]($style)'` | El formato del módulo | +| `symbol` | `'🧙 '` | El símbolo mostrado cuando las credenciales se almacenan en caché | +| `style` | `'bold blue'` | El estilo del módulo. | | `allow_windows` | `false` | Como Windows no tiene sudo por defecto, el valor por defecto está deshabilitado. | | `disabled` | `true` | Deshabilita el módulo `sudo`. | @@ -3364,8 +3624,8 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable # ~/.config/starship.toml [sudo] -style = "bold green" -symbol = "👩‍💻 " +style = 'bold green' +symbol = '👩‍💻 ' disabled = false ``` @@ -3380,7 +3640,7 @@ disabled = false ## Swift -Por defecto, el módulo `swift` muestra la versión instalada de [Swift](https://swift.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen: +Por defecto, el módulo `swift` muestra la versión instalada de [Swift](https://swift.org/). El módulo se mostrará si se cumplen alguna de las siguientes condiciones: - El directorio actual contiene un archivo `Package.swift` - El directorio actual contiene un archivo con la extensión `.swift` @@ -3389,13 +3649,13 @@ Por defecto, el módulo `swift` muestra la versión instalada de [Swift](https:/ | Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐦 "` | Una cadena de formato que representa el símbolo de Swift | -| `detect_extensions` | `["swift"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["Package.swift"]` | Qué nombres de archivo deberían activar este módulo. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐦 '` | Una cadena de formato que representa el símbolo de Swift | +| `detect_extensions` | `['swift']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['Package.swift']` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | -| `style` | `"bold 202"` | El estilo del módulo. | +| `style` | `'bold 202'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `swift`. | ### Variables @@ -3414,7 +3674,7 @@ Por defecto, el módulo `swift` muestra la versión instalada de [Swift](https:/ # ~/.config/starship.toml [swift] -format = "via [🏎 $version](red bold)" +format = 'via [🏎 $version](red bold)' ``` ## Terraform @@ -3434,15 +3694,15 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes ### Opciones -| Opción | Predeterminado | Descripción | +| Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$workspace]($style) "` | La cadena de formato para el módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | Una cadena de formato que se muestra antes del espacio de trabajo terraform. | -| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Qué extensiones deberían activar este módulo. | +| `format` | `'via [$symbol$workspace]($style) '` | La cadena de formato para el módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💠'` | Una cadena de formato que se muestra antes del espacio de trabajo terraform. | +| `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | Qué extensiones deberían activar este módulo. | | `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `[".terraform"]` | Qué carpetas deberían activar este módulo. | -| `style` | `"bold 105"` | El estilo del módulo. | +| `detect_folders` | `['.terraform']` | Qué carpetas deberían activar este módulo. | +| `style` | `'bold 105'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `terraform`. | ### Variables @@ -3464,7 +3724,7 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes # ~/.config/starship.toml [terraform] -format = "[🏎💨 $version$workspace]($style) " +format = '[🏎💨 $version$workspace]($style) ' ``` #### Sin la versión de Terraform @@ -3473,7 +3733,7 @@ format = "[🏎💨 $version$workspace]($style) " # ~/.config/starship.toml [terraform] -format = "[🏎💨 $workspace]($style) " +format = '[🏎💨 $workspace]($style) ' ``` ## Hora @@ -3482,23 +3742,23 @@ El módulo `time` muestra la hora **local** actual. El valor de configuración d ::: tip -Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. +Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` como `false` en tu archivo de configuración. ::: ### Opciones -| Opción | Predeterminado | Descripción | +| Opción | Por defecto | Descripción | | ----------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | La cadena de formato para el módulo. | +| `format` | `'at [$time]($style) '` | La cadena de formato para el módulo. | | `use_12hr` | `false` | Habilita el formato de 12 horas | | `time_format` | see below | La [cadena de formato de chrono](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) utilizada para dar formato a la hora. | -| `style` | `"bold yellow"` | El estilo para el módulo de time | -| `utc_time_offset` | `"local"` | Establece el desplazamiento UTC a utilizar. Rango de -24 < x < 24. Permite a los flotantes acomodar los desplazamientos de zona horaria de 30/45 minutos. | +| `style` | `'bold yellow'` | El estilo para el módulo de time | +| `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` | Deshabilita el módulo `time`. | -| `time_range` | `"-"` | Establece el intervalo de tiempo durante el cual se mostrará el módulo. Las horas deben especificarse en formato de 24 horas | +| `time_range` | `'-'` | Establece el intervalo de tiempo durante el cual se mostrará el módulo. Las horas deben especificarse en formato de 24 horas | -Si `use_12hr` es `true`, entonces `time_format` por defecto es `"%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'`. Configurar manualmente `time_format` sobrescribirá la configuración `use_12hr`. ### Variables @@ -3517,14 +3777,14 @@ Si `use_12hr` es `true`, entonces `time_format` por defecto es `"%r"`. De lo con [time] disabled = false format = '🕙[\[ $time \]]($style) ' -time_format = "%T" -utc_time_offset = "-5" -time_range = "10:00:00-14:00:00" +time_format = '%T' +utc_time_offset = '-5' +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: +El módulo `username` muestra el nombre de usuario activo. El módulo se mostrará si se cumplen alguna de las siguientes condiciones: - El usuario actual es root/admin - El usuario actual no es el mismo que el que está conectado @@ -3539,20 +3799,20 @@ La conexión SSH se detecta comprobando las variables de entorno `SSH_CONNECTION ### Opciones -| Opción | Predeterminado | Descripción | +| Opción | Por defecto | Descripción | | ------------- | ----------------------- | ------------------------------------------------ | -| `style_root` | `"bold red"` | El estilo usado cuando el usuario es root/admin. | -| `style_user` | `"bold yellow"` | El estilo usado para usuarios no root. | -| `format` | `"[$user]($style) in "` | El formato del módulo. | +| `style_root` | `'bold red'` | El estilo usado cuando el usuario es root/admin. | +| `style_user` | `'bold yellow'` | El estilo usado para usuarios no root. | +| `format` | `'[$user]($style) in '` | El formato del módulo. | | `show_always` | `false` | Siempre muestra el módulo `username`. | | `disabled` | `false` | Deshabilita el módulo `username`. | ### 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'` | Refleja el valor de la opción `style_root` cuando root inició sesión y `style_user` por otra parte. | +| `usuario` | `'matchai'` | El ID de usuario conectado actualmente. | ### Ejemplo @@ -3560,9 +3820,9 @@ La conexión SSH se detecta comprobando las variables de entorno `SSH_CONNECTION # ~/.config/starship.toml [username] -style_user = "white bold" -style_root = "black bold" -format = "user: [$user]($style) " +style_user = 'white bold' +style_root = 'black bold' +format = 'user: [$user]($style) ' disabled = false show_always = true ``` @@ -3575,15 +3835,15 @@ El módulo `vagrant` muestra la versión instalada de [Vagrant](https://www.vagr ### Opciones -| Opción | Predeterminado | Descripción | +| Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"⍱ "` | Una cadena de formato que representa el símbolo de Vagrant. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'⍱ '` | Una cadena de formato que representa el símbolo de Vagrant. | | `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["Vagrantfile"]` | Qué nombres de archivo deberían activar este módulo. | +| `detect_files` | `['Vagrantfile']` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | -| `style` | `"cyan bold"` | El estilo del módulo. | +| `style` | `'cyan bold'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `vagrant`. | ### Variables @@ -3602,7 +3862,7 @@ El módulo `vagrant` muestra la versión instalada de [Vagrant](https://www.vagr # ~/.config/starship.toml [vagrant] -format = "via [⍱ $version](bold white) " +format = 'via [⍱ $version](bold white) ' ``` ## V @@ -3614,15 +3874,15 @@ El módulo `vlang` te muestra la versión instalada de [V](https://vlang.io/). P ### Opciones -| Opción | Predeterminado | Descripción | +| Opción | Por defecto | Descripción | | ------------------- | -------------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"V "` | Una cadena de formato que representa el símbolo de V | -| `detect_extensions` | `["v"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Qué nombres de archivo deberían activar este módulo. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'V '` | Una cadena de formato que representa el símbolo de V | +| `detect_extensions` | `['v']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | -| `style` | `"blue bold"` | El estilo del módulo. | +| `style` | `'blue bold'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `vlang`. | ### Variables @@ -3638,7 +3898,7 @@ El módulo `vlang` te muestra la versión instalada de [V](https://vlang.io/). P ```toml # ~/.config/starship.toml [vlang] -format = "vía [V $version](blue bold) " +format = 'via [V $version](blue bold) ' ``` ## VCSH @@ -3647,11 +3907,11 @@ El módulo `vcsh` muestra el repositorio activo [VCSH](https://github.com/RichiH ### Opciones -| Opción | Predeterminado | Descripción | +| Opción | Por defecto | Descripción | | ---------- | -------------------------------- | ------------------------------------------------------------ | -| `symbol` | | El símbolo usado antes de mostrar el nombre del repositorio. | -| `style` | `"bold yellow"` | El estilo del módulo. | -| `format` | `"vcsh [$symbol$repo]($style) "` | El formato del módulo. | +| `symbol` | `''` | El símbolo usado antes de mostrar el nombre del repositorio. | +| `style` | `'bold yellow'` | El estilo del módulo. | +| `format` | `'vcsh [$symbol$repo]($style) '` | El formato del módulo. | | `disabled` | `false` | Deshabilita el módulo `vcsh`. | ### Variables @@ -3670,25 +3930,25 @@ El módulo `vcsh` muestra el repositorio activo [VCSH](https://github.com/RichiH # ~/.config/starship.toml [vcsh] -format = "[🆅 $repo](bold blue) " +format = '[🆅 $repo](bold blue) ' ``` ## Zig -Por defecto, el módulo `zig` muestra la versión instalada de [Zig](https://ziglang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen: +Por defecto, el módulo `zig` muestra la versión instalada de [Zig](https://ziglang.org/). El módulo se mostrará si se cumplen alguna de las siguientes condiciones: - El directorio actual contiene un archivo `.zig` ### Opciones -| Opción | Predeterminado | Descripción | +| Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"↯ "` | 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. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'↯ '` | El símbolo usado antes de mostrar la versión de Zig. | +| `style` | `'bold yellow'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `zig`. | -| `detect_extensions` | `["zig"]` | Qué extensiones deberían activar este módulo. | +| `detect_extensions` | `['zig']` | Qué extensiones deberían activar este módulo. | | `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | @@ -3708,7 +3968,7 @@ Por defecto, el módulo `zig` muestra la versión instalada de [Zig](https://zig # ~/.config/starship.toml [zig] -symbol = "⚡️ " +symbol = '⚡️ ' ``` ## Comandos personalizados @@ -3751,18 +4011,18 @@ Las cadenas de formato también pueden contener secuencias específicas del int ### Opciones -| Opción | Predeterminado | Descripción | +| Opción | Por defecto | Descripción | | ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `comando` | `""` | El comando cuya salida debe ser impresa. El comando se pasará en stdin al intérprete de comandos. | +| `comando` | `''` | El comando cuya salida debe ser impresa. El comando se pasará en stdin al intérprete de comandos. | | `cuando` | `false` | Valor booleano (`true` o `false`, sin comillas) o un comando de shell usado como una condición para mostrar el módulo. En caso de una cadena, el módulo se mostrará si el comando devuelve un código de estado `0`. | | `shell` | | [Ver a continuación](#custom-command-shell) | -| `description` | `""` | La descripción del módulo que se muestra al ejecutar `starship explain`. | +| `description` | `''` | La descripción del módulo que se muestra al ejecutar `starship explain`. | | `detect_files` | `[]` | Los archivos que se buscarán en el directorio de trabajo para obtener una coincidencia. | | `detect_folders` | `[]` | Los directorios que se buscarán en el directorio de trabajo para una coincidencia. | | `detect_extensions` | `[]` | Las extensiones que se buscarán en el directorio de trabajo para obtener una coincidencia. | -| `symbol` | `""` | El símbolo usado antes de mostrar la salida del comando. | -| `style` | `"bold green"` | El estilo del módulo. | -| `format` | `"[$symbol($output )]($style)"` | El formato del módulo. | +| `symbol` | `''` | El símbolo usado antes de mostrar la salida del comando. | +| `style` | `'bold green'` | El estilo del módulo. | +| `format` | `'[$symbol($output )]($style)'` | El formato del módulo. | | `disabled` | `false` | Deshabilita este módulo `custom`. | | `os` | | Nombre del sistema operativo en el que se mostrará el módulo (unix, linux, macos, windows, ... ) [Ver valores posibles](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | | `use_stdin` | | Un valor booleano opcional que anula si los comandos deben ser reenviados al shell a través de la entrada estándar o como argumento. Si la entrada estándar unset es usada de manera predeterminada, a menos que el shell no lo soporte (cmd, nushell). Configurar esto desactiva el manejo de argumentos específicos del shell. | @@ -3783,16 +4043,16 @@ Las cadenas de formato también pueden contener secuencias específicas del int `shell` acepta una lista no vacía de cadenas, donde: - La primera cadena es la ruta al intérprete de comandos a usar para ejecutar el comando. -- Otros argumentos siguientes son pasados al shell. +- Otros argumentos siguientes son pasados al intérprete de comandos. -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. Si no se da el `shell` o solo contiene un elemento y Starship detecta PowerShell los siguientes argumentos se añadirán automáticamente: `-NoProfile -Command -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. Este comportamiento puede evitarse pasando explícitamente argumentos al intérprete de comandos, p.ej. ```toml -shell = ["pwsh", "-Command", "-"] +shell = ['pwsh', '-Command', '-'] ``` ::: warning Asegúrate de que tu configuración personalizada del intérprete de comandos salga con éxito @@ -3813,19 +4073,19 @@ La detección automática de intérpretes de comandos y la adición adecuada de # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -detect_files = ["foo"] # can specify filters but wildcards are not supported -when = """ test "$HOME" = "$PWD" """ -format = " transcending [$output]($style)" +command = 'echo foo' # shows output of command +detect_files = ['foo'] # can specify filters but wildcards are not supported +when = ''' test "$HOME" = "$PWD" ''' +format = ' transcending [$output]($style)' [custom.time] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command', '-'] [custom.time-as-arg] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command'] use_stdin = false ``` diff --git a/docs/es-ES/guide/README.md b/docs/es-ES/guide/README.md index 46b7d98b..53d243e2 100644 --- a/docs/es-ES/guide/README.md +++ b/docs/es-ES/guide/README.md @@ -219,7 +219,6 @@ Alternativamente, instale Starship usando cualquiera de los siguientes gestores | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | | Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | -| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | | Gentoo | [Paquetes Gentoo](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | @@ -417,11 +416,19 @@ Por favor, revisa estos proyectos que inspiraron la creación de Starship. 🙏 - **[reujab/silver](https://github.com/reujab/silver)** - Un prompt multi-intérprete de comandos personalizable basada en Powerline con iconos. +## ❤️ Sponsors + +Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website. + +**Supporter Tier** + +- [Dimension](https://dimension.dev/) +


- Icono de Starship + Starship rocket icon

## 📝 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 3eeca9aa..062405d7 100644 --- a/docs/es-ES/presets/README.md +++ b/docs/es-ES/presets/README.md @@ -10,6 +10,14 @@ Este preajuste cambia los símbolos de cada módulo para usar símbolos Nerd Fon [![Captura de pantalla del preajuste de los Símbolos de Nerd Font](/presets/img/nerd-font-symbols.png "Haga clic para ver el preajuste de Símbolos de Nerd Font")](./nerd-font) +## [Sin fuentes Nerd](./no-nerd-font.md) + +This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt. + +::: tip This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). ::: + +[Click to view No Nerd Font preset](./no-nerd-font) + ## [Segmentos entre Corchetes](./bracketed-segments.md) Este preajuste cambia el formato de todos los módulos incorporados para mostrar su segmento entre corchetes en lugar de usar la redacción por defecto de Starship ("via", "on", etc.). @@ -28,6 +36,12 @@ Este preajuste oculta la versión de los tiempos de ejecución del idioma. Si tr [![Captura de pantalla del preajuste de Ocultar de versiones de tiempo de ejecución](/presets/img/no-runtime-versions.png "Haga clic para ver el preajuste de Ocultar Versiones en Tiempo de Ejecución")](./no-runtimes) +## [No Empty Icons](./no-empty-icons.md) + +This preset does not show icons if the toolset is not found. + +[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Haga clic para ver el preajuste de Ocultar Versiones en Tiempo de Ejecución")](./no-empty-icons.md) + ## [Prompt de Pure](./pure-preset.md) Esta preajuste emula la apariencia y el comportamiento de [Pure](https://github.com/sindresorhus/pure). @@ -38,4 +52,10 @@ Esta preajuste emula la apariencia y el comportamiento de [Pure](https://github. Este preajuste está inspirado en [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). También muestra cómo funciona la sustitución de rutas en Starship. -[![Captura de pantalla del preajuste de Pastel Powerline](/presets/img/pastel-powerline.png "Haga clic para ver el preajuste del Prompt de Pure")](./pastel-powerline) +[![Captura de pantalla del preajuste Pastel Powerline](/presets/img/pastel-powerline.png "Haga clic para ver el preajuste del Prompt de Pure")](./pastel-powerline) + +## [Tokyo Night](./tokyo-night.md) + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) diff --git a/docs/es-ES/presets/no-empty-icons.md b/docs/es-ES/presets/no-empty-icons.md new file mode 100644 index 00000000..eaebf2ab --- /dev/null +++ b/docs/es-ES/presets/no-empty-icons.md @@ -0,0 +1,17 @@ +[Volver a Preajustes](./README.md#no-empty-icons) + +# No Empty Icons Preset + +If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. + +![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) + +### Configuración + +```sh +starship preset no-empty-icons > ~/.config/starship.toml +``` + +[Clic para descargar TOML](/presets/toml/no-empty-icons.toml) + +<<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/es-ES/presets/no-nerd-font.md b/docs/es-ES/presets/no-nerd-font.md new file mode 100644 index 00000000..42da95fa --- /dev/null +++ b/docs/es-ES/presets/no-nerd-font.md @@ -0,0 +1,19 @@ +[Volver a Preajustes](./README.md#no-nerd-fonts) + +# No Nerd Fonts Preset + +This preset restricts the use of symbols to those from emoji and powerline sets. + +Esto significa que incluso sin una fuente Nerd instalada, debería ser capaz de ver todos los símbolos del módulo. + +This preset will become the default preset in a future release of starship. + +### Configuración + +```sh +starship preset no-nerd-font > ~/.config/starship.toml +``` + +[Clic para descargar TOML](/presets/toml/no-nerd-font.toml) + +<<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/es-ES/presets/tokyo-night.md b/docs/es-ES/presets/tokyo-night.md new file mode 100644 index 00000000..12963229 --- /dev/null +++ b/docs/es-ES/presets/tokyo-night.md @@ -0,0 +1,21 @@ +[Volver a Preajustes](./README.md#pastel-powerline) + +# Tokyo Night Preset + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) + +### Prerequisitos + +- Una [Nerd Font](https://www.nerdfonts.com/) instalada y habilitada en tu terminal + +### Configuración + +```sh +starship preset tokyo-night > ~/.config/starship.toml +``` + +[Clic para descargar TOML](/presets/toml/tokyo-night.toml) + +<<< @/.vuepress/public/presets/toml/tokyo-night.toml diff --git a/docs/fr-FR/advanced-config/README.md b/docs/fr-FR/advanced-config/README.md index 86c1ac81..2fcf7908 100644 --- a/docs/fr-FR/advanced-config/README.md +++ b/docs/fr-FR/advanced-config/README.md @@ -45,7 +45,7 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do +- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. Par exemple, pour afficher l'heure à laquelle la dernière commande a été lancée ici, vous feriez ```lua function starship_transient_rprompt_func(prompt) @@ -54,7 +54,7 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -## TransientPrompt and TransientRightPrompt in Fish +## TransientPrompt et TransientRightPrompt dans Fish It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `enable_transience` in the shell session. To make it permanent, put this statement in your `~/.config/fish/config.fish`. Transience can be disabled on-the-fly with `disable_transience`. @@ -70,7 +70,7 @@ starship init fish | source enable_transience ``` -- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do +- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. Par exemple, pour afficher l'heure à laquelle la dernière commande a été lancée ici, vous feriez ```fish function starship_transient_rprompt_func @@ -205,7 +205,9 @@ Certains shells peuvent gérer une invite de commande à droite, sur la même li Note: l’invite à droite est une seule ligne, sur la même ligne que l’entrée. Pour aligner à droite les modules au-dessus de la ligne d’entrée d’une invite multiligne, voir le [module `fill`](/config/#fill). -`right_format` est actuellement géré pour les shells suivants: elvish, fish, zsh, xonsh, cmd. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. + +Note: Nushell 0.71.0 or later is required ### Exemple @@ -280,5 +282,5 @@ Si plusieurs couleurs sont définies pour l’avant-plan/arrière-plan, la derni Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: - Many terminals disable support for `blink` by default -- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564). +- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). - `strikethrough` is not supported by the default macOS Terminal.app diff --git a/docs/fr-FR/config/README.md b/docs/fr-FR/config/README.md index 1b4bbc29..30ad1c43 100644 --- a/docs/fr-FR/config/README.md +++ b/docs/fr-FR/config/README.md @@ -9,21 +9,23 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Toute la configuration de starship est effectuée dans ce fichier [TOML](https://github.com/toml-lang/toml) : ```toml -# Pour avoir des complétions dans votre éditeur basées sur le schéma de la config +# Get editor completions based on the config schema "$schema" = 'https://starship.rs/config-schema.json' -# Insère un ligne vide entre les invites de shells +# Inserts a blank line between shell prompts add_newline = true -# Remplace le symbole «❯» dans l’invite par «➜» -[character] # Le nom du module que nous configurons est «character» -success_symbol = "[➜](bold green)" # Le segment «success_symbol» est mis défini à «➜» avec la couleur «bold green» +# 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' -# Désactive le module «package», le cachant complètement de l’invite +# Disable the package module, hiding it from the prompt completely [package] disabled = true ``` +### Config File Location + Vous pouvez choisir l'emplacement du fichier avec la variable d'environnement `STARSHIP_CONFIG`: ```sh @@ -70,6 +72,62 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') 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. +### Strings + +In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. + +The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. + +| Symbol | Type | Notes | +| ------ | ------------------------- | ------------------------------------------------------ | +| `'` | literal string | less escaping | +| `"` | string | more escaping | +| `'''` | multi-line literal string | less escaping | +| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | + +Par exemple : + +```toml +# literal string +format = '☺\☻ ' + +# regular string +format = "☺\\☻ " + +# escaping Starship symbols +format = '\[\$\] ' +``` + +When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: + +```toml +# with literal string +format = ''' + +\$''' + +# with multiline basic string +format = """ + +\\$""" + +# with basic string +format = "\n\\$" +``` + +In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. + +```toml +format = """ +line1\ +line1\ +line1 +line2\ +line2\ +line2 +""" +``` + ### Chaîne de formatage Les chaînes de formatage sont le format avec lequel un module affiche toutes ses variables. La plupart des modules ont une entrée appelée `format` qui configure le format d'affichage du module. Vous pouvez utiliser des textes, des variables et des groupes de texte dans une chaîne de format. @@ -80,9 +138,9 @@ Une variable contient un symbole `$` suivi du nom de la variable. Le nom d’une Par exemple : -- `$version` est une chaîne de formatage avec une variable nommée `version`. -- `$git_branch$git_commit` est une chaîne de formatage avec deux variables appelées `git_branch` et `git_commit`. -- `$git_branch $git_commit` a les deux variables séparées par un espace. +- `'$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. #### Groupe de texte @@ -94,20 +152,20 @@ La deuxième partie, qui est entourée par `()`, est une [chaîne de style](#sty Par exemple : -- `[on](red bold)` affichera une chaîne de caractères `on` avec un texte gras de couleur rouge. -- `[⌘ $version](bold green)` affichera le symbole `⌘` suivi par le contenu de la variable `version`, en texte gras de couleur verte. -- `[a [b](red) c](green)` affichera `a b c` avec `b` rouge, et `a` et `c` vert. +- `'[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. #### Chaînes de style La plupart des modules de Starship vous permettent de configurer leurs styles d'affichage. Cela se fait avec une entrée (généralement appelée `style`) qui est une chaîne de caractères spécifiant la configuration. Voici quelques exemples de chaînes de style avec ce qu'elles font. Pour plus de détails sur la syntaxe complète, consultez le [guide de configuration avancé](/advanced-config/). -- `"fg:green bg:blue"` définit un texte vert sur un fond bleu -- `"bg:blue fg:bright-green"` définit un texte vert clair sur un fond bleu -- `"bold fg:27"` définit le texte en gras avec la [couleur ANSI](https://i.stack.imgur.com/KTSQa.png) 27 -- `"underline bg:#bf5700"` définit le texte en souligné sur un fond orange foncé -- `"bold italic fg:purple"` définit le texte en italique et gras sur un fond violet -- `""` désactive explicitement tous les styles +- `'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 Notez que ce style sera contrôlé par votre émulateur de terminal. Par exemple, certains émulateurs de terminal éclairciront les couleurs au lieu de mettre le texte en gras, et certains thèmes de couleurs utilisent les mêmes valeurs pour les couleurs normales et claires. De plus, pour obtenir du texte italique, votre terminal doit prendre en charge l'italique. @@ -117,87 +175,64 @@ Une chaîne de formatage conditionnel enveloppée dans `(` et `)` ne sera pas re Par exemple : -- `(@$region)` n’affichera rien si la variable `region` est `None` or une chaine vide, sinon `@` suivi par la valeur de region. -- `(some text)` ne montrera toujours rien puisqu'il n'y a pas de variables enveloppées dans les accolades. -- Lorsque `$all` est un raccourci pour `\[$a$b\]`, `($all)` ne montrera rien que si `$a` et `$b` sont tous les deux `None`. Cela fonctionne comme `(\[$a$b\] )`. - -#### Caractères spéciaux - -Les caractères suivants ont une utilisation spéciale dans les chaines de formatage et doivent être échappées : `$ \ [ ] ( )`. - -Notez que TOML a [à la fois des chaines basiques et des chaines littérales](https://toml.io/en/v1.0.0#string). Il est recommandé d'utiliser une chaine littérale (entourée de guillemets simples) dans votre configuration. Si vous voulez utiliser une chaîne basique (entourée de guillemets doubles), vous devez échapper l'antislash lui-même (c-à-d. utiliser `\\`). - -Par exemple, lorsque vous voulez imprimer un symbole `$` sur une nouvelle ligne, les configurations suivantes pour le `formatage` sont équivalentes : - -```toml -# avec la chaîne de base -format = "\n\\$" - -# avec la chaîne de caractères de base multiligne -format = """ - -\\$""" - -# avec la chaîne littérale -format = ''' - -\$''' -``` +- `'(@$region)'` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. +- `'(some text)'` will always show nothing since there are no variables wrapped in the braces. +- When `$combined` is a shortcut for `\[$a$b\]`, `'($combined)'` will show nothing only if `$a` and `$b` are both `None`. This works the same as `'(\[$a$b\] )'`. ### Negative matching -Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched. +Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading '!' character. The presence of _any_ negative indicator in the directory will result in the module not being matched. Extensions are matched against both the characters after the last dot in a filename, and the characters after the first dot in a filename. For example, `foo.bar.tar.gz` will be matched against `bar.tar.gz` and `gz` in the `detect_extensions` variable. Files whose name begins with a dot are not considered to have extensions at all. To see how this works in practice, you could match TypeScript but not MPEG Transport Stream files thus: ```toml -detect_extensions = ["ts", "!video.ts", "!audio.ts"] +detect_extensions = ['ts', '!video.ts', '!audio.ts'] ``` ## Invite -Voici la liste des options de configuration de l'invite en lui-même. +Voici la liste des options de configuration globales de l'invite de commandes. ### Options | Option | Défaut | Description | | ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `format` | [lien](#default-prompt-format) | Configure le format de l'invite. | -| `right_format` | `""` | Voir [Activer le prompt à droite](/advanced-config/#enable-right-prompt) | -| `scan_timeout` | `30` | Délai d'attente pour que starship scanne les fichiers (en millisecondes). | +| `right_format` | `''` | Voir [Activer le prompt à droite](/advanced-config/#enable-right-prompt) | +| `scan_timeout` | `30` | Délai maximal pour le scan des fichiers par starship (en millisecondes). | | `command_timeout` | `500` | Délai maximal pour les commandes exécutées par starship (en millisecondes). | | `add_newline` | `true` | Insère une ligne vide entre les invites du shell. | -| `palette` | `""` | Sets which color palette from `palettes` to use. | +| `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | ### Exemple ```toml -# ~/.config/starship. oml +# ~/.config/starship.toml -# Utilisez un format personnalisé -format = """ +# Use custom format +format = ''' [┌───────────────────>](bold green) [│](bold green)$directory$rust$package -[└─>](bold green) """ +[└─>](bold green) ''' -# Attendez 10 millisecondes pour que starship vérifie les fichiers dans le répertoire de travail. +# Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 # Disable the blank line at the start of the prompt add_newline = false -# Set "foo" as custom color palette -palette = "foo" +# Set 'foo' as custom color palette +palette = 'foo' # Define custom colors [palettes.foo] # Overwrite existing color -blue = "21" +blue = '21' # Define new color -mustard = "#af8700" +mustard = '#af8700' ``` ### Format par Défaut @@ -205,7 +240,7 @@ mustard = "#af8700" Le `format` par défaut est utilisé pour définir le format de l'invite, si il est vide ou mal `formaté`. La valeur par défaut est la suivante : ```toml -format = "$all" +format = '$all' # Which is equivalent to format = """ @@ -236,7 +271,9 @@ $elixir\ $elm\ $erlang\ $golang\ +$guix_shell\ $haskell\ +$haxe\ $helm\ $java\ $julia\ @@ -245,6 +282,7 @@ $lua\ $nim\ $nodejs\ $ocaml\ +$opa\ $perl\ $php\ $pulumi\ @@ -281,6 +319,7 @@ $jobs\ $battery\ $time\ $status\ +$os\ $container\ $shell\ $character""" @@ -289,8 +328,8 @@ $character""" Si vous voulez étendre le format par défaut, pour pouvoir utiliser `$all` ; les modules que vous ajouter explicitement au format ne seront pas dupliqués. Par ex. ```toml -# Déplace le dossier à la ligne suivante -format = "$all$directory$character" +# Move the directory to the second line +format = '$all$directory$character' ``` ## AWS @@ -305,15 +344,17 @@ Lorsque vous utilisez [awsu](https://github.com/kreuzwerker/awsu) le profil est Lorsque vous utilisez [AWSume](https://awsu.me) le profil est lu à partir de la variable d'environnement `AWSUME_PROFILE` et la date d'expiration des identifiants est lue à partir de la variable d'environnement `AWSUME_EXPIRATION`. +When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. + ### Options | Option | Défaut | Description | | ------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | Format du module. | -| `symbol` | `"☁️ "` | Le symbole est affiché avant le profil AWS actuel. | -| `region_aliases` | | Tableau des alias de région à afficher en plus du nom AWS. | -| `profile_aliases` | | Tableau des alias de profil à afficher en plus du nom AWS. | -| `style` | `"bold yellow"` | Le style du module. | +| `symbol` | `'☁️ '` | Le symbole est affiché avant le profil AWS actuel. | +| `region_aliases` | `{}` | Tableau des alias de région à afficher en plus du nom AWS. | +| `profile_aliases` | `{}` | Tableau des alias de profil à afficher en plus du nom AWS. | +| `style` | `'bold yellow'` | Le style pour le module. | | `expiration_symbol` | `X` | Le symbole est affiché lorsque les identifiants temporaires ont expiré. | | `disabled` | `false` | Désactive le module `AWS`. | | `force_display` | `false` | Si `true`, affiche les informations même si `credentials`, `credential_process` ou `sso_start_url` n'ont pas été configurées. | @@ -339,11 +380,11 @@ Lorsque vous utilisez [AWSume](https://awsu.me) le profil est lu à partir de la [aws] format = 'on [$symbol($profile )(\($region\) )]($style)' -style = "bold blue" -symbol = "🅰 " +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' [aws.profile_aliases] CompanyGroupFrobozzOnCallAccess = 'Frobozz' ``` @@ -354,12 +395,12 @@ CompanyGroupFrobozzOnCallAccess = 'Frobozz' # ~/.config/starship.toml [aws] -format = "on [$symbol$region]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$region]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' ``` #### Afficher le profil @@ -368,34 +409,48 @@ us-east-1 = "va" # ~/.config/starship.toml [aws] -format = "on [$symbol$profile]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$profile]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.profile_aliases] Enterprise_Naming_Scheme-voidstars = 'void**' ``` ## Azure -Le module `azure` affiche l'abonnement Azure actuel. Ceci est basé sur l'affichage du nom de l'abonnement par défaut, tel que défini dans le fichier `~/.azure/azureProfile.json`. +Le module `azure` affiche l'abonnement Azure actuel. This is based on showing the name of the default subscription or the username, as defined in the `~/.azure/azureProfile.json` file. ### Options | Variable | Défaut | Description | | ---------- | ---------------------------------------- | ---------------------------------------- | -| `format` | `"on [$symbol($subscription)]($style) "` | Le format pour le rendu du module Azure. | -| `symbol` | `"ﴃ "` | Le symbole utilisé dans le format. | -| `style` | `"blue bold"` | Le style utilisé dans le format. | +| `format` | `'on [$symbol($subscription)]($style) '` | Le format pour le rendu du module Azure. | +| `symbol` | `'ﴃ '` | Le symbole utilisé dans le format. | +| `style` | `'blue bold'` | Le style utilisé dans le format. | | `disabled` | `true` | Désactive le module `azure`. | -### Exemple +### Exemples + +#### Display Subscription Name ```toml # ~/.config/starship.toml [azure] disabled = false -format = "on [$symbol($subscription)]($style) " +format = 'on [$symbol($subscription)]($style) ' +symbol = 'ﴃ ' +style = 'blue bold' +``` + +#### Display Username + +```toml +# ~/.config/starship.toml + +[azure] +disabled = false +format = "on [$symbol($username)]($style) " symbol = "ﴃ " style = "blue bold" ``` @@ -408,12 +463,12 @@ Le module `battery` montre à quel point la batterie de l'appareil est chargée | Option | Défaut | 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. | -| `unknown_symbol` | `" "` | Le symbole affiché lorsque l'état de la batterie est inconnu. | -| `empty_symbol` | `" "` | Le symbole affiché lorsque la batterie est vide. | -| `format` | `"[$symbol$percentage]($style) "` | Format du module. | +| `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` | `' '` | Le symbole affiché lorsque l'état de la batterie est inconnu. | +| `empty_symbol` | `' '` | Le symbole affiché lorsque la batterie est vide. | +| `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`. | @@ -423,9 +478,9 @@ Le module `battery` montre à quel point la batterie de l'appareil est chargée # ~/.config/starship.toml [battery] -full_symbol = "🔋 " -charging_symbol = "⚡️ " -discharging_symbol = "💀 " +full_symbol = '🔋 ' +charging_symbol = '⚡️ ' +discharging_symbol = '💀 ' ``` ### Indicateur de batterie @@ -435,35 +490,35 @@ L'option de configuration `display` est utilisée pour définir quand l'indicate ```toml [[battery.display]] threshold = 10 -style = "bold red" +style = 'bold red' ``` La valeur par défaut pour les options `charging_symbol` et `discharging_symbol` est respectivement la valeur des options `charging_symbol` et `discharging_symbol` du module `battery`. #### Options -L'option `display` est une array de la table suivante. +L'option `display` est un tableau des propriétés suivantes. | Option | Défaut | Description | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------- | -| `threshold` | `10` | La limite supérieure pour l'option d'affichage. | -| `style` | `"red bold"` | Le style de l'option display si elle est utilisée. | +| `threshold` | `10` | La limite supérieure pour l'option display. | +| `style` | `'red bold'` | Le style de l'option display si elle est utilisée. | | `charging_symbol` | | Symbole optionnel affiché si l'option display est utilisée, la valeur par défaut est l'option `charging_symbol` du module "battery". | | `discharging_symbol` | | Symbole optionnel affiché si l'option display est utilisée, la valeur par défaut est l'option `discharging_symbol` du module "battery". | #### Exemple ```toml -[[battery.display]] # style "bold red" et discharging_symbol quand la batterie est entre 0% et 10% +[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% threshold = 10 -style = "bold red" +style = 'bold red' -[[battery.display]] # style "bold yellow" et symbole 💦 quand la batterie est entre 10% et 30% +[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% threshold = 30 -style = "bold yellow" -discharging_symbol = "💦" +style = 'bold yellow' +discharging_symbol = '💦' -# quand la batterie est au-dessus de 30%, l’indicateur de batterie ne sera pas affiché +# when capacity is over 30%, the battery indicator will not be displayed ``` ## Buf @@ -475,16 +530,16 @@ Le module `buf` affiche la version de [Buf](https://buf.build) installée. Par d ### Options -| Option | Défaut | Description | -| ------------------- | ----------------------------------------------- | ------------------------------------------------------ | -| `format` | `"with [$symbol($version )]($style)"` | Le format du module `buf`. | -| `version_format` | `"v${raw}"` | Le format de la version. | -| `symbol` | `"🦬 "` | Le symbole utilisé avant d’afficher la version de Buf. | -| `detect_extensions` | `[]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[]` | Quels dossiers devraient activer ce module. | -| `style` | `"bold blue"` | Le style du module. | -| `disabled` | `false` | Désactive le module `elixir`. | +| Option | Défaut | Description | +| ------------------------------------ | ----------------------------------------------- | ------------------------------------------------------ | +| `format` | `'with [$symbol($version )]($style)'` | Le format du module `buf`. | +| `version_format` | `'v${raw}'` | Le format de la version. | +| `symbol` | `'🦬 '` | Le symbole utilisé avant d’afficher la version de Buf. | +| `detect_extensionsdetect_extensions` | `[]` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Quels dossiers devraient activer ce module. | +| `style` | `'bold blue'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `elixir`. | ### Variables @@ -502,28 +557,28 @@ Le module `buf` affiche la version de [Buf](https://buf.build) installée. Par d # ~/.config/starship.toml [buf] -symbol = "🦬 " +symbol = '🦬 ' ``` ## Bun -The `bun` module shows the currently installed version of the [bun](https://bun.sh) JavaScript runtime. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +The `bun` module shows the currently installed version of the [bun](https://bun.sh) JavaScript runtime. Par défaut, le module sera affiché si l’une de ces conditions est remplie: - Le répertoire courant contient un fichier `bun.lockb` - Le répertoire courant contient un fichier `bunfig.toml` ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🍞 "` | Une chaîne de caractères représentant le symbole de Node.js. | -| `detect_extensions` | `[]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `["bun.lockb", "bunfig.toml"]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[]` | Les dossiers qui activent ce module. | -| `style` | `"bold green"` | Le style du module. | -| `disabled` | `false` | Disables the `bun` module. | +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. | +| `detect_extensionsdetect_extensions` | `[]` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['bun.lockb', 'bunfig.toml']` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `style` | `'bold red'` | Le style pour le module. | +| `disabled` | `false` | Disables the `bun` module. | ### Variables @@ -541,7 +596,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. # ~/.config/starship.toml [bun] -format = "via [🍔 $version](bold green) " +format = 'via [🍔 $version](bold green) ' ``` ## C @@ -550,17 +605,17 @@ Le module `c` affiche des informations à propos de votre compilateur C. Par dé ### Options -| Option | Défaut | Description | -| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version(-$name) )]($style)"` | La chaîne de format pour le module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"C "` | Le symbole utilisé avant d’afficher les détails du compilateur | -| `detect_extensions` | `["c", "h"]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `[]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[]` | Les dossiers qui activent ce module. | -| `commands` | [ [ "cc", "--version" ], [ "gcc", "--version" ], [ "clang", "--version" ] ] | Comment détecter quel est le compilateur | -| `style` | `"bold 149"` | Le style du module. | -| `disabled` | `false` | Désactive le module `c`. | +| Option | Défaut | Description | +| ------------------------------------ | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | La chaîne de format pour le module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | Le symbole utilisé avant d’afficher les détails du compilateur | +| `detect_extensionsdetect_extensions` | `['c', 'h']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `[]` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | Comment détecter quel est le compilateur | +| `style` | `'bold 149'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `c`. | ### Variables @@ -577,7 +632,7 @@ Notez que `version` n’est pas dans le format par défaut. L’option `commands` accepte une liste de commandes pour déterminer la version du compilateur et son nom. -Chaque commande est représentée par une liste du nom de l'exécutable suivie de ses arguments, généralement quelque chose comme `["mycc", "--version"]`. Starship essayera d'exécuter chaque commande jusqu'à obtenir un résultat sur STDOUT. +Each command is represented as a list of the executable name, followed by its arguments, usually something like `['mycc', '--version']`. Starship essayera d'exécuter chaque commande jusqu'à obtenir un résultat sur STDOUT. Si un compilateur C n’est pas supporté par ce module, vous pouvez demander son ajout en [créant un ticket sur GitHub](https://github.com/starship/starship/). @@ -587,19 +642,19 @@ Si un compilateur C n’est pas supporté par ce module, vous pouvez demander so # ~/.config/starship.toml [c] -format = "via [$name $version]($style)" +format = 'via [$name $version]($style)' ``` ## 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. +Le module `character` affiche un caractère (en général une flèche) à côté de là où vous entrez le texte dans votre 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: +Le caractère vous dira si la dernière commande a été réussie ou pas. Il peut faire ça de deux façons: - en changeant de couleur(`red`/`green`) - en changeant de forme (`❯`/`✖`) -Par défaut, il ne change que la couleur. Si vous désirez également changer sa forme, jetez un œil à [cet exemple](#with-custom-error-shape). +Par défaut, il ne change que de couleur. Si vous désirez également changer sa forme, jetez un à [cet exemple](#with-custom-error-shape). ::: warning @@ -611,13 +666,13 @@ Par défaut, il ne change que la couleur. Si vous désirez également changer sa | Option | Défaut | 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é. | -| `vimcmd_symbol` | `"[❮](bold green)"` | Le format utilisé avant l'entrée de texte si le shell est en mode vim normal. | -| `vimcmd_replace_one_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim `replace_one` mode. | -| `vimcmd_replace_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim replace mode. | -| `vimcmd_visual_symbol` | `"[❮](bold yellow)"` | The format string used before the text input if the shell is in vim replace mode. | +| `format` | `'$symbol '` | Le format utilisé 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é. | +| `vimcmd_symbol` | `'[❮](bold green)'` | Le format utilisé avant l'entrée de texte si le shell est en mode vim normal. | +| `vimcmd_replace_one_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim `replace_one` mode. | +| `vimcmd_replace_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim replace mode. | +| `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | | `disabled` | `false` | Désactive le module `character`. | ### Variables @@ -634,8 +689,8 @@ Par défaut, il ne change que la couleur. Si vous désirez également changer sa # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[✗](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[✗](bold red) ' ``` #### Sans caractère d'erreur personnalisé @@ -644,8 +699,8 @@ error_symbol = "[✗](bold red) " # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[➜](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[➜](bold red) ' ``` #### Avec une forme vim personnalisée @@ -654,28 +709,28 @@ error_symbol = "[➜](bold red) " # ~/.config/starship.toml [character] -vicmd_symbol = "[V](bold green) " +vicmd_symbol = '[V](bold green) ' ``` ## CMake -Le module `cmake` affiche la version actuellement installée de [CMake](https://cmake.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `cmake` affiche la version de [CMake](https://cmake.org/) installée. Par défaut, le module s’activera si l’une de ces conditions est remplie: - Le dossier courant contient un fichier `CMakeLists.txt` - Le dossier courant contient un fichier `CMakeCache.txt` ### Options -| Option | Défaut | Description | -| ------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"△ "` | Le symbole utilisé avant la version de cmake. | -| `detect_extensions` | `[]` | Quelles extensions devraient activer ce module | -| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Quels fichiers devraient activer ce module | -| `detect_folders` | `[]` | Quels dossiers devraient activer ce module | -| `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. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'△ '` | Le symbole utilisé avant la version de cmake. | +| `detect_extensionsdetect_extensions` | `[]` | Les extensions qui déclenchent ce module | +| `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | Quels fichiers devraient activer ce module | +| `detect_folders` | `[]` | Quels dossiers devraient activer ce module | +| `style` | `'bold blue'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `cmake`. | ### Variables @@ -689,23 +744,23 @@ Le module `cmake` affiche la version actuellement installée de [CMake](https:// ## COBOL / GNUCOBOL -Le module `cobol` affiche la version de COBOL installée. Par défaut, le module sera affiché si l’une de ces conditions est remplie : +Le module `cobol` affiche la version de COBOL installée. Par défaut, le module sera affiché si l’une de ces conditions est remplie: - Le dossier courant contient un fichier finissant par `.cob` ou `.COB` - Le dossier courant contiens un fichier finissant par `.cbl` ou `.CBL` ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `symbol` | `"⚙️ "` | Le symbole utilisé avant d’afficher la version de COBOL. | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold blue"` | Le style du module. | -| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `[]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[]` | Les dossiers qui activent ce module. | -| `disabled` | `false` | Désactive le module `cobol`. | +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ | +| `symbol` | `'⚙️ '` | Le symbole utilisé avant d’afficher la version de COBOL. | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold blue'` | Le style pour le module. | +| `detect_extensionsdetect_extensions` | `['cbl', 'cob', 'CBL', 'COB']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `[]` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `disabled` | `false` | Désactive le module `cobol`. | ### Variables @@ -719,15 +774,15 @@ Le module `cobol` affiche la version de COBOL installée. Par défaut, le module ## 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. +Le module `cmd_duration` montre le temps qu'a pris la dernière commande pour s'exécuter. Le module ne sera affiché que si la commande a pris plus de deux secondes, ou plus que la valeur `min_time`, si elle existe. -::: warning N'interceptez pas le signal DEBUG avec Bash +::: warning N'accrochez pas la trappe DEBUG en Bash -Si vous utilisez starship en `bash`, n'accrochez pas `DEBUG` après avoir exécuté `eval $(starship init $0)`, ou ce module **cassera**. +Si vous utilisez starship avec `bash`, n'interceptez pas `DEBUG` après avoir exécuté `eval $(starship init $0)`, ou ce module **ne fonctionnera pas**. ::: -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. +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 tableaux `preexec_functions` et `precmd_functions` avant d'exécuter `eval $(starship init $0)`, puis procédez comme d'habitude. ### Options @@ -735,8 +790,8 @@ Les utilisateurs de Bash qui ont besoin de fonctionnalité pré-exec peuvent uti | ---------------------- | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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. | +| `format` | `'took [$duration]($style) '` | Format du module. | +| `style` | `'bold yellow'` | Le style pour le 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` | Durée minimale après laquelle activer la notification (en millisecondes). | @@ -758,7 +813,7 @@ Les utilisateurs de Bash qui ont besoin de fonctionnalité pré-exec peuvent uti [cmd_duration] min_time = 500 -format = "underwent [$duration](bold yellow)" +format = 'underwent [$duration](bold yellow)' ``` ## Conda @@ -767,7 +822,7 @@ Le module `conda` affiche l’environnement [Conda](https://docs.conda.io/en/lat ::: tip -Cela ne supprime pas le modificateur d'invite de conda, vous pouvez exécuter `conda config --set changeps1 False`. +Cela ne supprime pas le modificateur d'invite de conda, vous pourriez vouloir exécuter `conda config --set changeps1 False` pour le désactiver. ::: @@ -776,19 +831,19 @@ Cela ne supprime pas le modificateur d'invite de conda, vous pouvez exécuter `c | Option | Défaut | 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` | `"via [$symbol$environment]($style) "` | Format du module. | +| `symbol` | `'🅒 '` | Le symbole utilisé avant le nom d'environnement. | +| `style` | `'bold green'` | Le style pour le module. | +| `format` | `'via [$symbol$environment]($style) '` | Format du module. | | `ignore_base` | `true` | Ignore l'environnement `base` lorsqu'il est activé. | | `disabled` | `false` | Désactive le module `conda`. | ### 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` | La version courante de conda | +| symbol | | Reflète la valeur de l'option `symbol` | +| style\* | | Reflète la valeur de l'option `style` | *: Cette variable peut uniquement être utilisée dans une chaine de style @@ -798,7 +853,7 @@ Cela ne supprime pas le modificateur d'invite de conda, vous pouvez exécuter `c # ~/.config/starship.toml [conda] -format = "[$symbol$environment](dimmed green) " +format = '[$symbol$environment](dimmed green) ' ``` ## Conteneur @@ -809,8 +864,8 @@ Le module `container` affiche un symbole et le nom du conteneur, si vous êtes d | Option | Défaut | Description | | ---------- | ---------------------------------- | ---------------------------------------------------- | -| `symbol` | `"⬢"` | Le symbole affiché quand vous êtes dans un conteneur | -| `style` | `"bold red dimmed"` | Le style du module. | +| `symbol` | `'⬢'` | Le symbole affiché quand vous êtes dans un conteneur | +| `style` | `'bold red dimmed'` | Le style pour le module. | | `format` | `'[$symbol \[$name\]]($style) '` | Format du module. | | `disabled` | `false` | Désactive le module `container`. | @@ -835,29 +890,29 @@ format = '[$symbol \[$name\]]($style) ' ## Crystal -Le module `crystal` affiche la version actuellement installée de [Crystal](https://crystal-lang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `crystal` affiche la version de [Crystal](https://crystal-lang.org/) installée. Par défaut, le module sera affiché si l’une de ces conditions est remplie: - Le répertoire courant contient un fichier `shard.yml` - Le répertoire courant contient un fichier `.cr` ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `symbol` | `"🔮 "` | Le symbole utilisé avant d'afficher la version de crystal. | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold green"` | Le style du module. | -| `detect_extensions` | `["cr"]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `["shard.yml"]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[]` | Les dossiers qui activent ce module. | -| `disabled` | `false` | Désactive le module `crystal`. | +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ | +| `symbol` | `'🔮 '` | Le symbole utilisé avant d'afficher la version de crystal. | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold red'` | Le style pour le module. | +| `detect_extensionsdetect_extensions` | `['cr']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['shard.yml']` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `disabled` | `false` | Désactive le module `crystal`. | ### Variables | Variable | Exemple | Description | | --------- | --------- | -------------------------------------- | -| version | `v0.32.1` | La version de `cristal` | +| version | `v0.32.1` | La version de `crystal` | | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | @@ -869,27 +924,27 @@ Le module `crystal` affiche la version actuellement installée de [Crystal](http # ~/.config/starship.toml [crystal] -format = "via [✨ $version](bold blue) " +format = 'via [✨ $version](bold blue) ' ``` ## Daml -The `daml` module shows the currently used [Daml](https://www.digitalasset.com/developers) SDK version when you are in the root directory of your Daml project. The `sdk-version` in the `daml.yaml` file will be used, unless it's overridden by the `DAML_SDK_VERSION` environment variable. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +The `daml` module shows the currently used [Daml](https://www.digitalasset.com/developers) SDK version when you are in the root directory of your Daml project. The `sdk-version` in the `daml.yaml` file will be used, unless it's overridden by the `DAML_SDK_VERSION` environment variable. Par défaut, le module sera affiché si l’une de ces conditions est remplie: - Le répertoire courant contient un fichier `daml.yaml` ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"Λ "` | A format string representing the symbol of Daml | -| `style` | `"bold cyan"` | Le style du module. | -| `detect_extensions` | `[]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `["daml.yaml"]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[]` | Les dossiers qui activent ce module. | -| `disabled` | `false` | Disables the `daml` module. | +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'Λ '` | A format string representing the symbol of Daml | +| `style` | `'bold cyan'` | Le style pour le module. | +| `detect_extensionsdetect_extensions` | `[]` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['daml.yaml']` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `disabled` | `false` | Disables the `daml` module. | ### Variables @@ -907,12 +962,12 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d # ~/.config/starship.toml [daml] -format = "via [D $version](bold bright-green) " +format = 'via [D $version](bold bright-green) ' ``` ## Dart -Le module `dart` affiche la version actuellement installée de [Dart](https://dart.dev/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `dart` affiche la version de [Dart](https://dart.dev/) installée. Par défaut, le module sera affiché si l’une de ces conditions est remplie: - Le répertoire courant contient un fichier `.dart` - Le répertoire courant contient un répertoire `.dart_tool` @@ -920,16 +975,16 @@ Le module `dart` affiche la version actuellement installée de [Dart](https://da ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | Une chaîne de caractères représentant le symbole de Dart | -| `detect_extensions` | `["dart"]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[".dart_tool"]` | Les dossiers qui activent ce module. | -| `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. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🎯 '` | Une chaîne de caractères représentant le symbole de Dart | +| `detect_extensionsdetect_extensions` | `['dart']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | Les fichiers qui activent ce module. | +| `detect_folders` | `['.dart_tool']` | Les dossiers qui activent ce module. | +| `style` | `'bold blue'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `dart`. | ### Variables @@ -947,27 +1002,27 @@ Le module `dart` affiche la version actuellement installée de [Dart](https://da # ~/.config/starship.toml [dart] -format = "via [🔰 $version](bold red) " +format = 'via [🔰 $version](bold red) ' ``` ## Deno -Le module `deno` affiche la version actuellement installée de [Deno](https://deno.land/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `deno` affiche la version de [Deno](https://deno.land/) installée. Par défaut, le module sera affiché si l’une de ces conditions est remplie: - Le répertoire actuel contient un fichier `deno.json`, `deno.jsonc`, `mod.ts`, `mod.ts`, `mod.js`, `deps.ts`, ou `deps.js` ### Options -| Option | Défaut | Description | -| ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦕 "` | Une chaîne de caractères représentant le symbole de Deno | -| `detect_extensions` | `[]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `["deno.json", "deno.jsonc", "mod.ts", "mod.js", "deps.ts", "deps.js"]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[]` | Les dossiers qui activent ce module. | -| `style` | `"green bold"` | Le style du module. | -| `disabled` | `false` | Désactive le module `deno`. | +| Option | Défaut | Description | +| ------------------------------------ | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦕 '` | Une chaîne de caractères représentant le symbole de Deno | +| `detect_extensionsdetect_extensions` | `[]` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `style` | `'green bold'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `deno`. | ### Variables @@ -983,40 +1038,41 @@ Le module `deno` affiche la version actuellement installée de [Deno](https://de # ~/.config/starship.toml [deno] -format = "via [🦕 $version](green bold) " +format = 'via [🦕 $version](green bold) ' ``` ## Dossier -Le mode `directory` montre le chemin de votre dossier actuel, tronqué aux 3 dossiers parents. Votre répertoire sera également tronqué à la racine du repo git dans lequel vous vous trouvez actuellement. +Le module `directory` affiche le chemin du dossier courant, tronqué à 3 dossiers parents. Votre dossier sera également tronqué à la racine du repo git dans lequel vous vous trouvez actuellement. -Quand vous utilisez le style pwd de fish, au lieu de cacher le chemin qui est tronqué, vous verrez un nom raccourci de chaque dossier basé sur le nombre établi pour l'option. +Lorsque vous utilisez le style de pwd de fish, au lieu de cacher le chemin tronqué, vous verrez une abréviation du nom de chaque dossier, en fonction du nombre que vous avez utilisé comme valeur. -Par exemple, donné `~/Dev/Nix/nixpkgs/pkgs` où `nixpkgs` est la racine du repo, et l'option définie à `1`. Vous verrez maintenant `~/D/N/nixpkgs/pkgs`, alors que vous auriez vu `nixpkgs/pkgs` avant. +Par exemple, `~/Dev/Nix/nixpkgs/pkgs` où `nixpkgs` est la racine du repo, et l'option définie à `1`. Vous verrez maintenant `~/D/N/nixpkgs/pkgs`, alors que vous auriez vu `nixpkgs/pkgs` avant. ### 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: "…/" | -| `repo_root_style` | | Le style pour la racine du dépôt Git. La valeur par défaut est équivalent à `style`. | -| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | Le format d’un dépôt Git quand `repo_root_style` est défini. | -| `home_symbol` | `"~"` | Le symbole indiquant le répertoire personnel. | -| `use_os_path_sep` | `true` | Utiliser le séparateur de chemin du système d’exploitation au lieu de toujours utiliser `/` (par ex. `\` sous Windows) | +| Option | Défaut | Description | +| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | Le nombre de dossiers parents auquel tronquer le chemin du répertoire courant. | +| `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 pour le 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 de lecture seule. | +| `truncation_symbol` | `''` | Le symbole pour préfixer les chemins tronqués. eg: '…/' | +| `before_repo_root_style` | | The style for the path segment above the root of the git repo. La valeur par défaut est équivalent à `style`. | +| `repo_root_style` | | Le style pour la racine du dépôt Git. La valeur par défaut est équivalent à `style`. | +| `repo_root_format` | `'[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) '` | The format of a git repo when `before_repo_root_style` and `repo_root_style` is defined. | +| `home_symbol` | `'~'` | Le symbole indiquant le répertoire personnel. | +| `use_os_path_sep` | `true` | Utiliser le séparateur de chemin du système d’exploitation au lieu de toujours utiliser `/` (par ex. `\` sous Windows) |
Ce module possède quelques options de configuration avancées qui contrôlent l'affichage du répertoire. | Options avancées | Défaut | Description | | --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `substitutions` | | Table de substitutions à faire au chemin. | +| `substitutions` | | Une table de substitutions à appliquer aux chemins. | | `fish_style_pwd_dir_length` | `0` | Le nombre de caractères à utiliser lors de l'application de la logique de troncature du pwd de fish. | | `use_logical_path` | `true` | Si `true` affiche le chemin logique issu du shell via `PWD` ou `--logical-path`. Si `false` renvoie plutôt le chemin du système de fichiers physique avec les liens symboliques résolus. | @@ -1024,8 +1080,8 @@ Par exemple, donné `~/Dev/Nix/nixpkgs/pkgs` où `nixpkgs` est la racine du repo ```toml [directory.substitutions] -"/Volumes/network/path" = "/net" -"src/com/long/java/path" = "mypath" +'/Volumes/network/path' = '/net' +'src/com/long/java/path' = 'mypath' ``` `fish_style_pwd_dir_leng` interagit avec les options de troncature d'une manière qui peut être surprenante au début : si elle n'est pas nulle, les composantes du chemin qui seraient normalement tronquées sont affichées à la place avec autant de caractères. Par exemple, le chemin `/built/this/city/on/rock/and/roll`, qui devrait normalement être affiché comme `rock/and/roll`, sera affiché sous la forme de `/b/t/c/o/rock/and/roll` avec `fish_style_pwd_dir_length = 1`--les composants de chemin qui seraient normalement supprimés sont affichés avec un caractère unique. Pour `fish_style_pwd_dir_length = 2`, ce serait `/bu/th/ci/on/rock/and/roll`. @@ -1036,8 +1092,8 @@ Par exemple, donné `~/Dev/Nix/nixpkgs/pkgs` où `nixpkgs` est la racine du repo | Variable | Exemple | Description | | --------- | --------------------- | ------------------------------------- | -| path | `"D:/Projects"` | Le chemin du répertoire courant | -| style\* | `"black bold dimmed"` | Reflète la valeur de l'option `style` | +| path | `'D:/Projects'` | Le chemin du répertoire courant | +| style\* | `'black bold dimmed'` | Reflète la valeur de l'option `style` | *: Cette variable peut uniquement être utilisée dans une chaine de style @@ -1048,11 +1104,11 @@ Considérons le chemin `/path/to/home/git_repo/src/lib` | Variable | Exemple | Description | | ------------------ | --------------------- | --------------------------------------- | -| before_root_path | `"/path/to/home/"` | Le chemin avant le dossier racine Git | -| repo_root | `"git_repo"` | Le nom du dossier racine Git | -| path | `"/src/lib"` | Le reste du chemin | -| style | `"black bold dimmed"` | Reflète la valeur de l'option `style` | -| repo_root_style | `"underline white"` | Style pour le nom du dossier racine Git | +| before_root_path | `'/path/to/home/'` | Le chemin avant le dossier racine Git | +| repo_root | `'git_repo'` | Le nom du dossier racine Git | +| path | `'/src/lib'` | Le reste du chemin | +| style | `'black bold dimmed'` | Reflète la valeur de l'option `style` | +| repo_root_style | `'underline white'` | Style pour le nom du dossier racine Git |
@@ -1063,7 +1119,7 @@ Considérons le chemin `/path/to/home/git_repo/src/lib` [directory] truncation_length = 8 -truncation_symbol = "…/" +truncation_symbol = '…/' ``` ## Contexte Docker @@ -1072,22 +1128,22 @@ Le module `docker_context` affiche le [context Docker](https://docs.docker.com/e ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol$context]($style) "` | Format du module. | -| `symbol` | `"🐳 "` | Le symbole utilisé avant d'afficher le contexte Docker. | -| `only_with_files` | `true` | Afficher uniquement quand il y a une correspondance | -| `detect_extensions` | `[]` | Quelles extensions devraient activer ce module (il faut que `only_with_files` soit réglé sur true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Quels noms de fichier devraient activer ce module (il faut que `only_with_files` soit réglé sur true). | -| `detect_folders` | `[]` | Quels dossiers devraient activer ce module (il faut que `only_with_files` soit réglé sur true). | -| `style` | `"blue bold"` | Le style du module. | -| `disabled` | `false` | Désactive le module `docker_context`. | +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol$context]($style) '` | Format du module. | +| `symbol` | `'🐳 '` | Le symbole utilisé avant d'afficher le contexte Docker. | +| `only_with_files` | `true` | Afficher uniquement quand il y a une correspondance | +| `detect_extensionsdetect_extensions` | `[]` | Quelles extensions devraient activer ce module (il faut que `only_with_files` soit réglé sur true). | +| `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | Quels noms de fichier devraient activer ce module (il faut que `only_with_files` soit réglé sur true). | +| `detect_folders` | `[]` | Quels dossiers devraient activer ce module (il faut que `only_with_files` soit réglé sur true). | +| `style` | `'blue bold'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `docker_context`. | ### Variables | Variable | Exemple | Description | | --------- | -------------- | -------------------------------------- | -| context | `test_context` | Le contexte actuel de Docker | +| context | `test_context` | Le contexte docker courant | | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | @@ -1099,7 +1155,7 @@ Le module `docker_context` affiche le [context Docker](https://docs.docker.com/e # ~/.config/starship.toml [docker_context] -format = "via [🐋 $context](blue bold)" +format = 'via [🐋 $context](blue bold)' ``` ## Dotnet @@ -1125,17 +1181,17 @@ Le module affichera aussi le Moniker de Framework Cible ([\\w-]+)" = "gke-$var_cluster" +'dev.local.cluster.k8s' = 'dev' +'.*/openshift-cluster/.*' = 'openshift' +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' [kubernetes.user_aliases] -"dev.local.cluster.k8s" = "dev" -"root/.*" = "root" +'dev.local.cluster.k8s' = 'dev' +'root/.*' = 'root' ``` Only show the module in directories that contain a `k8s` file. @@ -2121,14 +2249,14 @@ Les noms de cluster long ou générés automatiquement peuvent être identifiés ```toml [kubernetes.context_aliases] # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -".*/openshift-cluster/.*" = "openshift" +'.*/openshift-cluster/.*' = 'openshift' # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$var_cluster" +'.*/(?P[\\w-]+)/.*' = '$var_cluster' # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' ``` ## Saut de ligne @@ -2139,7 +2267,7 @@ Le module `line_break` sépare l'invite en deux lignes. | Option | Défaut | Description | | ---------- | ------- | ----------------------------------------------------------------------- | -| `disabled` | `false` | Désactive le module `line_break` , faisant de l'invite une seule ligne. | +| `disabled` | `false` | Désactive le module `line_break`, mettant l'invite sur une seule ligne. | ### Exemple @@ -2159,8 +2287,8 @@ Le module `localip` affiche l’adresse IPv4 de l’interface réseau principale | Option | Défaut | Description | | ---------- | ------------------------- | ----------------------------------------------------------------- | | `ssh_only` | `true` | Afficher uniquenement l’adresse IP si connecté à une session SSH. | -| `format` | `"[$localipv4]($style) "` | Format du module. | -| `style` | `"bold yellow"` | Le style du module. | +| `format` | `'[$localipv4]($style) '` | Format du module. | +| `style` | `'bold yellow'` | Le style pour le module. | | `disabled` | `true` | Désactive le module `localip`. | ### Variables @@ -2179,31 +2307,31 @@ Le module `localip` affiche l’adresse IPv4 de l’interface réseau principale [localip] ssh_only = false -format = "@[$localipv4](bold red) " +format = '@[$localipv4](bold red) ' disabled = false ``` ## Lua -Le module `lua` affiche la version actuellement installée de [Lua](http://www.lua.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `lua` affiche la version de [Lua](http://www.lua.org/) installée. Par défaut, le module sera affiché si l’une de ces conditions est remplie: -- Le répertoire courant contient un fichier `.lua-version` -- Le répertoire courant contient un répertoire `lua` -- Le répertoire actuel contient un fichier avec l'extension `.lua` +- Le dossier courant contient un fichier `.lua-version` +- Le dossier courant contient un dossier `lua` +- Le dossier courant contient un fichier avec l’extension `.lua` ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🌙 "` | Une chaîne de caractères représentant le symbole de Lua. | -| `detect_extensions` | `["lua"]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `[".lua-version"]` | Les fichiers qui activent ce module. | -| `detect_folders` | `["lua"]` | Les dossiers qui activent ce module. | -| `style` | `"bold blue"` | Le style du module. | -| `lua_binary` | `"lua"` | Configure le binaire lua que Starship exécute lors de l'obtention de la version. | -| `disabled` | `false` | Désactive le module `lua`. | +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🌙 '` | Une chaîne de caractères représentant le symbole de Lua. | +| `detect_extensionsdetect_extensions` | `['lua']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['.lua-version']` | Les fichiers qui activent ce module. | +| `detect_folders` | `['lua']` | Les dossiers qui activent ce module. | +| `style` | `'bold blue'` | Le style pour le module. | +| `lua_binary` | `'lua'` | Configure le binaire lua que Starship exécute lors de l'obtention de la version. | +| `disabled` | `false` | Désactive le module `lua`. | ### Variables @@ -2221,7 +2349,7 @@ Le module `lua` affiche la version actuellement installée de [Lua](http://www.l # ~/.config/starship.toml [lua] -format = "via [🌕 $version](bold blue) " +format = 'via [🌕 $version](bold blue) ' ``` ## Utilisation mémoire @@ -2241,9 +2369,9 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur | Option | Défaut | Description | | ----------- | ----------------------------------------------- | ------------------------------------------------------------------------------ | | `threshold` | `75` | Masquer l'utilisation de la mémoire à moins qu'elle ne dépasse ce pourcentage. | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | Format du module. | -| `symbol` | `"🐏"` | Le symbole utilisé avant d'afficher l'utilisation de la mémoire. | -| `style` | `"bold dimmed white"` | Le style du module. | +| `format` | `'via $symbol [${ram}( \| ${swap})]($style) '` | Format du module. | +| `symbol` | `'🐏'` | Le symbole utilisé avant d'afficher l'utilisation de la mémoire. | +| `style` | `'bold dimmed white'` | Le style pour le module. | | `disabled` | `true` | Désactiver le module `memory_usage`. | ### Variables @@ -2267,8 +2395,8 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur [memory_usage] disabled = false threshold = -1 -symbol = " " -style = "bold dimmed green" +symbol = ' ' +style = 'bold dimmed green' ``` ## Meson @@ -2279,14 +2407,14 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. ### Options -| Option | Défaut | Description | -| ------------------- | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | -| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. Vous pouvez utiliser `""` pour ne pas afficher de symbole. | -| `format` | `"via [$symbol$project]($style) "` | Format du module. | -| `symbol` | `"⬢ "` | The symbol used before displaying the project name. | -| `style` | `"blue bold"` | Le style du module. | -| `disabled` | `false` | Disables the `meson` module. | +| Option | Défaut | Description | +| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- | +| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | +| `format` | `'via [$symbol$project]($style) '` | Format du module. | +| `symbol` | `'⬢ '` | The symbol used before displaying the project name. | +| `style` | `'blue bold'` | Le style pour le module. | +| `disabled` | `false` | Disables the `meson` module. | ### Variables @@ -2305,9 +2433,9 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. [meson] disabled = false -truncation_symbol = "--" -symbol = " " -style = "bold dimmed green" +truncation_symbol = '--' +symbol = ' ' +style = 'bold dimmed green' ``` ## Branche Mercurial @@ -2318,11 +2446,11 @@ Le module `hg_branch` affiche la branche active du dépôt dans le dossier coura | Option | Défaut | Description | | ------------------- | -------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `symbol` | `" "` | Le symbole utilisé avant le marque-page hg ou le nom de la branche du dépôt dans votre répertoire courant. | -| `style` | `"bold purple"` | Le style du module. | -| `format` | `"on [$symbol$branch]($style) "` | Format du module. | +| `symbol` | `' '` | Le symbole utilisé avant le marque-page hg ou le nom de la branche du dépôt dans votre répertoire courant. | +| `style` | `'bold purple'` | Le style pour le module. | +| `format` | `'on [$symbol$branch]($style) '` | Format du module. | | `truncation_length` | `2^63 - 1` | Tronque le nom de la branche hg à `N` graphèmes | -| `truncation_symbol` | `"…"` | Le symbole utilisé pour indiquer qu'un nom de branche a été tronqué. | +| `truncation_symbol` | `'…'` | Le symbole utilisé pour indiquer qu'un nom de branche a été tronqué. | | `disabled` | `true` | Désactive le module `hg_branch`. | ### Variables @@ -2341,32 +2469,32 @@ Le module `hg_branch` affiche la branche active du dépôt dans le dossier coura # ~/.config/starship.toml [hg_branch] -format = "on [🌱 $branch](bold purple)" +format = 'on [🌱 $branch](bold purple)' truncation_length = 4 -truncation_symbol = "" +truncation_symbol = '' ``` ## Nim -Le module `nim` affiche la version de [Nim](https://nim-lang.org/) installée. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `nim` affiche la version de [Nim](https://nim-lang.org/) installée. Par défaut, le module sera affiché si l’une de ces conditions est remplie: - Le dossier courant contient un fichier `nim.cfg` -- Le répertoire actuel contient un fichier avec l'extension `.nim` -- Le répertoire actuel contient un fichier avec l'extension `.nims` -- Le répertoire actuel contient un fichier avec l'extension `.nimble` +- Le dossier courant contient un fichier avec l’extension `.nim` +- Le dossier courant contient un fichier avec l’extension `.nims` +- Le dossier courant contient un fichier avec l’extension `.nimble` ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | Format du module | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | Le symbole utilisé avant d'afficher la version de Nim. | -| `detect_extensions` | `["nim", "nims", "nimble"]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `["nim.cfg"]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[]` | Les dossiers qui activent ce module. | -| `style` | `"bold yellow"` | Le style du module. | -| `disabled` | `false` | Désactive le module `nim`. | +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | Format du module | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'👑 '` | Le symbole utilisé avant d'afficher la version de Nim. | +| `detect_extensionsdetect_extensions` | `['nim', 'nims', 'nimble']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['nim.cfg']` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `style` | `'bold yellow'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `nim`. | ### Variables @@ -2384,8 +2512,8 @@ Le module `nim` affiche la version de [Nim](https://nim-lang.org/) installée. P # ~/.config/starship.toml [nim] -style = "yellow" -symbol = "🎣 " +style = 'yellow' +symbol = '🎣 ' ``` ## Nix-shell @@ -2397,10 +2525,10 @@ Le module `nix_shell` affiche la version de l’environnement [nix-shell](https: | Option | Défaut | Description | | ------------ | ---------------------------------------------- | ---------------------------------------------------------- | | `format` | `'via [$symbol$state( \($name\))]($style) '` | Format du module. | -| `symbol` | `"❄️ "` | Une chaîne de format représentant le symbole de nix-shell. | -| `style` | `"bold blue"` | Le style du module. | -| `impure_msg` | `"impure"` | Une chaîne de format affichée lorsque le shell est impur. | -| `pure_msg` | `"pure"` | Une chaîne de format affichée lorsque le shell est pur. | +| `symbol` | `'❄️ '` | Une chaîne de format représentant le symbole de nix-shell. | +| `style` | `'bold blue'` | Le style pour le module. | +| `impure_msg` | `'impure'` | Une chaîne de format affichée lorsque le shell est impur. | +| `pure_msg` | `'pure'` | Une chaîne de format affichée lorsque le shell est pur. | | `disabled` | `false` | Désactive le module `nix_shell`. | ### Variables @@ -2421,35 +2549,35 @@ Le module `nix_shell` affiche la version de l’environnement [nix-shell](https: [nix_shell] disabled = true -impure_msg = "[impure shell](bold red)" -pure_msg = "[pure shell](bold green)" +impure_msg = '[impure shell](bold red)' +pure_msg = '[pure shell](bold green)' format = 'via [☃️ $state( \($name\))](bold blue) ' ``` ## Node.js -Le module `nodejs` affiche la version de [Node.js](https://nodejs.org/) installée. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `nodejs` affiche la version de [Node.js](https://nodejs.org/) installée. Par défaut, le module sera affiché si l’une de ces conditions est remplie: - Le dossier courant contient un fichier `package.json` -- Le répertoire courant contient un fichier `.node-version` -- Le répertoire courant contient un fichier `.nvmrc` +- Le dossier courant contient un fichier `.node-version` +- Le dossier courant contient un fichier `.nvmrc` - Le répertoire courant contient un répertoire `node_modules` -- Le répertoire actuel contient un fichier avec l'extension `.js`, `.mjs` ou `.cjs` +- Le dossier courant contient un fichier avec l’extension `.js`, `.mjs` ou `.cjs` - Le dossier courant contient un fichier avec l’extension `.ts`, `.mts` ou `.cts` ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | Une chaîne de caractères représentant le symbole de Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts", "mts", "cts"]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `["package.json", ".node-version"]` | Les fichiers qui activent ce module. | -| `detect_folders` | `["node_modules"]` | Les dossiers qui activent ce module. | -| `style` | `"bold green"` | Le style du module. | -| `disabled` | `false` | Désactive le module `nodejs`. | -| `not_capable_style` | `bold red` | Le style du module quand une propriété engines dans le package.json ne correspond pas à la version Node.js. | +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | Une chaîne de caractères représentant le symbole de Node.js. | +| `detect_extensionsdetect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['package.json', '.node-version']` | Les fichiers qui activent ce module. | +| `detect_folders` | `['node_modules']` | Les dossiers qui activent ce module. | +| `style` | `'bold green'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `nodejs`. | +| `not_capable_style` | `bold red` | Le style du module quand une propriété engines dans le package.json ne correspond pas à la version Node.js. | ### Variables @@ -2467,34 +2595,34 @@ Le module `nodejs` affiche la version de [Node.js](https://nodejs.org/) install # ~/.config/starship.toml [nodejs] -format = "via [🤖 $version](bold green) " +format = 'via [🤖 $version](bold green) ' ``` ## OCaml -Le module `ocaml` affiche la version de [OCaml](https://ocaml.org/) installée. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `ocaml` affiche la version de [OCaml](https://ocaml.org/) installée. Par défaut, le module sera affiché si l’une de ces conditions est remplie: -- Le répertoire courant contient un fichier avec l'extension `.opam` ou le répertoire `_opam` +- Le dossier courant contient un fichier avec l’extension `.opam` ou un dossier `_opam` - Le répertoire courant contient un répertoire `esy.lock` -- Le répertoire courant contient un fichier `dune` ou `dune-project` -- Le répertoire courant contient un fichier `jbuild` ou `jbuild-ignore` -- Le répertoire courant contient un fichier `.merlin` -- Le répertoire actuel contient un fichier avec l'extension `.ml`, `.mli`, `.re` ou `.rei` +- Le dossier courant contient un fichier `dune` ou `dune-project` +- Le dossier courant contient un fichier `jbuild` ou `jbuild-ignore` +- Le dossier courant contient un fichier `.merlin` +- Le dossier courant contient un fichier avec l’extension `.ml`, `.mli`, `.re` ou `.rei` ### Options -| Option | Défaut | Description | -| ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | La chaîne de format pour le module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | Le symbole utilisé avant d'afficher la version de OCaml. | -| `global_switch_indicator` | `""` | La chaîne de caractères utilisée pour représenter le commutateur OPAM global. | -| `local_switch_indicator` | `"*"` | La chaîne de caractères utilisée pour représenter le commutateur OPAM local. | -| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Les fichiers qui activent ce module. | -| `detect_folders` | `["_opam", "esy.lock"]` | Les dossiers qui activent ce module. | -| `style` | `"bold yellow"` | Le style du module. | -| `disabled` | `false` | Désactive le module `ocaml`. | +| Option | Défaut | Description | +| ------------------------------------ | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | La chaîne de format pour le module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐫 '` | Le symbole utilisé avant d'afficher la version de OCaml. | +| `global_switch_indicator` | `''` | La chaîne de caractères utilisée pour représenter le commutateur OPAM global. | +| `local_switch_indicator` | `'*'` | La chaîne de caractères utilisée pour représenter le commutateur OPAM local. | +| `detect_extensionsdetect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['dune', 'dune-project', 'jbuild', 'jbuild-ignore', '.merlin']` | Les fichiers qui activent ce module. | +| `detect_folders` | `['_opam', 'esy.lock']` | Les dossiers qui activent ce module. | +| `style` | `'bold yellow'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `ocaml`. | ### Variables @@ -2514,7 +2642,43 @@ Le module `ocaml` affiche la version de [OCaml](https://ocaml.org/) installée. # ~/.config/starship.toml [ocaml] -format = "via [🐪 $version]($style) " +format = 'via [🐪 $version]($style) ' +``` + +## Open Policy Agent + +The `opa` module shows the currently installed version of the OPA tool. By default the module will be shown if the current directory contains a `.rego` file. + +### Options + +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | +| `detect_extensionsdetect_extensions` | `['rego']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `[]` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `style` | `'bold blue'` | Le style pour le module. | +| `disabled` | `false` | Disables the `opa` module. | + +### Variables + +| Variable | Exemple | Description | +| --------- | --------- | -------------------------------------- | +| version | `v0.44.0` | The version of `opa` | +| symbol | | Reflète la valeur de l'option `symbol` | +| style\* | | Reflète la valeur de l'option `style` | + +*: Cette variable peut uniquement être utilisée dans une chaine de style + +### Exemple + +```toml +# ~/.config/starship.toml + +[opa] +format = 'via [⛑️ $version](bold red) ' ``` ## OpenStack @@ -2526,8 +2690,8 @@ The `openstack` module shows the current OpenStack cloud and project. The module | Option | Défaut | Description | | ---------- | ----------------------------------------------- | -------------------------------------------------------------- | | `format` | `'on [$symbol$cloud(\($project\))]($style) '` | Format du module. | -| `symbol` | `"☁️ "` | Le symbole utilisé avant d'afficher le cloud OpenStack actuel. | -| `style` | `"bold yellow"` | Le style du module. | +| `symbol` | `'☁️ '` | Le symbole utilisé avant d'afficher le cloud OpenStack actuel. | +| `style` | `'bold yellow'` | Le style pour le module. | | `disabled` | `false` | Désactive le module `openstack`. | ### Variables @@ -2548,8 +2712,105 @@ The `openstack` module shows the current OpenStack cloud and project. The module [openstack] format = 'on [$symbol$cloud(\($project\))]($style) ' -style = "bold yellow" -symbol = "☁️ " +style = 'bold yellow' +symbol = '☁️ ' +``` + +## OS + +The `os` module shows the current operating system. OS information is detected via the [os_info](https://lib.rs/crates/os_info) crate. + +::: warning + +The [os_info](https://lib.rs/crates/os_info) crate used by this module is known to be inaccurate on some systems. + +::: + +::: tip + +Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration. + +::: + +### Options + +| Option | Défaut | Description | +| ---------- | --------------------- | ------------------------------------------------------ | +| `format` | `"[$symbol]($style)"` | Format du module. | +| `style` | `"bold white"` | Le style pour le module. | +| `disabled` | `true` | Disables the `os` module. | +| `symbols` | | A table that maps each operating system to its symbol. | + +`symbols` allows you to define arbitrary symbols to display for each operating system type. Operating system types not defined by your configuration use the default symbols table below. All operating systems currently supported by the module are listed below. If you would like an operating system to be added, feel free to open a [feature request](https://github.com/starship/starship/issues/new/choose). + +```toml +# This is the default symbols table. +[os.symbols] +Alpine = "🏔️ " +Amazon = "🙂 " +Android = "🤖 " +Arch = "🎗️ " +CentOS = "💠 " +Debian = "🌀 " +DragonFly = "🐉 " +Emscripten = "🔗 " +EndeavourOS = "🚀 " +Fedora = "🎩 " +FreeBSD = "😈 " +Garuda = "🦅 " +Gentoo = "🗜️ " +HardenedBSD = "🛡️ " +Illumos = "🐦 " +Linux = "🐧 " +Macos = "🍎 " +Manjaro = "🥭 " +Mariner = "🌊 " +MidnightBSD = "🌘 " +Mint = "🌿 " +NetBSD = "🚩 " +NixOS = "❄️ " +OpenBSD = "🐡 " +openSUSE = "🦎 " +OracleLinux = "🦴 " +Pop = "🍭 " +Raspbian = "🍓 " +Redhat = "🎩 " +RedHatEnterprise = "🎩 " +Redox = "🧪 " +Solus = "⛵ " +SUSE = "🦎 " +Ubuntu = "🎯 " +Unknown = "❓ " +Windows = "🪟 " +``` + +### Variables + +| Variable | Exemple | Description | +| --------- | ------------ | ------------------------------------------------------------------ | +| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | +| name | `Arch Linux` | The current operating system name | +| type | `Arch` | The current operating system type | +| codename | | The current operating system codename, if applicable | +| edition | | The current operating system edition, if applicable | +| version | | The current operating system version, if applicable | +| style\* | | Reflète la valeur de l'option `style` | + +*: Cette variable peut uniquement être utilisée dans une chaine de style + +### Exemple + +```toml +# ~/.config/starship.toml + +[os] +format = "on [($name )]($style)" +style = "bold blue" +disabled = false + +[os.symbols] +Windows = " " +Arch = "Arch is the best! " ``` ## Version du paquet @@ -2580,10 +2841,10 @@ The `package` module is shown when the current directory is the repository for a | Option | Défaut | Description | | ----------------- | --------------------------------- | ------------------------------------------------------------------------------------------ | -| `format` | `"is [$symbol$version]($style) "` | Format du module. | -| `symbol` | `"📦 "` | Le symbole utilisé avant d'afficher la version du paquet. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold 208"` | Le style du module. | +| `format` | `'is [$symbol$version]($style) '` | Format du module. | +| `symbol` | `'📦 '` | Le symbole utilisé avant d'afficher la version du paquet. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold 208'` | Le style pour le module. | | `display_private` | `false` | Active l’affichage des versions des paquets marqués comme privés. | | `disabled` | `false` | Désactive le module `package`. | @@ -2603,31 +2864,31 @@ The `package` module is shown when the current directory is the repository for a # ~/.config/starship.toml [package] -format = "via [🎁 $version](208 bold) " +format = 'via [🎁 $version](208 bold) ' ``` ## Perl -Le module `perl` affiche la version de [Perl](https://www.perl.org/) installée. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `perl` affiche la version de [Perl](https://www.perl.org/) installée. Par défaut, le module sera affiché si l’une de ces conditions est remplie: -- Le répertoire courant contient un fichier `Makefile.PL` ou `Build.PL` -- Le répertoire courant contient un fichier `cpanfile` ou `cpanfile.snapshot` -- Le répertoire courant contient un fichier `META.json` ou `META.yml` -- Le répertoire courant contient un fichier `.perl-version` +- Le dossier courant contient un fichier `Makefile.PL` ou `Build.PL` +- Le dossier courant contient un fichier `cpanfile` ou `cpanfile.snapshot` +- Le dossier courant contient un fichier `META.json` ou `META.yml` +- Le dossier courant contient un fichier `.perl-version` - Le répertoire courant contient un fichier `.pl`, `.pm` ou `.pod` ### Options -| Option | Défaut | Description | -| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | La chaîne de format pour le module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | Le symbole utilisé avant d'afficher la version de Perl | -| `detect_extensions` | `["pl", "pm", "pod"]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[]` | Les dossiers qui activent ce module. | -| `style` | `"bold 149"` | Le style du module. | -| `disabled` | `false` | Désactive le module `perl`. | +| Option | Défaut | Description | +| ------------------------------------ | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | La chaîne de format pour le module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐪 '` | Le symbole utilisé avant d'afficher la version de Perl | +| `detect_extensionsdetect_extensions` | `['pl', 'pm', 'pod']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `style` | `'bold 149'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `perl`. | ### Variables @@ -2643,29 +2904,29 @@ Le module `perl` affiche la version de [Perl](https://www.perl.org/) installée. # ~/.config/starship.toml [perl] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## PHP -Le module `php` affiche la version de [PHP](https://www.php.net/) installée. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `php` affiche la version de [PHP](https://www.php.net/) installée. Par défaut, le module sera affiché si l’une de ces conditions est remplie: - Le dossier courant contient un fichier `composer.json` -- Le répertoire courant contient un fichier `.php-version` +- Le dossier courant contient un fichier `.php-version` - Le répertoire courant contient un fichier avec l'extension `.php` ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | Le symbole utilisé avant d'afficher la version de PHP. | -| `detect_extensions` | `["php"]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `["composer.json", ".php-version"]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[]` | Les dossiers qui activent ce module. | -| `style` | `"147 bold"` | Le style du module. | -| `disabled` | `false` | Désactive le module `php`. | +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐘 '` | Le symbole utilisé avant d'afficher la version de PHP. | +| `detect_extensionsdetect_extensions` | `['php']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['composer.json', '.php-version']` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `style` | `'147 bold'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `php`. | ### Variables @@ -2683,7 +2944,7 @@ Le module `php` affiche la version de [PHP](https://www.php.net/) installée. Pa # ~/.config/starship.toml [php] -format = "via [🔹 $version](147 bold) " +format = 'via [🔹 $version](147 bold) ' ``` ## Pulumi @@ -2696,7 +2957,7 @@ Par défaut, la version de Pulumi n'est pas affichée, car cela prendre un ordre ::: -Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Par défaut, le module sera affiché si l’une de ces conditions est remplie: - Le dossier courant contient soit un `Pulumi.yaml`, soit un `Pulumi.yml` - A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` unless `search_upwards` is set to `false` @@ -2705,10 +2966,10 @@ Par défaut le module sera activé si au moins l'une des conditions suivantes es | Option | Défaut | Description | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($username@)$stack]($style) "` | La chaîne de format pour le module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string shown before the Pulumi stack. | -| `style` | `"bold 5"` | Le style du module. | +| `format` | `'via [$symbol($username@)$stack]($style) '` | La chaîne de format pour le module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string shown before the Pulumi stack. | +| `style` | `'bold 5'` | Le style pour le module. | | `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | | `disabled` | `false` | Désactive le module `pulumi`. | @@ -2732,7 +2993,7 @@ Par défaut le module sera activé si au moins l'une des conditions suivantes es # ~/.config/starship.toml [pulumi] -format = "[🛥 ($version )$stack]($style) " +format = '[🛥 ($version )$stack]($style) ' ``` #### Sans la version de Pulumi @@ -2740,29 +3001,29 @@ format = "[🛥 ($version )$stack]($style) " ```toml # ~/.config/starship.toml [pulumi] -symbol = "🛥 " -format = "[$symbol$stack]($style) " +symbol = '🛥 ' +format = '[$symbol$stack]($style) ' ``` ## PureScript -Le module `purescript` affiche la version de [PureScript](https://www.purescript.org/) installée. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `purescript` affiche la version de [PureScript](https://www.purescript.org/) installée. Par défaut, le module sera affiché si l’une de ces conditions est remplie: -- Le répertoire courant contient un fichier `spago.dhall` -- Le répertoire actuel contient un fichier avec l'extension `.purs` +- Le dossier courant contient un fichier `spago.dhall` +- Le dossier courant contient un fichier avec l’extension `.purs` ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"<=> "` | Le symbole utilisé avant d'afficher la version de PureScript. | -| `detect_extensions` | `["purs"]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `["spago.dhall"]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[]` | Les dossiers qui activent ce module. | -| `style` | `"bold white"` | Le style du module. | -| `disabled` | `false` | Désactive le module `purescript`. | +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'<=> '` | Le symbole utilisé avant d'afficher la version de PureScript. | +| `detect_extensionsdetect_extensions` | `['purs']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['spago.dhall']` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `style` | `'bold white'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `purescript`. | ### Variables @@ -2780,7 +3041,7 @@ Le module `purescript` affiche la version de [PureScript](https://www.purescript # ~/.config/starship.toml [purescript] -format = "via [$symbol$version](bold white)" +format = 'via [$symbol$version](bold white)' ``` ## Python @@ -2789,39 +3050,39 @@ Le module `python` affiche la version de [Python](https://www.python.org/) insta Si `pyenv_version_name` est défini à `true`, il affichera le nom de la version de pyenv. Sinon, il affichera le numéro de version que donne `python --version`. -Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Par défaut, le module sera affiché si l’une de ces conditions est remplie: -- Le répertoire courant contient un fichier `.python-version` -- Le répertoire courant contient un fichier `Pipfile` -- Le répertoire courant contient un fichier `__init__.py` +- Le dossier courant contient un fichier `.python-version` +- Le dossier courant contient un fichier `Pipfile` +- Le dossier courant contient un fichier `__init__.py` - Le dossier courant contient un fichier `pyproject.toml` - Le dossier courant contient un fichier `requirements.txt` - Le dossier courant contient un fichier `setup.py` - Le dossier courant contient un fichier `tox.ini` -- Le répertoire actuel contient un fichier avec l'extension `.py`. +- Le dossier courant contient un fichier avec l’extension `.py`. - Un environnement virtuel est actuellement activé ### Options -| Option | Défaut | Description | -| -------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | Une chaîne de caractères représentant le symbole de Python | -| `style` | `"yellow bold"` | Le style du module. | -| `pyenv_version_name` | `false` | Utiliser pyenv pour obtenir la version de Python | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | -| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `detect_extensions` | `["py"]` | Quelles extensions devraient activer ce module | -| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Quels fichiers devraient activer ce module | -| `detect_folders` | `[]` | Quels dossiers devraient activer ce module | -| `disabled` | `false` | Désactive le module `python`. | +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐍 '` | Une chaîne de caractères représentant le symbole de Python | +| `style` | `'yellow bold'` | Le style pour le module. | +| `pyenv_version_name` | `false` | Utiliser pyenv pour obtenir la version de Python | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | +| `detect_extensionsdetect_extensions` | `['py']` | Les extensions qui déclenchent ce module | +| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Quels fichiers devraient activer ce module | +| `detect_folders` | `[]` | Quels dossiers devraient activer ce module | +| `disabled` | `false` | Désactive le module `python`. | ::: tip La variable `python_binary` accepte soit une chaine, soit une liste de chaines de caractères. Starship essayera d'exécuter chaque binaire jusqu'à obtenir un résultat. Notez que vous ne pouvez modifier que le binaire que Starship exécute pour obtenir la version de Python, mais pas les arguments utilisés. -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). Si vous ne travaillez plus avec Python 2 mais ne pouvez pas le supprimer du système, changer ceci par `"python3"` cachera tous les Python version 2, voir l’exemple ci-dessous. +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. ::: @@ -2829,11 +3090,11 @@ The default values and order for `python_binary` was chosen to first identify th | Variable | Exemple | Description | | ------------ | --------------- | -------------------------------------------- | -| version | `"v3.8.1"` | La version de `python` | -| symbol | `"🐍 "` | Reflète la valeur de l'option `symbol` | -| style | `"yellow bold"` | Reflète la valeur de l'option `style` | -| pyenv_prefix | `"pyenv "` | Reflète la valeur de l'option `pyenv_prefix` | -| virtualenv | `"venv"` | Le nom du `virtualenv` courant | +| version | `'v3.8.1'` | La version de `python` | +| symbol | `'🐍 '` | Reflète la valeur de l'option `symbol` | +| style | `'yellow bold'` | Reflète la valeur de l'option `style` | +| pyenv_prefix | `'pyenv '` | Reflète la valeur de l'option `pyenv_prefix` | +| virtualenv | `'venv'` | Le nom du `virtualenv` courant | ### Exemple @@ -2841,7 +3102,7 @@ The default values and order for `python_binary` was chosen to first identify th # ~/.config/starship.toml [python] -symbol = "👾 " +symbol = '👾 ' pyenv_version_name = true ``` @@ -2850,7 +3111,7 @@ pyenv_version_name = true [python] # N'utilisez que le binaire `python3` pour obtenir la version. -python_binary = "python3" +python_binary = 'python3' ``` ```toml @@ -2870,33 +3131,33 @@ detect_extensions = [] # Notez que cela ne fonctionnera que lorsque le venv est à l'intérieur du projet, # et uniquement lorsque vous vous situez dans le répertoire contenant le dossier du venv # mais peut-être que c'est suffisant? -python_binary = ["./venv/bin/python", "python", "python3", "python2"] +python_binary = ['./venv/bin/python', 'python', 'python3', 'python2'] ``` ## R Le module `rlang` affiche la version de [R](https://www.r-project.org/) installée. Le module sera affiché si l'une de ces conditions est remplie: -- Le répertoire actuel contient un fichier avec l'extension `.R`. -- Le répertoire actuel contient un fichier avec l'extension `.Rd`. -- Le répertoire actuel contient un fichier avec l'extension `.Rmd`. -- Le répertoire actuel contient un fichier avec l'extension `.Rproj`. -- Le répertoire actuel contient un fichier avec l'extension `.Rsx`. -- Le répertoire courant contient un fichier `.Rprofile` +- Le dossier courant contient un fichier avec l’extension `.R`. +- Le dossier courant contient un fichier avec l’extension `.Rd`. +- Le dossier courant contient un fichier avec l’extension `.Rmd`. +- Le dossier courant contient un fichier avec l’extension `.Rproj`. +- Le dossier courant contient un fichier avec l’extension `.Rsx`. +- Le dossier courant contient un fichier `.Rprofile` - Le répertoire courant contient un dossier `.Rproj.user` ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"📐"` | Une chaîne de caractères représentant le symbole de R. | -| `style` | `"blue bold"` | Le style du module. | -| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Quelles extensions devraient activer ce module | -| `detect_files` | `[".Rprofile"]` | Quels fichiers devraient activer ce module | -| `detect_folders` | `[".Rproj.user"]` | Quels dossiers devraient activer ce module | -| `disabled` | `false` | Désactive le module `r`. | +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'📐'` | Une chaîne de caractères représentant le symbole de R. | +| `style` | `'blue bold'` | Le style pour le module. | +| `detect_extensionsdetect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | Les extensions qui déclenchent ce module | +| `detect_files` | `['.Rprofile']` | Quels fichiers devraient activer ce module | +| `detect_folders` | `['.Rproj.user']` | Quels dossiers devraient activer ce module | +| `disabled` | `false` | Désactive le module `r`. | ### Variables @@ -2904,7 +3165,7 @@ Le module `rlang` affiche la version de [R](https://www.r-project.org/) install | -------- | ------------- | -------------------------------------- | | version | `v4.0.5` | La version de `R` | | symbol | | Reflète la valeur de l'option `symbol` | -| style | `"blue bold"` | Reflète la valeur de l'option `style` | +| style | `'blue bold'` | Reflète la valeur de l'option `style` | ### Exemple @@ -2912,28 +3173,28 @@ Le module `rlang` affiche la version de [R](https://www.r-project.org/) install # ~/.config/starship.toml [rlang] -format = "with [📐 $version](blue bold) " +format = 'with [📐 $version](blue bold) ' ``` ## Raku -The `raku` module shows the currently installed version of [Raku](https://www.raku.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +The `raku` module shows the currently installed version of [Raku](https://www.raku.org/). Par défaut, le module sera affiché si l’une de ces conditions est remplie: - The current directory contains a `META6.json` file - The current directory contains a `.p6`, `.pm6`, `.raku`, `.rakumod` or `.pod6` ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version-$vm_version )]($style)"` | La chaîne de format pour le module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦋 "` | The symbol used before displaying the version of Raku | -| `detect_extensions` | `["p6", "pm6", "pod6", "raku", "rakumod"]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `["META6.json"]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[]` | Les dossiers qui activent ce module. | -| `style` | `"bold 149"` | Le style du module. | -| `disabled` | `false` | Disables the `raku` module. | +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version-$vm_version )]($style)'` | La chaîne de format pour le module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦋 '` | The symbol used before displaying the version of Raku | +| `detect_extensionsdetect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['META6.json']` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `style` | `'bold 149'` | Le style pour le module. | +| `disabled` | `false` | Disables the `raku` module. | ### Variables @@ -2950,27 +3211,27 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra # ~/.config/starship.toml [raku] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## Red -Par défaut, le module `red` affiche la version de [Red](https://www.red-lang.org/) installée. Le module est affiché si l'une de ces conditions est remplie : +Par défaut, le module `red` affiche la version de [Red](https://www.red-lang.org/) installée. Le module sera affiché si l'une de ces conditions est remplie: -- Le répertoire actuel contient un fichier avec l'extension `.red` ou `.reds` +- Le dossier courant contient un fichier avec l’extension `.red` ou `.reds` ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🔺 "` | Une chaîne de caractères représentant le symbole de Red. | -| `detect_extensions` | `["red"]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `[]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[]` | Les dossiers qui activent ce module. | -| `style` | `"red bold"` | Le style du module. | -| `disabled` | `false` | Désactive le module `red`. | +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🔺 '` | Une chaîne de caractères représentant le symbole de Red. | +| `detect_extensionsdetect_extensions` | `['red']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `[]` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `style` | `'red bold'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `red`. | ### Variables @@ -2988,33 +3249,33 @@ Par défaut, le module `red` affiche la version de [Red](https://www.red-lang.or # ~/.config/starship.toml [red] -symbol = "🔴 " +symbol = '🔴 ' ``` ## Ruby -Le module `ruby` affiche la version de [Ruby](https://www.ruby-lang.org/) installée. Le module est affiché si l'une de ces conditions est remplie : +Le module `ruby` affiche la version de [Ruby](https://www.ruby-lang.org/) installée. Le module sera affiché si l'une de ces conditions est remplie: -- Le répertoire courant contient un fichier `Gemfile` -- Le répertoire courant contient un fichier `.ruby-version` -- Le répertoire courant contient un fichier `.rb` +- Le dossier courant contient un fichier `Gemfile` +- Le dossier courant contient un fichier `.ruby-version` +- Le dossier courant contient un fichier `.rb` - La variable d’environnement `RUBY_VERSION` ou `RBENV_VERSION` est définie Starship obtient la version actuelle de Ruby en exécutant `ruby -v`. ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💎 "` | Une chaîne de caractères représentant le symbole de Ruby. | -| `detect_extensions` | `["rb"]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `["Gemfile", ".ruby-version"]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[]` | Les dossiers qui activent ce module. | -| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Les variables d’environnement qui activent ce module. | -| `style` | `"bold green"` | Le style du module. | -| `disabled` | `false` | Désactive le module `ruby`. | +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💎 '` | Une chaîne de caractères représentant le symbole de Ruby. | +| `detect_extensionsdetect_extensions` | `['rb']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['Gemfile', '.ruby-version']` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Les variables d’environnement qui activent ce module. | +| `style` | `'bold red'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `ruby`. | ### Variables @@ -3032,28 +3293,28 @@ Starship obtient la version actuelle de Ruby en exécutant `ruby -v`. # ~/.config/starship.toml [ruby] -symbol = "🔺 " +symbol = '🔺 ' ``` ## Rust -Le module `rust` affiche la version de [Rust](https://www.rust-lang.org/) installée. Le module est affiché si l'une de ces conditions est remplie : +Le module `rust` affiche la version de [Rust](https://www.rust-lang.org/) installée. Le module sera affiché si l'une de ces conditions est remplie: -- Le répertoire courant contient un fichier `Cargo.toml` -- Le répertoire actuel contient un fichier avec l'extension `.rs` +- Le dossier courant contient un fichier `Cargo.toml` +- Le dossier courant contient un fichier avec l’extension `.rs` ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦀 "` | Une chaîne de caractères représentant le symbole de Rust | -| `detect_extensions` | `["rs"]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `["Cargo.toml"]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[]` | Les dossiers qui activent ce module. | -| `style` | `"bold green"` | Le style du module. | -| `disabled` | `false` | Désactive le module `rust`. | +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦀 '` | Une chaîne de caractères représentant le symbole de Rust | +| `detect_extensionsdetect_extensions` | `['rs']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['Cargo.toml']` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `style` | `'bold red'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `rust`. | ### Variables @@ -3073,29 +3334,29 @@ Le module `rust` affiche la version de [Rust](https://www.rust-lang.org/) instal # ~/.config/starship.toml [rust] -format = "via [⚙️ $version](red bold)" +format = 'via [⚙️ $version](red bold)' ``` ## Scala -Le module `scale` affiche la version de [Scala](https://www.scala-lang.org/) installée. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `scale` affiche la version de [Scala](https://www.scala-lang.org/) installée. Par défaut, le module sera affiché si l’une de ces conditions est remplie: -- Le répertoire courant contient un fichier `build.sbt`, `.scalaenv` ou `.sbtenv` -- Le répertoire actuel contient un fichier avec l'extension `.scala` ou `.sbt` +- Le dossier courant contient un fichier `build.sbt`, `.scalaenv` ou `.sbtenv` +- Le dossier courant contient un fichier avec l’extension `.scala` ou `.sbt` - Le répertoire courant contient un répertoire nommé `.metals` ### Options -| Option | Défaut | Description | -| ------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------ | -| `format` | `"via [${symbol}(${version} )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["sbt", "scala"]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[".metals"]` | Quels dossiers devraient activer ce module. | -| `symbol` | `"🆂 "` | Une chaîne de caractères représentant le symbole de Scala. | -| `style` | `"red dimmed"` | Le style du module. | -| `disabled` | `false` | Désactive le module `scala`. | +| Option | Défaut | Description | +| ------------------------------------ | ---------------------------------------- | ------------------------------------------------------------------------------------------ | +| `format` | `'via [${symbol}(${version} )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `detect_extensionsdetect_extensions` | `['sbt', 'scala']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Les fichiers qui activent ce module. | +| `detect_folders` | `['.metals']` | Quels dossiers devraient activer ce module. | +| `symbol` | `'🆂 '` | Une chaîne de caractères représentant le symbole de Scala. | +| `style` | `'red dimmed'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `scala`. | ### Variables @@ -3113,7 +3374,7 @@ Le module `scale` affiche la version de [Scala](https://www.scala-lang.org/) ins # ~/.config/starship.toml [scala] -symbol = "🌟 " +symbol = '🌟 ' ``` ## Shell @@ -3130,19 +3391,19 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur | Option | Défaut | Description | | ---------------------- | ------------------------- | ----------------------------------------------------------- | -| `bash_indicator` | `"bsh"` | Chaine de formatage utilisée pour représenter bash. | -| `fish_indicator` | `"fsh"` | Chaine de formatage utilisée pour représenter fish. | -| `zsh_indicator` | `"zsh"` | Chaine de formatage utilisée pour représenter zsh. | -| `powershell_indicator` | `"psh"` | Chaine de formatage utilisée pour représenter powershell. | -| `ion_indicator` | `"ion"` | Chaine de formatage utilisée pour représenter ion. | -| `elvish_indicator` | `"esh"` | Chaine de formatage utilisée pour représenter elvish. | -| `tcsh_indicator` | `"tsh"` | Chaine de formatage utilisée pour représenter tcsh. | -| `xonsh_indicator` | `"xsh"` | Chaine de formatage utilisée pour représenter xonsh. | -| `cmd_indicator` | `"cmd"` | Chaine de formatage utilisée pour représenter cmd. | -| `nu_indicator` | `"nu"` | Chaine de formatage utilisée pour représenter nu. | -| `unknown_indicator` | | La valeur par défaut à afficher quand le shell est inconnu. | -| `format` | `"[$indicator]($style) "` | Format du module. | -| `style` | `"white bold"` | Le style du module. | +| `bash_indicator` | `'bsh'` | Chaine de formatage utilisée pour représenter bash. | +| `fish_indicator` | `'fsh'` | Chaine de formatage utilisée pour représenter fish. | +| `zsh_indicator` | `'zsh'` | Chaine de formatage utilisée pour représenter zsh. | +| `powershell_indicator` | `'psh'` | Chaine de formatage utilisée pour représenter powershell. | +| `ion_indicator` | `'ion'` | Chaine de formatage utilisée pour représenter ion. | +| `elvish_indicator` | `'esh'` | Chaine de formatage utilisée pour représenter elvish. | +| `tcsh_indicator` | `'tsh'` | Chaine de formatage utilisée pour représenter tcsh. | +| `xonsh_indicator` | `'xsh'` | Chaine de formatage utilisée pour représenter xonsh. | +| `cmd_indicator` | `'cmd'` | Chaine de formatage utilisée pour représenter cmd. | +| `nu_indicator` | `'nu'` | Chaine de formatage utilisée pour représenter nu. | +| `unknown_indicator` | `''` | La valeur par défaut à afficher quand le shell est inconnu. | +| `format` | `'[$indicator]($style) '` | Format du module. | +| `style` | `'white bold'` | Le style pour le module. | | `disabled` | `true` | Désactive le module `shell`. | ### Variables @@ -3160,26 +3421,26 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur # ~/.config/starship.toml [shell] -fish_indicator = "" -powershell_indicator = "_" -unknown_indicator = "shell mystère" -style = "cyan bold" +fish_indicator = '' +powershell_indicator = '_' +unknown_indicator = 'mystery shell' +style = 'cyan bold' disabled = false ``` ## SHLVL -Le module `shlvl` montre la variable d’environnement [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) («niveau de shell») actuelle, si elle a une valeur numérique qui est égale ou dépasse le seuil défini. +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ('shell level') environment variable, if it is set to a number and meets or exceeds the specified threshold. ### Options | Option | Défaut | Description | | ----------- | ---------------------------- | ----------------------------------------------------------------------- | | `threshold` | `2` | Seuil d’affichage. | -| `format` | `"[$symbol$shlvl]($style) "` | Format du module. | -| `symbol` | `"↕️ "` | Le symbole utilisée pour représenter le `SHLVL`. | +| `format` | `'[$symbol$shlvl]($style) '` | Format du module. | +| `symbol` | `'↕️ '` | Le symbole utilisée pour représenter le `SHLVL`. | | `repeat` | `false` | Fait répéter `symbol` autant de fois que la valeur actuelle de `SHLVL`. | -| `style` | `"bold yellow"` | Le style du module. | +| `style` | `'bold yellow'` | Le style pour le module. | | `disabled` | `true` | Désactive le module `shlvl`. | ### Variables @@ -3199,7 +3460,7 @@ Le module `shlvl` montre la variable d’environnement [`SHLVL`](https://tldp.or [shlvl] disabled = false -format = "$shlvl level(s) down" +format = '$shlvl level(s) down' threshold = 3 ``` @@ -3212,8 +3473,8 @@ Le module `singularity` affiche l’image [Singularity](https://sylabs.io/singul | Option | Défaut | Description | | ---------- | -------------------------------- | ------------------------------------------------------ | | `format` | `'[$symbol\[$env\]]($style) '` | Format du module. | -| `symbol` | `""` | Une chaîne de format affichée avant le nom de l'image. | -| `style` | `"bold dimmed blue"` | Le style du module. | +| `symbol` | `''` | Une chaîne de format affichée avant le nom de l'image. | +| `style` | `'bold dimmed blue'` | Le style pour le module. | | `disabled` | `false` | Désactive le module `singularity`. | ### Variables @@ -3244,18 +3505,18 @@ Le module `spack` affiche l’environnement [Spack](https://spack.readthedocs.io | Option | Défaut | Description | | ------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `truncation_length` | `1` | Le nombre de dossiers auxquels le chemin d’environnement doit être tronqué. `0` ne signifie pas de troncature. Regardez aussi le module [`directory`](#directory). | -| `symbol` | `"🅢 "` | Le symbole utilisé avant le nom d'environnement. | -| `style` | `"bold blue"` | Le style du module. | -| `format` | `"via [$symbol$environment]($style) "` | Format du module. | +| `symbol` | `'🅢 '` | Le symbole utilisé avant le nom d'environnement. | +| `style` | `'bold blue'` | Le style pour le module. | +| `format` | `'via [$symbol$environment]($style) '` | Format du module. | | `disabled` | `false` | Désactive le module `spack`. | ### Variables -| Variable | Exemple | Description | -| ------------- | ------------ | -------------------------------------- | -| environnement | `astronauts` | L’environnement de spack courant | -| symbol | | Reflète la valeur de l'option `symbol` | -| style\* | | Reflète la valeur de l'option `style` | +| Variable | Exemple | Description | +| ----------- | ------------ | -------------------------------------- | +| environment | `astronauts` | L’environnement de spack courant | +| symbol | | Reflète la valeur de l'option `symbol` | +| style\* | | Reflète la valeur de l'option `style` | *: Cette variable peut uniquement être utilisée dans une chaine de style @@ -3265,7 +3526,7 @@ Le module `spack` affiche l’environnement [Spack](https://spack.readthedocs.io # ~/.config/starship.toml [spack] -format = "[$symbol$environment](dimmed blue) " +format = '[$symbol$environment](dimmed blue) ' ``` ## Statut @@ -3282,14 +3543,14 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur | Option | Défaut | Description | | --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `format` | `"[$symbol$status]($style) "` | Le format du module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `success_symbol` | `""` | The symbol displayed on program success | -| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | -| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | -| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | -| `style` | `"bold green"` | Le style du module. | +| `format` | `'[$symbol$status]($style) '` | Le format du module | +| `symbol` | `'❌'` | The symbol displayed on program error | +| `success_symbol` | `''` | The symbol displayed on program success | +| `not_executable_symbol` | `'🚫'` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `'🔍'` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `'🧱'` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `'⚡'` | The symbol displayed on any signal | +| `style` | `'bold red'` | Le style pour le module. | | `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code | | `pipestatus` | `false` | Enable pipestatus reporting | @@ -3321,9 +3582,9 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur # ~/.config/starship.toml [status] -style = "bg:blue" -symbol = "🔴 " -success_symbol = "🟢 SUCCESS" +style = 'bg:blue' +symbol = '🔴 ' +success_symbol = '🟢 SUCCESS' format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false @@ -3343,9 +3604,9 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur | Option | Défaut | Description | | --------------- | ------------------------ | ----------------------------------------------------------------- | -| `format` | `"[as $symbol]($style)"` | Le format du module | -| `symbol` | `"🧙 "` | Le symbole affiché quand les identifiants sont en cache | -| `style` | `"bold blue"` | Le style du module. | +| `format` | `'[as $symbol]($style)'` | Le format du module | +| `symbol` | `'🧙 '` | Le symbole affiché quand les identifiants sont en cache | +| `style` | `'bold blue'` | Le style pour le module. | | `allow_windows` | `false` | Puisque Windows n’a pas de sudo par défaut, désactivé par défaut. | | `disabled` | `true` | Désactive le module `sudo`. | @@ -3364,8 +3625,8 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur # ~/.config/starship.toml [sudo] -style = "bold green" -symbol = "👩‍💻 " +style = 'bold green' +symbol = '👩‍💻 ' disabled = false ``` @@ -3380,23 +3641,23 @@ disabled = false ## Swift -Par défaut, le module `swift` affiche la version de [Swift](https://swift.org/) installée. Le module est affiché si l'une de ces conditions est remplie : +Par défaut, le module `swift` affiche la version de [Swift](https://swift.org/) installée. Le module sera affiché si l'une de ces conditions est remplie: -- Le répertoire courant contient un fichier `Package.swift` -- Le répertoire actuel contient un fichier avec l'extension `.swift` +- Le dossier courant contient un fichier `Package.swift` +- Le dossier courant contient un fichier avec l’extension `.swift` ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐦 "` | Une chaîne de caractères représentant le symbole de Swift | -| `detect_extensions` | `["swift"]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `["Package.swift"]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[]` | Les dossiers qui activent ce module. | -| `style` | `"bold 202"` | Le style du module. | -| `disabled` | `false` | Désactiver le module `swift`. | +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐦 '` | Une chaîne de caractères représentant le symbole de Swift | +| `detect_extensionsdetect_extensions` | `['swift']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['Package.swift']` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `style` | `'bold 202'` | Le style pour le module. | +| `disabled` | `false` | Désactiver le module `swift`. | ### Variables @@ -3414,7 +3675,7 @@ Par défaut, le module `swift` affiche la version de [Swift](https://swift.org/) # ~/.config/starship.toml [swift] -format = "via [🏎 $version](red bold)" +format = 'via [🏎 $version](red bold)' ``` ## Terraform @@ -3427,23 +3688,23 @@ Par défaut, la version de Terraform n’est pas affichée, car elle est lente p ::: -Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Par défaut, le module sera affiché si l’une de ces conditions est remplie: -- Le répertoire courant contient un dossier `.terraform` -- Le répertoire courant contient un fichier avec l’extension `.tf`, `.tfplan` ou `.tfstate` +- Le dossier courant contient un dossier `.terraform` +- Le dossier courant contient un fichier avec l’extension `.tf`, `.tfplan` ou `.tfstate` ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol$workspace]($style) "` | La chaîne de format pour le module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | Une chaîne de format montrée avant l'espace de travail terraform. | -| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `[]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[".terraform"]` | Les dossiers qui activent ce module. | -| `style` | `"bold 105"` | Le style du module. | -| `disabled` | `false` | Désactive le module `terraform`. | +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol$workspace]($style) '` | La chaîne de format pour le module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💠'` | Une chaîne de format montrée avant l'espace de travail terraform. | +| `detect_extensionsdetect_extensions` | `['tf', 'tfplan', 'tfstate']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `[]` | Les fichiers qui activent ce module. | +| `detect_folders` | `['.terraform']` | Les dossiers qui activent ce module. | +| `style` | `'bold 105'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `terraform`. | ### Variables @@ -3464,7 +3725,7 @@ Par défaut le module sera activé si au moins l'une des conditions suivantes es # ~/.config/starship.toml [terraform] -format = "[🏎💨 $version$workspace]($style) " +format = '[🏎💨 $version$workspace]($style) ' ``` #### Sans la version de Terraform @@ -3473,7 +3734,7 @@ format = "[🏎💨 $version$workspace]($style) " # ~/.config/starship.toml [terraform] -format = "[🏎💨 $workspace]($style) " +format = '[🏎💨 $workspace]($style) ' ``` ## Date et Heure @@ -3490,15 +3751,15 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur | Option | Défaut | Description | | ----------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | La chaîne de format pour le module. | +| `format` | `'at [$time]($style) '` | La chaîne de format pour le module. | | `use_12hr` | `false` | Activer le format 12h | | `time_format` | voir plus bas | Le [format chrono](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) utilisé pour formater l'heure. | -| `style` | `"bold yellow"` | Le style utilisé par le module | -| `utc_time_offset` | `"local"` | Définir le décalage horaire UTC à utiliser. Intervalle de -24 < x < 24. Accepte des nombres décimaux pour s'adapter aux décalages de 30/45 minutes. | +| `style` | `'bold yellow'` | Le style utilisé par le module | +| `utc_time_offset` | `'local'` | Définir le décalage horaire UTC à utiliser. Intervalle de -24 < x < 24. Accepte des nombres décimaux pour s'adapter aux décalages de 30/45 minutes. | | `disabled` | `true` | Désactive le module `time`. | -| `time_range` | `"-"` | Définit la plage de temps pendant laquelle le module sera affiché. Les heures doivent être spécifiées au format 24 heures | +| `time_range` | `'-'` | Définit la plage de temps pendant laquelle le module sera affiché. Les heures doivent être spécifiées au format 24 heures | -Si `use_12hr` est à `true`, alors `time_format` vaut `"%r"`. Sinon, il vaut `"%T"`. Définir manuellement `time_format` outrepasse le paramètre `use_12hr`. +If `use_12hr` is `true`, then `time_format` defaults to `'%r'`. Otherwise, it defaults to `'%T'`. Définir manuellement `time_format` outrepasse le paramètre `use_12hr`. ### Variables @@ -3517,19 +3778,19 @@ Si `use_12hr` est à `true`, alors `time_format` vaut `"%r"`. Sinon, il vaut `"% [time] disabled = false format = '🕙[\[ $time \]]($style) ' -time_format = "%T" -utc_time_offset = "-5" -time_range = "10:00:00-14:00:00" +time_format = '%T' +utc_time_offset = '-5' +time_range = '10:00:00-14:00:00' ``` ## Nom d'utilisateur -Le module `username` affiche le nom de l’utilisateur actif. Le module est affiché si l'une de ces conditions est remplie : +Le module `username` affiche le nom de l’utilisateur actif. Le module sera affiché si l'une de ces conditions est remplie: - L'utilisateur courant est root/admin - L'utilisateur courant est différent de celui connecté -- L'utilisateur est actuellement connecté à une session SSH -- La variable `show_always` a comme valeur true +- L'utilisateur est actuellement connecté en tant que session SSH +- La variable `show_always` est définie à true ::: tip @@ -3541,9 +3802,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Option | Défaut | Description | | ------------- | ----------------------- | ---------------------------------------------------- | -| `style_root` | `"bold green"` | Le style utilisé quand l'utilisateur est root/admin. | -| `style_user` | `"bold yellow"` | Le style utilisé pour les utilisateurs non-root. | -| `format` | `"[$user]($style) in "` | Format du module. | +| `style_root` | `'bold red'` | Le style utilisé quand l'utilisateur est root/admin. | +| `style_user` | `'bold yellow'` | Le style utilisé pour les utilisateurs non-root. | +| `format` | `'[$user]($style) in '` | Format du module. | | `show_always` | `false` | Toujours afficher le module `username`. | | `disabled` | `false` | Désactive le module `username`. | @@ -3551,8 +3812,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Variable | Exemple | Description | | -------- | ------------ | ------------------------------------------------------------------------------------------- | -| `style` | `"red bold"` | Mirrors the value of option `style_root` when root is logged in and `style_user` otherwise. | -| `user` | `"matchai"` | L’identifiant de l’utilisateur courant. | +| `style` | `'red bold'` | Mirrors the value of option `style_root` when root is logged in and `style_user` otherwise. | +| `user` | `'matchai'` | L’identifiant de l’utilisateur courant. | ### Exemple @@ -3560,31 +3821,31 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` # ~/.config/starship.toml [username] -style_user = "white bold" -style_root = "black bold" -format = "utilisateur: [$user]($style) " +style_user = 'white bold' +style_root = 'black bold' +format = 'user: [$user]($style) ' disabled = false show_always = true ``` ## Vagrant -Le module `vagrant` affiche la version de [Vagrant](https://www.vagrantup.com/) installée. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `vagrant` affiche la version de [Vagrant](https://www.vagrantup.com/) installée. Par défaut, le module sera affiché si l’une de ces conditions est remplie: -- Le répertoire courant contient un fichier `Vagrantfile` +- Le dossier courant contient un fichier `Vagrantfile` ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"⍱ "` | Une chaîne de caractères représentant le symbole de Vagrant. | -| `detect_extensions` | `[]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `["Vagrantfile"]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[]` | Les dossiers qui activent ce module. | -| `style` | `"cyan bold"` | Le style du module. | -| `disabled` | `false` | Désactive le module `vagrant`. | +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'⍱ '` | Une chaîne de caractères représentant le symbole de Vagrant. | +| `detect_extensionsdetect_extensions` | `[]` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['Vagrantfile']` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `style` | `'cyan bold'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `vagrant`. | ### Variables @@ -3602,28 +3863,28 @@ Le module `vagrant` affiche la version de [Vagrant](https://www.vagrantup.com/) # ~/.config/starship.toml [vagrant] -format = "via [⍱ $version](bold white) " +format = 'via [⍱ $version](bold white) ' ``` ## V -Le module `vlang` affiche la version de [V](https://vlang.io/) installée. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `vlang` affiche la version de [V](https://vlang.io/) installée. Par défaut, le module sera affiché si l’une de ces conditions est remplie: -- Le répertoire courant contient un fichier avec l'extension `.v` -- Le répertoire courant contient un fichier `v.mod`, `vpkg.json` ou `.vpkg-lock.json` +- Le dossier courant contient un fichier avec l’extension `.v` +- Le dossier courant contient un fichier `v.mod`, `vpkg.json` ou `.vpkg-lock.json` ### Options -| Option | Défaut | Description | -| ------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"V "` | Une chaîne de caractères représentant le symbole de V | -| `detect_extensions` | `["v"]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[]` | Les dossiers qui activent ce module. | -| `style` | `"blue bold"` | Le style du module. | -| `disabled` | `false` | Désactive le module `vlang`. | +| Option | Défaut | Description | +| ------------------------------------ | -------------------------------------------- | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'V '` | Une chaîne de caractères représentant le symbole de V | +| `detect_extensionsdetect_extensions` | `['v']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `style` | `'blue bold'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `vlang`. | ### Variables @@ -3638,7 +3899,7 @@ Le module `vlang` affiche la version de [V](https://vlang.io/) installée. Par d ```toml # ~/.config/starship.toml [vlang] -format = "via [V $version](blue bold) " +format = 'via [V $version](blue bold) ' ``` ## VCSH @@ -3649,9 +3910,9 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | Option | Défaut | Description | | ---------- | -------------------------------- | ---------------------------------------------------- | -| `symbol` | | Le symbole utilisé avant d'afficher le nom du dépôt. | -| `style` | `"bold yellow"` | Le style du module. | -| `format` | `"vcsh [$symbol$repo]($style) "` | Format du module. | +| `symbol` | `''` | Le symbole utilisé avant d'afficher le nom du dépôt. | +| `style` | `'bold yellow'` | Le style pour le module. | +| `format` | `'vcsh [$symbol$repo]($style) '` | Format du module. | | `disabled` | `false` | Désactive le module `vcsh`. | ### Variables @@ -3670,27 +3931,27 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v # ~/.config/starship.toml [vcsh] -format = "[🆅 $repo](bold blue) " +format = '[🆅 $repo](bold blue) ' ``` ## Zig -Le module `zig` affiche la version de [Zig](https://ziglang.org/) installée. Le module est affiché si l'une de ces conditions est remplie : +Le module `zig` affiche la version de [Zig](https://ziglang.org/) installée. Le module sera affiché si l'une de ces conditions est remplie: -- Le répertoire courant contient un fichier `.zig` +- Le dossier courant contient un fichier `.zip` ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"↯ "` | Le symbole utilisé avant d'afficher la version de Zig. | -| `style` | `"bold yellow"` | Le style du module. | -| `disabled` | `false` | Désactive le module `zig`. | -| `detect_extensions` | `["zig"]` | Quelles extensions devraient activer ce module. | -| `detect_files` | `[]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'↯ '` | Le symbole utilisé avant d'afficher la version de Zig. | +| `style` | `'bold yellow'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `zig`. | +| `detect_extensionsdetect_extensions` | `['zig']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `[]` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | ### Variables @@ -3708,7 +3969,7 @@ Le module `zig` affiche la version de [Zig](https://ziglang.org/) installée. Le # ~/.config/starship.toml [zig] -symbol = "⚡️ " +symbol = '⚡️ ' ``` ## Commandes personnalisées @@ -3751,22 +4012,22 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | `""` | La commande dont la sortie doit être affichée. La commande sera transmise au shell sur l’entrée standard. | -| `when` | `false` | Soit une valeur booléenne (`true` ou `false`, sans guillemets) ou une commande shell utilisée comme condition pour afficher le module. Dans le cas d’une chaine, le module sera affiché si la commande renvoie un code de statut `0`. | -| `shell` | | [Voir plus bas](#custom-command-shell) | -| `description` | `""` | La description du module qui est affichée lors de l’exécution de `starship explain`. | -| `detect_files` | `[]` | The files that will be searched in the working directory for a match. | -| `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. | -| `detect_extensions` | `[]` | The extensions that will be searched in the working directory for a match. | -| `symbol` | `""` | Le symbole utilisé avant d'afficher la sortie de la commande. | -| `style` | `"bold green"` | Le style du module. | -| `format` | `"[$symbol($output )]($style)"` | Format du module. | -| `disabled` | `false` | Désactive le module `custom`. | -| `os` | | Nom du système d'exploitation sur lequel le module sera affiché (unix, linux, macos, windows, ... ) [Voir les valeurs possibles](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | -| `use_stdin` | | An optional boolean value that overrides whether commands should be forwarded to the shell via the standard input or as an argument. If unset standard input is used by default, unless the shell does not support it (cmd, nushell). Setting this disables shell-specific argument handling. | -| `ignore_timeout` | `false` | Ignore le paramètre global `command_timeout` et continuer à exécuter des commandes externes, peu importe le temps qu'elles prennent. | +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `command` | `''` | La commande dont la sortie doit être affichée. La commande sera transmise au shell sur l’entrée standard. | +| `when` | `false` | Soit une valeur booléenne (`true` ou `false`, sans guillemets) ou une commande shell utilisée comme condition pour afficher le module. Dans le cas d’une chaine, le module sera affiché si la commande renvoie un code de statut `0`. | +| `shell` | | [Voir plus bas](#custom-command-shell) | +| `description` | `''` | La description du module qui est affichée lors de l’exécution de `starship explain`. | +| `detect_files` | `[]` | The files that will be searched in the working directory for a match. | +| `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. | +| `detect_extensionsdetect_extensions` | `[]` | The extensions that will be searched in the working directory for a match. | +| `symbol` | `''` | Le symbole utilisé avant d'afficher la sortie de la commande. | +| `style` | `'bold green'` | Le style pour le module. | +| `format` | `'[$symbol($output )]($style)'` | Format du module. | +| `disabled` | `false` | Désactive le module `custom`. | +| `os` | | Nom du système d'exploitation sur lequel le module sera affiché (unix, linux, macos, windows, ... ) [Voir les valeurs possibles](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | +| `use_stdin` | | An optional boolean value that overrides whether commands should be forwarded to the shell via the standard input or as an argument. If unset standard input is used by default, unless the shell does not support it (cmd, nushell). Setting this disables shell-specific argument handling. | +| `ignore_timeout` | `false` | Ignore le paramètre global `command_timeout` et continuer à exécuter des commandes externes, peu importe le temps qu'elles prennent. | ### Variables @@ -3785,14 +4046,14 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt - La première chaîne est le chemin vers le shell à utiliser pour exécuter la commande. - 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. +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 -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. ```toml -shell = ["pwsh", "-Command", "-"] +shell = ['pwsh', '-Command', '-'] ``` ::: warning Make sure your custom shell configuration exits gracefully @@ -3813,19 +4074,19 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -detect_files = ["foo"] # can specify filters but wildcards are not supported -when = """ test "$HOME" = "$PWD" """ -format = " transcending [$output]($style)" +command = 'echo foo' # shows output of command +detect_files = ['foo'] # can specify filters but wildcards are not supported +when = ''' test "$HOME" = "$PWD" ''' +format = ' transcending [$output]($style)' [custom.time] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command', '-'] [custom.time-as-arg] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command'] use_stdin = false ``` diff --git a/docs/fr-FR/guide/README.md b/docs/fr-FR/guide/README.md index dde71b8c..c8f5cb7a 100644 --- a/docs/fr-FR/guide/README.md +++ b/docs/fr-FR/guide/README.md @@ -219,7 +219,6 @@ Vous pouvez aussi installer Starship en utilisant l’un de ces gestionnaires de | Alpine Linux 3.13+ | [Paquets Alpine Linux](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | | Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | -| Fedora 31+ | [Paquets Fedora](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | | Gentoo | [Paquets Gentoo](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | @@ -254,13 +253,13 @@ Install the latest version for your system with the MSI-installers from the [rel Installez Starship en utilisant l’un de ces gestionnaires de paquets: -| Dépôt | Instructions | -| -------------------------------------------------------------------------------------------- | --------------------------------------- | -| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | -| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | -| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | -| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` | -| [winget](https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/Starship/Starship) | `winget install --id Starship.Starship` | +| Dépôt | Instructions | +| --------------------------------------------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` | +| [aileron](https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/Starship/Starship) | `winget install --id Starship.Starship` |
@@ -417,11 +416,19 @@ Jetez un œil aux précédents projets qui ont inspiré la création de starship - **[reujab/silver](https://github.com/reujab/silver)** – Prompt multi-shell personnalisable, dans le style de powerline avec des icones. +## ❤️ Sponsors + +Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website. + +**Supporter Tier** + +- [Dimension](https://dimension.dev/) +


- Icône de fusée de Starship + Icône de roquette de Starship

## 📝 License -Copyright © 2019-présent, [Contributeurs Starship](https://github.com/starship/starship/graphs/contributors).
Ce projet est sous licence [ISC](https://github.com/starship/starship/blob/master/LICENSE). +Copyright © 2019-présent, [contributeurs de Starship](https://github.com/starship/starship/graphs/contributors).
Ce projet est sous licence [ISC](https://github.com/starship/starship/blob/master/LICENSE). diff --git a/docs/fr-FR/presets/README.md b/docs/fr-FR/presets/README.md index 3c3b2717..4cea68cc 100644 --- a/docs/fr-FR/presets/README.md +++ b/docs/fr-FR/presets/README.md @@ -10,6 +10,14 @@ Ce préréglage change les symboles de chaque module pour utiliser les symboles [![Capture d'écran du préréglage Nerd Font Symbols](/presets/img/nerd-font-symbols.png "Cliquez pour voir le préréglage Nerd Font Symbols")](./nerd-font) +## [No Nerd Fonts](./no-nerd-font.md) + +This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt. + +::: tip This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). ::: + +[Click to view No Nerd Font preset](./no-nerd-font) + ## [Segments entre crochets](./bracketed-segments.md) Ce préréglage modifie le format de tous les modules intégrés pour afficher leur segment entre crochets au lieu d'utiliser les labels par défaut de Starship ("via", "on", etc.). @@ -20,13 +28,19 @@ Ce préréglage modifie le format de tous les modules intégrés pour afficher l Ce préréglage change les symboles de chaque module en texte brut. Idéal si vous n'avez pas accès à Unicode. -[![Capture d'écran du préréglage Texte uniquement](/presets/img/plain-text-symbols.png "Cliquez pour voir le préréglage Texte uniquement")](./plain-text) +[![Capture d'écran du préréglage Symboles en texte brut](/presets/img/plain-text-symbols.png "Cliquez pour voir le préréglage Texte uniquement")](./plain-text) ## [Pas de version des environnements](./no-runtimes.md) Ce préréglage masque la version des environnements. Si vous travaillez dans des conteneurs ou environnements virtuels, celui-là est pour vous! -[![Capture d'écran du préréglage Pas de version des environnements](/presets/img/no-runtime-versions.png "Cliquez pour voir le préréglage Pas de version des environnements")](./no-runtimes) +[![Capture d'écran du préréglage Cacher les versions des environnements](/presets/img/no-runtime-versions.png "Cliquez pour voir le préréglage Pas de version des environnements")](./no-runtimes) + +## [No Empty Icons](./no-empty-icons.md) + +This preset does not show icons if the toolset is not found. + +[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Cliquez pour voir le préréglage Pas de version des environnements")](./no-empty-icons.md) ## [Invite de commande Pure](./pure-preset.md) @@ -39,3 +53,9 @@ Ce préréglage émule l'apparence et le comportement de [Pure](https://github.c Ce préréglage s'inspire de [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). Il montre également comment fonctionne la substitution de chemin dans starship. [![Capture d'écran du préréglage Pastel Powerline](/presets/img/pastel-powerline.png "Cliquez pour voir le préréglage Pure")](./pastel-powerline) + +## [Tokyo Night](./tokyo-night.md) + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) diff --git a/docs/fr-FR/presets/no-empty-icons.md b/docs/fr-FR/presets/no-empty-icons.md new file mode 100644 index 00000000..f09ca1c9 --- /dev/null +++ b/docs/fr-FR/presets/no-empty-icons.md @@ -0,0 +1,17 @@ +[Retourner aux préréglages](./README.md#no-empty-icons) + +# No Empty Icons Preset + +If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. + +![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) + +### Configuration + +```sh +starship preset no-empty-icons > ~/.config/starship.toml +``` + +[Cliquez pour télécharger le TOML](/presets/toml/no-empty-icons.toml) + +<<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/fr-FR/presets/no-nerd-font.md b/docs/fr-FR/presets/no-nerd-font.md new file mode 100644 index 00000000..d37eca42 --- /dev/null +++ b/docs/fr-FR/presets/no-nerd-font.md @@ -0,0 +1,19 @@ +[Retourner aux préréglages](./README.md#no-nerd-fonts) + +# No Nerd Fonts Preset + +This preset restricts the use of symbols to those from emoji and powerline sets. + +This means that even without a Nerd Font installed, you should be able to view all module symbols. + +This preset will become the default preset in a future release of starship. + +### Configuration + +```sh +starship preset no-nerd-font > ~/.config/starship.toml +``` + +[Cliquez pour télécharger le TOML](/presets/toml/no-nerd-font.toml) + +<<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/fr-FR/presets/tokyo-night.md b/docs/fr-FR/presets/tokyo-night.md new file mode 100644 index 00000000..e72c28f8 --- /dev/null +++ b/docs/fr-FR/presets/tokyo-night.md @@ -0,0 +1,21 @@ +[Retourner aux préréglages](./README.md#pastel-powerline) + +# Tokyo Night Preset + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) + +### Pré-requis + +- Une [Nerd Font](https://www.nerdfonts.com/) est installée et activée dans votre terminal + +### Configuration + +```sh +starship preset tokyo-night > ~/.config/starship.toml +``` + +[Cliquez pour télécharger le TOML](/presets/toml/tokyo-night.toml) + +<<< @/.vuepress/public/presets/toml/tokyo-night.toml diff --git a/docs/id-ID/advanced-config/README.md b/docs/id-ID/advanced-config/README.md index 3c1482c1..182f7d76 100644 --- a/docs/id-ID/advanced-config/README.md +++ b/docs/id-ID/advanced-config/README.md @@ -205,7 +205,9 @@ Sebagian shells mendukung right prompt yang mana dirender di baris yang sama ses Catatan: Right propmt merupakan sebuah baris yang mengikuti lokasi baris inputan. Untuk membuat modul rata ke kanan di atas baris masukan di dalam multi-line prompt, lihat [`fill` module](/config/#fill). -`right_format` saat ini hanya dapat bekerja pada beberapa shells berikut: elvish, fish, zsh, xonsh, cmd. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. + +Note: Nushell 0.71.0 or later is required ### Contoh @@ -280,5 +282,5 @@ Jika warna yang dipakai pada latar depan/latar belakang banyak, maka warna yang Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: - Many terminals disable support for `blink` by default -- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564). +- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). - `strikethrough` is not supported by the default macOS Terminal.app diff --git a/docs/id-ID/config/README.md b/docs/id-ID/config/README.md index 1931a27c..626f61c6 100644 --- a/docs/id-ID/config/README.md +++ b/docs/id-ID/config/README.md @@ -15,15 +15,17 @@ Seluruh konfigurasi starship dilakukan dalam file [TOML](https://github.com/toml # Inserts a blank line between shell prompts add_newline = true -# Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +# 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 ``` +### Config File Location + Kamu bisa mengganti lokasi file konfigurasi bawaan dengan menggunakan environment variable dari `STARSHIP_CONFIG`: ```sh @@ -70,6 +72,62 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') Secara konvensi, sebagian modul memiliki prefiks bawaan pada warna terminal (mis. `via` pada "nodejs") dan juga sebuah ruang kosong sebagai sufiks. +### Strings + +In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. + +The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. + +| Symbol | Type | Notes | +| ------ | ------------------------- | ------------------------------------------------------ | +| `'` | literal string | less escaping | +| `"` | string | more escaping | +| `'''` | multi-line literal string | less escaping | +| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | + +Sebagai contoh: + +```toml +# literal string +format = '☺\☻ ' + +# regular string +format = "☺\\☻ " + +# escaping Starship symbols +format = '\[\$\] ' +``` + +When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: + +```toml +# with literal string +format = ''' + +\$''' + +# with multiline basic string +format = """ + +\\$""" + +# with basic string +format = "\n\\$" +``` + +In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. + +```toml +format = """ +line1\ +line1\ +line1 +line2\ +line2\ +line2 +""" +``` + ### Format String Format string merupakan format yang sebuah modul gunakan untuk menampilkan semua variabelnya. Sebagian besar modul memiliki sebuah entri yang disebut `format` yang mengkonfigurasi format tampilan pada modul. Kamu bisa menggunakan teks, variabel, dan grup teks di dalam sebuah format string. @@ -80,9 +138,9 @@ Variabel memilki simbol `$` yang diikuti dengan nama variabelnya. The name of a Sebagai contoh: -- `$version` adalah format string dengan sebuah nama variabel `version`. -- `$git_branch$git_commit` merupakan sebuah format string dengan dua variabel bernama `git_branch` dan `git_commit`. -- `$git_branch $git_commit` memiliki dua variabel yang dipisahkan dengan sebuah spasi. +- `'$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. #### Grup Teks @@ -94,20 +152,20 @@ Pada bagian kedua, yang mana diapit dalam sebuah `()`, merupakan sebuah [penataa Sebagai contoh: -- `[on](red bold)` akan menampilkan string `on` dengan teks merah tebal. -- `[⌘ $version](bold green)` akan menampilkan simbol `⌘` yang diikuti oleh variabel yang berisikan `version`, dengan teks tebal berwarna hijau. -- `[a [b](red) c](green)` akan menampilkan `a b c` dengan `b` merah, dan `a` & `c` green. +- `'[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. #### Menata String Sebagian besar modul starship memungkinkan kamu untuk mengkonfigurasi gaya tampilannya. Hal ini dilakukan dengan sebuah entri (biasanya `style`) yang konfigurasinya ditentukan oleh string. Berikut adalah beberapa contoh penataan pada string dan kegunaannya. Untuk detail sintaksis yang lebih lengkap, lihat [panduan konfigurasi lanjutan](/advanced-config/). -- `"fg:green bg:blue"` mengeset teks berwana hijau pada latar biru -- `"bg:blue fg:bright-green"` mengeset teks hijau terang pada latar biru -- `"bold fg:27"` mengeset tebal teks dengan [ANSI color](https://i.stack.imgur.com/KTSQa.png) 27 -- `"underline bg:#bf5700"` mengeset teks bergaris bawah pada latar oranye menyala -- `"bold italic fg:purple"` mengeset teks ungu miring tebal -- `""` secara eksplisit menonaktifkan semua penataan gaya +- `'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 Perhatikan bagaimana nantinya penataanmu akan terlihat pada emulator terminalmu. Sebagai contoh, beberapa terminal emulator alih-alih membuat warnanya lebih terang, malah menebalkan teksnya, dan sebagian palet warna ada yang menggunakan nilai yang sama untuk warna normal dan terangnya. Dan juga, untuk memakai teks miring, terminalmu harus menunjang teks miring. @@ -117,43 +175,20 @@ Sebuah string dengan format bersyarat dibungkus dengan `(` dan `)` tidak akan di Sebagai contoh: -- `(@$region)` tidak akan menampilkan apapun jika nilai variabel `region` adalah `None` atau berupa string kosong, jika tidak, `@` diikuti dengan nilai dari region. -- `(sembarang)` akan selalu tidak menampilkan apapun karena tidak ada variabel yang dibungkus dalam kurung kurawal. -- Tatkala `$all` digunakan sebagai shortcut untuk `\[$a$b\]`, `($all)` tidak akan menampilkan apapun jika nilai `$a` dan `$b` adalah `None`. Berlaku juga dengan `(\[$a$b\] )`. - -#### Special characters - -The following symbols have special usage in a format string and must be escaped: `$ \ [ ] ( )`. - -Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). - -Sebagai contoh, ketika kamu ingin menampilkan simbol `$` pada sebuah baris baru, konfigurasi berikut sama halnya pada `format`: - -```toml -# dengan string standar -format = "\n\\$" - -# dengan string standar multibaris -format = """ - -\\$""" - -# dengan string literal -format = ''' - -\$''' -``` +- `'(@$region)'` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. +- `'(some text)'` will always show nothing since there are no variables wrapped in the braces. +- When `$combined` is a shortcut for `\[$a$b\]`, `'($combined)'` will show nothing only if `$a` and `$b` are both `None`. This works the same as `'(\[$a$b\] )'`. ### Negative matching -Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched. +Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading '!' character. The presence of _any_ negative indicator in the directory will result in the module not being matched. Extensions are matched against both the characters after the last dot in a filename, and the characters after the first dot in a filename. For example, `foo.bar.tar.gz` will be matched against `bar.tar.gz` and `gz` in the `detect_extensions` variable. Files whose name begins with a dot are not considered to have extensions at all. To see how this works in practice, you could match TypeScript but not MPEG Transport Stream files thus: ```toml -detect_extensions = ["ts", "!video.ts", "!audio.ts"] +detect_extensions = ['ts', '!video.ts', '!audio.ts'] ``` ## Prompt @@ -164,12 +199,12 @@ Berikut adalah opsi konfigurasi dari list yang bersifat prompt-wide. | Opsi | Bawaan | Deskripsi | | ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `format` | [link](#default-prompt-format) | Mengkonfigurasi format pada prompt. | -| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | +| `fromat` | [link](#default-prompt-format) | Mengkonfigurasi format pada prompt. | +| `right_format` | `''` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | | `scan_timeout` | `30` | Batas waktu starpship untuk memindai file (dalam milidetik). | | `command_timeout` | `500` | Batas waktu untuk perintah yang dijalankan starship (dalam milidetik). | | `add_newline` | `true` | Memasukkan baris kosong antara prompt shell. | -| `palette` | `""` | Sets which color palette from `palettes` to use. | +| `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | ### Contoh @@ -177,27 +212,27 @@ Berikut adalah opsi konfigurasi dari list yang bersifat prompt-wide. ```toml # ~/.config/starship.toml -# Menggunakan format yang dikustomisasi -format = """ +# Use custom format +format = ''' [┌───────────────────>](bold green) [│](bold green)$directory$rust$package -[└─>](bold green) """ +[└─>](bold green) ''' -# Menunggu 10 milidetik untuk starship mencek file pada direktori terkini. +# Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 # Disable the blank line at the start of the prompt add_newline = false -# Set "foo" as custom color palette -palette = "foo" +# Set 'foo' as custom color palette +palette = 'foo' # Define custom colors [palettes.foo] # Overwrite existing color -blue = "21" +blue = '21' # Define new color -mustard = "#af8700" +mustard = '#af8700' ``` ### Format Prompt Bawaan @@ -205,7 +240,7 @@ mustard = "#af8700" Aturan `format` bawaan digunakan untuk mendefinisikan format pada prompt, apabila kosong atau tidak ada `format` yang diberikan. Aturannya seperti yang ditunjukkan: ```toml -format = "$all" +format = '$all' # Which is equivalent to format = """ @@ -236,7 +271,9 @@ $elixir\ $elm\ $erlang\ $golang\ +$guix_shell\ $haskell\ +$haxe\ $helm\ $java\ $julia\ @@ -245,6 +282,7 @@ $lua\ $nim\ $nodejs\ $ocaml\ +$opa\ $perl\ $php\ $pulumi\ @@ -281,6 +319,7 @@ $jobs\ $battery\ $time\ $status\ +$os\ $container\ $shell\ $character""" @@ -290,7 +329,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format = "$all$directory$character" +format = '$all$directory$character' ``` ## AWS @@ -305,15 +344,17 @@ Ketika menggunakan [awsu](https://github.com/kreuzwerker/awsu) profil dibaca dar Ketika menggunakan [AWSume](https://awsu.me) profil dibaca dari variabel environment `AWSUME_PROFILE` dan tanggal kedaluwarsanya dibaca dari variabel environment `AWSUME_EXPIRATION`. +When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. + ### Opsi | Opsi | Bawaan | Deskripsi | | ------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | `fromat` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | Format dari modul. | -| `symbol` | `"☁️ "` | Simbol yang digunakan sebelum menampilkan profil AWS terkini. | -| `region_aliases` | | Tabel alias dari region yang ditampilan selain nama AWS. | -| `profile_aliases` | | Table of profile aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | Gaya penataan untuk modul. | +| `symbol` | `'☁️ '` | Simbol yang digunakan sebelum menampilkan profil AWS terkini. | +| `region_aliases` | `{}` | Tabel alias dari region yang ditampilan selain nama AWS. | +| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | +| `style` | `'bold yellow'` | Gaya penataan untuk modul. | | `expiration_symbol` | `X` | Simbol ditampilkan ketika temporer kredensial telah kedaluwarsa. | | `disabled` | `false` | Menonaktifkan modul `AWS`. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -339,11 +380,11 @@ Ketika menggunakan [AWSume](https://awsu.me) profil dibaca dari variabel environ [aws] format = 'on [$symbol($profile )(\($region\) )]($style)' -style = "bold blue" -symbol = "🅰 " +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' [aws.profile_aliases] CompanyGroupFrobozzOnCallAccess = 'Frobozz' ``` @@ -354,12 +395,12 @@ CompanyGroupFrobozzOnCallAccess = 'Frobozz' # ~/.config/starship.toml [aws] -format = "on [$symbol$region]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$region]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' ``` #### Menampilkan profil @@ -368,34 +409,48 @@ us-east-1 = "va" # ~/.config/starship.toml [aws] -format = "on [$symbol$profile]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$profile]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.profile_aliases] Enterprise_Naming_Scheme-voidstars = 'void**' ``` ## Azure -The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription, as defined in the `~/.azure/azureProfile.json` file. +The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription or the username, as defined in the `~/.azure/azureProfile.json` file. ### Opsi | Variabel | Bawaan | Deskripsi | | ---------- | ---------------------------------------- | ------------------------------------------ | -| `fromat` | `"on [$symbol($subscription)]($style) "` | The format for the Azure module to render. | -| `symbol` | `"ﴃ "` | The symbol used in the format. | -| `style` | `"blue bold"` | The style used in the format. | +| `fromat` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'ﴃ '` | The symbol used in the format. | +| `style` | `'blue bold'` | The style used in the format. | | `disabled` | `true` | Disables the `azure` module. | ### Contoh +#### Display Subscription Name + ```toml # ~/.config/starship.toml [azure] disabled = false -format = "on [$symbol($subscription)]($style) " +format = 'on [$symbol($subscription)]($style) ' +symbol = 'ﴃ ' +style = 'blue bold' +``` + +#### Display Username + +```toml +# ~/.config/starship.toml + +[azure] +disabled = false +format = "on [$symbol($username)]($style) " symbol = "ﴃ " style = "blue bold" ``` @@ -408,12 +463,12 @@ Modul `battery` menampilkan seberapa penuh baterai perangkat terisi dan status p | Opsi | Bawaan | Deskripsi | | -------------------- | --------------------------------- | --------------------------------------------------------- | -| `full_symbol` | `" "` | Simbol dimunculkan ketika baterai penuh. | -| `charging_symbol` | `" "` | Simbol dimunculkan ketika baterai mengisi. | -| `discharging_symbol` | `" "` | Simbol dimunculkan ketika baterai terpakai. | -| `unknown_symbol` | `" "` | Simbol dimunculkan ketika keadaan baterai tidak dikenali. | -| `empty_symbol` | `" "` | Simbol dimunculkan ketika keadaan baterai kosong. | -| `fromat` | `"[$symbol$percentage]($style) "` | Format dari modul. | +| `full_symbol` | `' '` | Simbol dimunculkan ketika baterai penuh. | +| `charging_symbol` | `' '` | Simbol dimunculkan ketika baterai mengisi. | +| `discharging_symbol` | `' '` | Simbol dimunculkan ketika baterai terpakai. | +| `unknown_symbol` | `' '` | Simbol dimunculkan ketika keadaan baterai tidak dikenali. | +| `empty_symbol` | `' '` | Simbol dimunculkan ketika keadaan baterai kosong. | +| `fromat` | `'[$symbol$percentage]($style) '` | Format dari modul. | | `display` | [link](#battery-display) | Menampilkan ambang dan gaya dari modul. | | `disabled` | `false` | Menonaktifkan modul `baterai`. | @@ -423,9 +478,9 @@ Modul `battery` menampilkan seberapa penuh baterai perangkat terisi dan status p # ~/.config/starship.toml [battery] -full_symbol = "🔋 " -charging_symbol = "⚡️ " -discharging_symbol = "💀 " +full_symbol = '🔋 ' +charging_symbol = '⚡️ ' +discharging_symbol = '💀 ' ``` ### Tampilan Baterai @@ -435,7 +490,7 @@ Opsi konfigurasi `display` digunakan untuk menentukan kapan indikator baterai ha ```toml [[battery.display]] threshold = 10 -style = "bold red" +style = 'bold red' ``` Nilai bawaan untuk opsi `charging_symbol` dan `discharging_symbol` adalah nilai dari masing-masing opsi `charging_symbol` dan `discharging_symbol` dari nilai `battery`. @@ -447,21 +502,21 @@ Opsi dari `display` merupakan sebuah array dari tabel berikut. | Opsi | Bawaan | Deskripsi | | -------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------- | | `threshold` | `10` | The upper bound for the display option. | -| `style` | `"red bold"` | The style used if the display option is in use. | +| `style` | `'red bold'` | The style used if the display option is in use. | | `charging_symbol` | | Simbol opsional ditampilan jika opsi tampilan sedang digunakan, bawaan untuk opsi `charging_symbol` dari baterai. | | `discharging_symbol` | | Simbol opsional ditampilan jika opsi tampilan sedang digunakan, bawaan untuk opsi `discharging_symbol` dari baterai. | #### Contoh ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% threshold = 10 -style = "bold red" +style = 'bold red' -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% threshold = 30 -style = "bold yellow" -discharging_symbol = "💦" +style = 'bold yellow' +discharging_symbol = '💦' # when capacity is over 30%, the battery indicator will not be displayed ``` @@ -477,13 +532,13 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil | Opsi | Bawaan | Deskripsi | | ------------------- | ----------------------------------------------- | ----------------------------------------------------- | -| `fromat` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. | -| `version_format` | `"v${raw}"` | Format dari versi. | -| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. | +| `fromat` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. | +| `version_format` | `'v${raw}'` | Format dari versi. | +| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. | | `detect_extensions` | `[]` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | filenames mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | -| `style` | `"bold blue"` | Gaya penataan untuk modul. | +| `style` | `'bold blue'` | Gaya penataan untuk modul. | | `disabled` | `false` | Menonaktifkan modul `elixir`. | ### Variabel @@ -502,7 +557,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil # ~/.config/starship.toml [buf] -symbol = "🦬 " +symbol = '🦬 ' ``` ## Bun @@ -516,13 +571,13 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🍞 "` | A format string representing the symbol of Node.js. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. | | `detect_extensions` | `[]` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `["bun.lockb", "bunfig.toml"]` | filenames mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['bun.lockb', 'bunfig.toml']` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | -| `style` | `"bold red"` | Gaya penataan untuk modul. | +| `style` | `'bold red'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `bun` module. | ### Variabel @@ -541,7 +596,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. # ~/.config/starship.toml [bun] -format = "via [🍔 $version](bold green) " +format = 'via [🍔 $version](bold green) ' ``` ## C @@ -552,14 +607,14 @@ The `c` module shows some information about your C compiler. By default the modu | Opsi | Bawaan | Deskripsi | | ------------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version(-$name) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"C "` | The symbol used before displaying the compiler details | -| `detect_extensions` | `["c", "h"]` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `fromat` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Ekstensi mana yang sebaiknya memicu modul ini. | | `detect_files` | `[]` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | -| `commands` | [ [ "cc", "--version" ], [ "gcc", "--version" ], [ "clang", "--version" ] ] | How to detect what the compiler is | -| `style` | `"bold 149"` | Gaya penataan untuk modul. | +| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | +| `style` | `'bold 149'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `c` module. | ### Variabel @@ -577,7 +632,7 @@ NB that `version` is not in the default format. The `commands` option accepts a list of commands to determine the compiler version and name. -Each command is represented as a list of the executable name, followed by its arguments, usually something like `["mycc", "--version"]`. Starship will try executing each command until it gets a result on STDOUT. +Each command is represented as a list of the executable name, followed by its arguments, usually something like `['mycc', '--version']`. Starship will try executing each command until it gets a result on STDOUT. If a C compiler is not supported by this module, you can request it by [raising an issue on GitHub](https://github.com/starship/starship/). @@ -587,7 +642,7 @@ If a C compiler is not supported by this module, you can request it by [raising # ~/.config/starship.toml [c] -format = "via [$name $version]($style)" +format = 'via [$name $version]($style)' ``` ## Karakter @@ -611,13 +666,13 @@ Secara bawaan karakter hanya dapat mengganti warna. Jika kamu juga ingin menggan | Opsi | Bawaan | Deskripsi | | --------------------------- | -------------------- | ------------------------------------------------------------------------------------------------- | -| `fromat` | `"$symbol "` | Format string yang digunakan sebelum masukan teks. | -| `success_symbol` | `"[❯](bold green)"` | Format string yang digunakan sebelum masukan teks jika perintah sebelumnya berhasil. | -| `error_symbol` | `"[❯](bold red)"` | Format string yang digunakan sebelum masukan teks jika perintah sebelumnya gagal. | -| `vimcmd_symbol` | `"[❮](bold green)"` | Format string yang digunakan sebelum masukan teks jika shell sedang dalam vim dengan mode normal. | -| `vimcmd_replace_one_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim `replace_one` mode. | -| `vimcmd_replace_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim replace mode. | -| `vimcmd_visual_symbol` | `"[❮](bold yellow)"` | The format string used before the text input if the shell is in vim replace mode. | +| `fromat` | `'$symbol '` | Format string yang digunakan sebelum masukan teks. | +| `success_symbol` | `'[❯](bold green)'` | Format string yang digunakan sebelum masukan teks jika perintah sebelumnya berhasil. | +| `error_symbol` | `'[❯](bold red)'` | Format string yang digunakan sebelum masukan teks jika perintah sebelumnya gagal. | +| `vimcmd_symbol` | `'[❮](bold green)'` | Format string yang digunakan sebelum masukan teks jika shell sedang dalam vim dengan mode normal. | +| `vimcmd_replace_one_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim `replace_one` mode. | +| `vimcmd_replace_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim replace mode. | +| `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | | `disabled` | `false` | Menonaktifkan module `character`. | ### Variabel @@ -634,8 +689,8 @@ Secara bawaan karakter hanya dapat mengganti warna. Jika kamu juga ingin menggan # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[✗](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[✗](bold red) ' ``` #### Tanpa menggunakan corak eror yang dikustomisasi @@ -644,8 +699,8 @@ error_symbol = "[✗](bold red) " # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[➜](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[➜](bold red) ' ``` #### Dengan menggunakan corak vim yang dikustomisasi @@ -654,7 +709,7 @@ error_symbol = "[➜](bold red) " # ~/.config/starship.toml [character] -vicmd_symbol = "[V](bold green) " +vicmd_symbol = '[V](bold green) ' ``` ## CMake @@ -668,13 +723,13 @@ Modul `cmake` menampilkan versi terkini dari [CMake](https://cmake.org/) yang te | Opsi | Bawaan | Deskripsi | | ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"△ "` | Simbol yang digunakan sebelum versi cmake. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'△ '` | Simbol yang digunakan sebelum versi cmake. | | `detect_extensions` | `[]` | Ekstensi mana yang sebaiknya memicu modul ini | -| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | filenames mana yang sebaiknya memicu modul ini | +| `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | filenames mana yang sebaiknya memicu modul ini | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini | -| `style` | `"bold blue"` | Gaya penataan untuk modul. | +| `style` | `'bold blue'` | Gaya penataan untuk modul. | | `disabled` | `false` | Menonaktifkan modul `cmake`. | ### Variabel @@ -698,11 +753,11 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold blue"` | Gaya penataan untuk modul. | -| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `symbol` | `'⚙️ '` | The symbol used before displaying the version of COBOL. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold blue'` | Gaya penataan untuk modul. | +| `detect_extensions` | `['cbl', 'cob', 'CBL', 'COB']` | Ekstensi mana yang sebaiknya memicu modul ini. | | `detect_files` | `[]` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | | `disabled` | `false` | Disables the `cobol` module. | @@ -735,8 +790,8 @@ Pengguna Bash yang membutuhkan fungsi seperti preexec dapat menggunakan [kerangk | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `min_tim` | `2_000` | Durasi terpendek untuk menampilkan waktu (dalam milidetik). | | `show_milliseconds` | `false` | Tampilkan milidetik sebagai ganti detik untuk durasinya. | -| `fromat` | `"took [$duration]($style) "` | Format dari modul. | -| `style` | `"bold yellow"` | Gaya penataan untuk modul. | +| `fromat` | `'took [$duration]($style) '` | Format dari modul. | +| `style` | `'bold yellow'` | Gaya penataan untuk modul. | | `disabled` | `false` | Menonaktifkan modul `cmd_duration`. | | `show_notifications` | `false` | Menampilkan notifikasi layar ketika perintah selesai. | | `min_time_to_notify` | `45_000` | Durasi terpendek untuk menampilkan notifikasi (dalam milidetik). | @@ -758,7 +813,7 @@ Pengguna Bash yang membutuhkan fungsi seperti preexec dapat menggunakan [kerangk [cmd_duration] min_time = 500 -format = "underwent [$duration](bold yellow)" +format = 'underwent [$duration](bold yellow)' ``` ## Conda @@ -776,9 +831,9 @@ Hal ini tidak menahan pengubah (modifier) prompt dari conda sendiri, kamu mungki | Opsi | Bawaan | Deskripsi | | ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | Jumlah direktori yang dipotong oleh environment path, jika environment-nya dibuat melalui `conda create -p [path]`. `0` artinya tidak ada potongan. Lihat juga modul [`directory`](#directory). | -| `symbol` | `"🅒 "` | Simbol yang digunakan sebelum nama environment. | -| `style` | `"bold green"` | Gaya penataan untuk modul. | -| `fromat` | `"via [$symbol$environment]($style) "` | Format dari modul. | +| `symbol` | `'🅒 '` | Simbol yang digunakan sebelum nama environment. | +| `style` | `'bold green'` | Gaya penataan untuk modul. | +| `fromat` | `'via [$symbol$environment]($style) '` | Format dari modul. | | `ignore_base` | `true` | Mengabaikan `base` environment saat aktif. | | `disabled` | `false` | Menonaktifkan modul `conda`. | @@ -798,7 +853,7 @@ Hal ini tidak menahan pengubah (modifier) prompt dari conda sendiri, kamu mungki # ~/.config/starship.toml [conda] -format = "[$symbol$environment](dimmed green) " +format = '[$symbol$environment](dimmed green) ' ``` ## Container @@ -809,8 +864,8 @@ The `container` module displays a symbol and container name, if inside a contain | Opsi | Bawaan | Deskripsi | | ---------- | ---------------------------------- | ----------------------------------------- | -| `symbol` | `"⬢"` | The symbol shown, when inside a container | -| `style` | `"bold red dimmed"` | Gaya penataan untuk modul. | +| `symbol` | `'⬢'` | The symbol shown, when inside a container | +| `style` | `'bold red dimmed'` | Gaya penataan untuk modul. | | `fromat` | `'[$symbol \[$name\]]($style) '` | Format dari modul. | | `disabled` | `false` | Disables the `container` module. | @@ -844,12 +899,12 @@ Modul `crystal` menampilkan versi terkini dari [Crystal](https://crystal-lang.or | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `symbol` | `"🔮 "` | Simbol yang digunakan sebelum menampilkan versi crystal terkini. | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold red"` | Gaya penataan untuk modul. | -| `detect_extensions` | `["cr"]` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `["shard.yml"]` | filenames mana yang sebaiknya memicu modul ini. | +| `symbol` | `'🔮 '` | Simbol yang digunakan sebelum menampilkan versi crystal terkini. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold red'` | Gaya penataan untuk modul. | +| `detect_extensions` | `['cr']` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['shard.yml']` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | | `disabled` | `false` | Menonaktifkan modul `crystal`. | @@ -869,7 +924,7 @@ Modul `crystal` menampilkan versi terkini dari [Crystal](https://crystal-lang.or # ~/.config/starship.toml [crystal] -format = "via [✨ $version](bold blue) " +format = 'via [✨ $version](bold blue) ' ``` ## Daml @@ -882,12 +937,12 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"Λ "` | A format string representing the symbol of Daml | -| `style` | `"bold cyan"` | Gaya penataan untuk modul. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'Λ '` | A format string representing the symbol of Daml | +| `style` | `'bold cyan'` | Gaya penataan untuk modul. | | `detect_extensions` | `[]` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `["daml.yaml"]` | filenames mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['daml.yaml']` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | | `disabled` | `false` | Disables the `daml` module. | @@ -907,7 +962,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d # ~/.config/starship.toml [daml] -format = "via [D $version](bold bright-green) " +format = 'via [D $version](bold bright-green) ' ``` ## Dart @@ -922,13 +977,13 @@ Modul `dart` menampilkan versi terkini dari [Dart](https://dart.dev/) yang terpa | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | Sebuah format string yang melambangkan simbol Dart | -| `detect_extensions` | `["dart"]` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | filenames mana yang sebaiknya memicu modul ini. | -| `detect_folders` | `[".dart_tool"]` | Folder mana yang sebaiknya memicul modul ini. | -| `style` | `"bold blue"` | Gaya penataan untuk modul. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🎯 '` | Sebuah format string yang melambangkan simbol Dart | +| `detect_extensions` | `['dart']` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | filenames mana yang sebaiknya memicu modul ini. | +| `detect_folders` | `['.dart_tool']` | Folder mana yang sebaiknya memicul modul ini. | +| `style` | `'bold blue'` | Gaya penataan untuk modul. | | `disabled` | `false` | Menonaktifkan modul `dart`. | ### Variabel @@ -947,7 +1002,7 @@ Modul `dart` menampilkan versi terkini dari [Dart](https://dart.dev/) yang terpa # ~/.config/starship.toml [dart] -format = "via [🔰 $version](bold red) " +format = 'via [🔰 $version](bold red) ' ``` ## Deno @@ -960,13 +1015,13 @@ Modul `deno` menampilkan versi terkini dari [Deno](https://deno.land/) yang terp | Opsi | Bawaan | Deskripsi | | ------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `🦕 "` | Sebuah format string yang melambangkan simbol Deno | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦕 '` | Sebuah format string yang melambangkan simbol Deno | | `detect_extensions` | `[]` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `["deno.json", "deno.jsonc", "mod.ts", "mod.js", "deps.ts", "deps.js"]` | filenames mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | -| `style` | `"green bold"` | Gaya penataan untuk modul. | +| `style` | `'green bold'` | Gaya penataan untuk modul. | | `disabled` | `false` | Menonaktifkan modul `deno`. | ### Variabel @@ -983,7 +1038,7 @@ Modul `deno` menampilkan versi terkini dari [Deno](https://deno.land/) yang terp # ~/.config/starship.toml [deno] -format = "via [🦕 $version](green bold) " +format = 'via [🦕 $version](green bold) ' ``` ## Direktori @@ -996,20 +1051,21 @@ Sebagai contoh, untuk `~/Dev/Nix/nixpkgs/pkgs` dimana `nixpkgs` merupakan root r ### Opsi -| Opsi | Bawaan | Deskripsi | -| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | Jumlah dari folder induk yang harusnya disingkat oleh direktori saat ini. | -| `truncate_to_repo` | `true` | Apakah harus menyingkat root dari git repo tempatmu berada saat ini. | -| `fromat` | `"[$path]($style)[$read_only]($read_only_style) "` | Format dari modul. | -| `style` | `"bold cyan"` | Gaya penataan untuk modul. | -| `disabled` | `false` | Menonaktifkan modul `directory`. | -| `read_only` | `"🔒"` | Simbol yang mengindikasikan direktori saat ini bersifat read only. | -| `read_only_style` | `"red"` | Corak gaya untuk simbol read only. | -| `truncation_symbol` | `""` | Simbol untuk awalan jalur yang disingkat. misalnya: ".../" | -| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | -| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | -| `home_symbol` | `"~"` | Simbol yang mengindikasikan direktori home. | -| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) | +| Opsi | Bawaan | Deskripsi | +| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | Jumlah dari folder induk yang harusnya disingkat oleh direktori saat ini. | +| `truncate_to_repo` | `true` | Apakah harus menyingkat root dari git repo tempatmu berada saat ini. | +| `format` | `'[$path]($style)[$read_only]($read_only_style) '` | Format dari modul. | +| `style` | `'bold cyan'` | Gaya penataan untuk modul. | +| `disabled` | `false` | Menonaktifkan modul `directory`. | +| `read_only` | `'🔒'` | Simbol yang mengindikasikan direktori saat ini bersifat read only. | +| `read_only_style` | `'red'` | Corak gaya untuk simbol read only. | +| `truncation_symbol` | `''` | Simbol untuk awalan jalur yang disingkat. eg: '…/' | +| `before_repo_root_style` | | The style for the path segment above the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `'[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) '` | The format of a git repo when `before_repo_root_style` and `repo_root_style` is defined. | +| `home_symbol` | `'~'` | Simbol yang mengindikasikan direktori home. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
Modul ini memilki beberapa opsi konfigurasi lanjutan yang mengontrol bagaimana direktori ditampilkan. @@ -1024,8 +1080,8 @@ Sebagai contoh, untuk `~/Dev/Nix/nixpkgs/pkgs` dimana `nixpkgs` merupakan root r ```toml [directory.substitutions] -"/Volumes/network/path" = "/net" -"src/com/long/java/path" = "mypath" +'/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`. @@ -1036,8 +1092,8 @@ Sebagai contoh, untuk `~/Dev/Nix/nixpkgs/pkgs` dimana `nixpkgs` merupakan root r | Variabel | Contoh | Deskripsi | | --------- | --------------------- | -------------------------------- | -| path | `"D:/Projects"` | Direktori terkini | -| style\* | `"black bold dimmed"` | Menyalin nilai dari opsi `style` | +| path | `'D:/Projects'` | Direktori terkini | +| style\* | `'black bold dimmed'` | Menyalin nilai dari opsi `style` | *: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string @@ -1048,11 +1104,11 @@ Let us consider the path `/path/to/home/git_repo/src/lib` | Variabel | Contoh | Deskripsi | | ------------------ | --------------------- | --------------------------------------- | -| before_root_path | `"/path/to/home/"` | The path before git root directory path | -| repo_root | `"git_repo"` | The git root directory name | -| path | `"/src/lib"` | The remaining path | -| style | `"black bold dimmed"` | Menyalin nilai dari opsi `style` | -| repo_root_style | `"underline white"` | Style for git root directory name | +| before_root_path | `'/path/to/home/'` | The path before git root directory path | +| repo_root | `'git_repo'` | The git root directory name | +| path | `'/src/lib'` | The remaining path | +| style | `'black bold dimmed'` | Menyalin nilai dari opsi `style` | +| repo_root_style | `'underline white'` | Style for git root directory name |
@@ -1063,7 +1119,7 @@ Let us consider the path `/path/to/home/git_repo/src/lib` [directory] truncation_length = 8 -truncation_symbol = "…/" +truncation_symbol = '…/' ``` ## Docker Context @@ -1074,13 +1130,13 @@ The `docker_context` module shows the currently active [Docker context](https:// | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol$context]($style) "` | Format dari modul. | -| `symbol` | `"🐳 "` | Simbol yang digunakan sebelum menampilkan Docker context. | +| `fromat` | `'via [$symbol$context]($style) '` | Format dari modul. | +| `symbol` | `'🐳 '` | Simbol yang digunakan sebelum menampilkan Docker context. | | `only_with_files` | `true` | Hanya ditampilkan jika terdapat kecocokan | | `detect_extensions` | `[]` | Extensions mana yang harusnya memicu modul (butuh `only_with_files` untuk diset true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | filenames mana yang harusnya memicu modul ini (butuh `only_with_files` untuk diset true). | +| `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | filenames mana yang harusnya memicu modul ini (butuh `only_with_files` untuk diset true). | | `detect_folders` | `[]` | Folder mana yang harusnya memicu modul (butuh `only_with_files` untuk diset true). | -| `style` | `"blue bold"` | Gaya penataan untuk modul. | +| `style` | `'blue bold'` | Gaya penataan untuk modul. | | `disabled` | `false` | Menonaktifkan module `docket_context`. | ### Variabel @@ -1099,7 +1155,7 @@ The `docker_context` module shows the currently active [Docker context](https:// # ~/.config/starship.toml [docker_context] -format = "via [🐋 $context](blue bold)" +format = 'via [🐋 $context](blue bold)' ``` ## Dotnet @@ -1127,14 +1183,14 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$var_cluster" +'dev.local.cluster.k8s' = 'dev' +'.*/openshift-cluster/.*' = 'openshift' +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' [kubernetes.user_aliases] -"dev.local.cluster.k8s" = "dev" -"root/.*" = "root" +'dev.local.cluster.k8s' = 'dev' +'root/.*' = 'root' ``` Only show the module in directories that contain a `k8s` file. @@ -2121,14 +2249,14 @@ Long and automatically generated cluster names can be identified and shortened u ```toml [kubernetes.context_aliases] # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -".*/openshift-cluster/.*" = "openshift" +'.*/openshift-cluster/.*' = 'openshift' # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$var_cluster" +'.*/(?P[\\w-]+)/.*' = '$var_cluster' # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' ``` ## Line Break @@ -2159,8 +2287,8 @@ The `localip` module shows the IPv4 address of the primary network interface. | Opsi | Bawaan | Deskripsi | | ---------- | ------------------------- | ------------------------------------------------------ | | `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `fromat` | `"[$localipv4]($style) "` | Format dari modul. | -| `style` | `"bold yellow"` | Gaya penataan untuk modul. | +| `fromat` | `'[$localipv4]($style) '` | Format dari modul. | +| `style` | `'bold yellow'` | Gaya penataan untuk modul. | | `disabled` | `true` | Disables the `localip` module. | ### Variabel @@ -2179,7 +2307,7 @@ The `localip` module shows the IPv4 address of the primary network interface. [localip] ssh_only = false -format = "@[$localipv4](bold red) " +format = '@[$localipv4](bold red) ' disabled = false ``` @@ -2195,14 +2323,14 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | -| `detect_extensions` | `["lua"]` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `[".lua-version"]` | filenames mana yang sebaiknya memicu modul ini. | -| `detect_folders` | `["lua"]` | Folder mana yang sebaiknya memicul modul ini. | -| `style` | `"bold blue"` | Gaya penataan untuk modul. | -| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🌙 '` | A format string representing the symbol of Lua. | +| `detect_extensions` | `['lua']` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['.lua-version']` | filenames mana yang sebaiknya memicu modul ini. | +| `detect_folders` | `['lua']` | Folder mana yang sebaiknya memicul modul ini. | +| `style` | `'bold blue'` | Gaya penataan untuk modul. | +| `lua_binary` | `'lua'` | Configures the lua binary that Starship executes when getting the version. | | `disabled` | `false` | Disables the `lua` module. | ### Variabel @@ -2221,7 +2349,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o # ~/.config/starship.toml [lua] -format = "via [🌕 $version](bold blue) " +format = 'via [🌕 $version](bold blue) ' ``` ## Memory Usage @@ -2241,9 +2369,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Opsi | Bawaan | Deskripsi | | ----------- | ----------------------------------------------- | -------------------------------------------------------- | | `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | -| `fromat` | `"via $symbol [${ram}( \| ${swap})]($style) "` | Format dari modul. | -| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | -| `style` | `"bold dimmed white"` | Gaya penataan untuk modul. | +| `fromat` | `'via $symbol [${ram}( \| ${swap})]($style) '` | Format dari modul. | +| `symbol` | `'🐏'` | The symbol used before displaying the memory usage. | +| `style` | `'bold dimmed white'` | Gaya penataan untuk modul. | | `disabled` | `true` | Disables the `memory_usage` module. | ### Variabel @@ -2267,8 +2395,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y [memory_usage] disabled = false threshold = -1 -symbol = " " -style = "bold dimmed green" +symbol = ' ' +style = 'bold dimmed green' ``` ## Meson @@ -2282,10 +2410,10 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. | Opsi | Bawaan | Deskripsi | | ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- | | `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | -| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. | -| `fromat` | `"via [$symbol$project]($style) "` | Format dari modul. | -| `symbol` | `"⬢ "` | The symbol used before displaying the project name. | -| `style` | `"blue bold"` | Gaya penataan untuk modul. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | +| `fromat` | `'via [$symbol$project]($style) '` | Format dari modul. | +| `symbol` | `'⬢ '` | The symbol used before displaying the project name. | +| `style` | `'blue bold'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `meson` module. | ### Variabel @@ -2305,9 +2433,9 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. [meson] disabled = false -truncation_symbol = "--" -symbol = " " -style = "bold dimmed green" +truncation_symbol = '--' +symbol = ' ' +style = 'bold dimmed green' ``` ## Mercurial Branch @@ -2318,11 +2446,11 @@ The `hg_branch` module shows the active branch of the repo in your current direc | Opsi | Bawaan | Deskripsi | | ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | -| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | -| `style` | `"bold purple"` | Gaya penataan untuk modul. | -| `fromat` | `"on [$symbol$branch]($style) "` | Format dari modul. | +| `symbol` | `' '` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `style` | `'bold purple'` | Gaya penataan untuk modul. | +| `fromat` | `'on [$symbol$branch]($style) '` | Format dari modul. | | `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | -| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a branch name was truncated. | | `disabled` | `true` | Disables the `hg_branch` module. | ### Variabel @@ -2341,16 +2469,16 @@ The `hg_branch` module shows the active branch of the repo in your current direc # ~/.config/starship.toml [hg_branch] -format = "on [🌱 $branch](bold purple)" +format = 'on [🌱 $branch](bold purple)' truncation_length = 4 -truncation_symbol = "" +truncation_symbol = '' ``` ## Nim The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/). Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: -- Direktori terkini yang berisikan sebuah file `nim.cfg` +- Direktori ini memiliki berkas `nim.cfg` - 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 @@ -2359,13 +2487,13 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | -| `detect_extensions` | `["nim", "nims", "nimble"]` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `["nim.cfg"]` | filenames mana yang sebaiknya memicu modul ini. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'👑 '` | The symbol used before displaying the version of Nim. | +| `detect_extensions` | `['nim', 'nims', 'nimble']` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['nim.cfg']` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | -| `style` | `"bold yellow"` | Gaya penataan untuk modul. | +| `style` | `'bold yellow'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `nim` module. | ### Variabel @@ -2384,8 +2512,8 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang # ~/.config/starship.toml [nim] -style = "yellow" -symbol = "🎣 " +style = 'yellow' +symbol = '🎣 ' ``` ## Nix-shell @@ -2397,10 +2525,10 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | Opsi | Bawaan | Deskripsi | | ------------ | ---------------------------------------------- | ----------------------------------------------------- | | `fromat` | `'via [$symbol$state( \($name\))]($style) '` | Format dari modul. | -| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | -| `style` | `"bold blue"` | Gaya penataan untuk modul. | -| `impure_msg` | `"impure"` | A format string shown when the shell is impure. | -| `pure_msg` | `"pure"` | A format string shown when the shell is pure. | +| `symbol` | `'❄️ '` | A format string representing the symbol of nix-shell. | +| `style` | `'bold blue'` | Gaya penataan untuk modul. | +| `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. | ### Variabel @@ -2421,8 +2549,8 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ [nix_shell] disabled = true -impure_msg = "[impure shell](bold red)" -pure_msg = "[pure shell](bold green)" +impure_msg = '[impure shell](bold red)' +pure_msg = '[pure shell](bold green)' format = 'via [☃️ $state( \($name\))](bold blue) ' ``` @@ -2430,7 +2558,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' The `nodejs` module shows the currently installed version of [Node.js](https://nodejs.org/). Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: -- Direktori terkini yang berisikan sebuah file `package.json` +- Direktori ini memiliki berkas `package.json` - The current directory contains a `.node-version` file - The current directory contains a `.nvmrc` file - The current directory contains a `node_modules` directory @@ -2441,13 +2569,13 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string representing the symbol of Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts", "mts", "cts"]` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `["package.json", ".node-version"]` | filenames mana yang sebaiknya memicu modul ini. | -| `detect_folders` | `["node_modules"]` | Folder mana yang sebaiknya memicul modul ini. | -| `style` | `"bold green"` | Gaya penataan untuk modul. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string representing the symbol of Node.js. | +| `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['package.json', '.node-version']` | filenames mana yang sebaiknya memicu modul ini. | +| `detect_folders` | `['node_modules']` | Folder mana yang sebaiknya memicul modul ini. | +| `style` | `'bold green'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `nodejs` module. | | `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | @@ -2467,7 +2595,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n # ~/.config/starship.toml [nodejs] -format = "via [🤖 $version](bold green) " +format = 'via [🤖 $version](bold green) ' ``` ## OCaml @@ -2485,15 +2613,15 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | Opsi | Bawaan | Deskripsi | | ------------------------- | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | -| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | -| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | -| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | filenames mana yang sebaiknya memicu modul ini. | -| `detect_folders` | `["_opam", "esy.lock"]` | Folder mana yang sebaiknya memicul modul ini. | -| `style` | `"bold yellow"` | Gaya penataan untuk modul. | +| `fromat` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐫 '` | The symbol used before displaying the version of OCaml. | +| `global_switch_indicator` | `''` | The format string used to represent global OPAM switch. | +| `local_switch_indicator` | `'*'` | The format string used to represent local OPAM switch. | +| `detect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['dune', 'dune-project', 'jbuild', 'jbuild-ignore', '.merlin']` | filenames mana yang sebaiknya memicu modul ini. | +| `detect_folders` | `['_opam', 'esy.lock']` | Folder mana yang sebaiknya memicul modul ini. | +| `style` | `'bold yellow'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `ocaml` module. | ### Variabel @@ -2514,7 +2642,43 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam # ~/.config/starship.toml [ocaml] -format = "via [🐪 $version]($style) " +format = 'via [🐪 $version]($style) ' +``` + +## Open Policy Agent + +The `opa` module shows the currently installed version of the OPA tool. By default the module will be shown if the current directory contains a `.rego` file. + +### Opsi + +| Opsi | Bawaan | Deskripsi | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | +| `detect_extensions` | `['rego']` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_files` | `[]` | filenames mana yang sebaiknya memicu modul ini. | +| `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | +| `style` | `'bold blue'` | Gaya penataan untuk modul. | +| `disabled` | `false` | Disables the `opa` module. | + +### Variabel + +| Variabel | Contoh | Deskripsi | +| --------- | --------- | --------------------------------- | +| version | `v0.44.0` | The version of `opa` | +| symbol | | Menyalin nilai dari opsi `symbol` | +| style\* | | Menyalin nilai dari opsi `style` | + +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string + +### Contoh + +```toml +# ~/.config/starship.toml + +[opa] +format = 'via [⛑️ $version](bold red) ' ``` ## OpenStack @@ -2526,8 +2690,8 @@ The `openstack` module shows the current OpenStack cloud and project. The module | Opsi | Bawaan | Deskripsi | | ---------- | ----------------------------------------------- | -------------------------------------------------------------- | | `fromat` | `'on [$symbol$cloud(\($project\))]($style) '` | Format dari modul. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | -| `style` | `"bold yellow"` | Gaya penataan untuk modul. | +| `symbol` | `'☁️ '` | The symbol used before displaying the current OpenStack cloud. | +| `style` | `'bold yellow'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `openstack` module. | ### Variabel @@ -2548,8 +2712,105 @@ The `openstack` module shows the current OpenStack cloud and project. The module [openstack] format = 'on [$symbol$cloud(\($project\))]($style) ' -style = "bold yellow" -symbol = "☁️ " +style = 'bold yellow' +symbol = '☁️ ' +``` + +## OS + +The `os` module shows the current operating system. OS information is detected via the [os_info](https://lib.rs/crates/os_info) crate. + +::: warning + +The [os_info](https://lib.rs/crates/os_info) crate used by this module is known to be inaccurate on some systems. + +::: + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Opsi + +| Opsi | Bawaan | Deskripsi | +| ---------- | --------------------- | ------------------------------------------------------ | +| `fromat` | `"[$symbol]($style)"` | Format dari modul. | +| `style` | `"bold white"` | Gaya penataan untuk modul. | +| `disabled` | `true` | Disables the `os` module. | +| `symbols` | | A table that maps each operating system to its symbol. | + +`symbols` allows you to define arbitrary symbols to display for each operating system type. Operating system types not defined by your configuration use the default symbols table below. All operating systems currently supported by the module are listed below. If you would like an operating system to be added, feel free to open a [feature request](https://github.com/starship/starship/issues/new/choose). + +```toml +# This is the default symbols table. +[os.symbols] +Alpine = "🏔️ " +Amazon = "🙂 " +Android = "🤖 " +Arch = "🎗️ " +CentOS = "💠 " +Debian = "🌀 " +DragonFly = "🐉 " +Emscripten = "🔗 " +EndeavourOS = "🚀 " +Fedora = "🎩 " +FreeBSD = "😈 " +Garuda = "🦅 " +Gentoo = "🗜️ " +HardenedBSD = "🛡️ " +Illumos = "🐦 " +Linux = "🐧 " +Macos = "🍎 " +Manjaro = "🥭 " +Mariner = "🌊 " +MidnightBSD = "🌘 " +Mint = "🌿 " +NetBSD = "🚩 " +NixOS = "❄️ " +OpenBSD = "🐡 " +openSUSE = "🦎 " +OracleLinux = "🦴 " +Pop = "🍭 " +Raspbian = "🍓 " +Redhat = "🎩 " +RedHatEnterprise = "🎩 " +Redox = "🧪 " +Solus = "⛵ " +SUSE = "🦎 " +Ubuntu = "🎯 " +Unknown = "❓ " +Windows = "🪟 " +``` + +### Variabel + +| Variabel | Contoh | Deskripsi | +| --------- | ------------ | ------------------------------------------------------------------ | +| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | +| name | `Arch Linux` | The current operating system name | +| type | `Arch` | The current operating system type | +| codename | | The current operating system codename, if applicable | +| edition | | The current operating system edition, if applicable | +| version | | The current operating system version, if applicable | +| style\* | | Menyalin nilai dari opsi `style` | + +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string + +### Contoh + +```toml +# ~/.config/starship.toml + +[os] +format = "on [($name )]($style)" +style = "bold blue" +disabled = false + +[os.symbols] +Windows = " " +Arch = "Arch is the best! " ``` ## Package Version @@ -2580,10 +2841,10 @@ The `package` module is shown when the current directory is the repository for a | Opsi | Bawaan | Deskripsi | | ----------------- | --------------------------------- | ----------------------------------------------------------------------------------- | -| `fromat` | `"is [$symbol$version]($style) "` | Format dari modul. | -| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold 208"` | Gaya penataan untuk modul. | +| `fromat` | `'is [$symbol$version]($style) '` | Format dari modul. | +| `symbol` | `'📦 '` | The symbol used before displaying the version the package. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold 208'` | Gaya penataan untuk modul. | | `display_private` | `false` | Enable displaying version for packages marked as private. | | `disabled` | `false` | Disables the `package` module. | @@ -2603,7 +2864,7 @@ The `package` module is shown when the current directory is the repository for a # ~/.config/starship.toml [package] -format = "via [🎁 $version](208 bold) " +format = 'via [🎁 $version](208 bold) ' ``` ## Perl @@ -2620,13 +2881,13 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe | Opsi | Bawaan | Deskripsi | | ------------------- | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | -| `detect_extensions` | `["pl", "pm", "pod"]` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | filenames mana yang sebaiknya memicu modul ini. | +| `fromat` | `'via [$symbol($version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | +| `detect_extensions` | `['pl', 'pm', 'pod']` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | -| `style` | `"bold 149"` | Gaya penataan untuk modul. | +| `style` | `'bold 149'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `perl` module. | ### Variabel @@ -2643,14 +2904,14 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe # ~/.config/starship.toml [perl] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## PHP The `php` module shows the currently installed version of [PHP](https://www.php.net/). Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: -- Direktori terkini yang berisikan sebuah file `composer.json` +- The current directory contains a `composer.json` file - The current directory contains a `.php-version` file - The current directory contains a `.php` extension @@ -2658,13 +2919,13 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | -| `detect_extensions` | `["php"]` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `["composer.json", ".php-version"]` | filenames mana yang sebaiknya memicu modul ini. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐘 '` | The symbol used before displaying the version of PHP. | +| `detect_extensions` | `['php']` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['composer.json', '.php-version']` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | -| `style` | `"147 bold"` | Gaya penataan untuk modul. | +| `style` | `'147 bold'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `php` module. | ### Variabel @@ -2683,7 +2944,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. # ~/.config/starship.toml [php] -format = "via [🔹 $version](147 bold) " +format = 'via [🔹 $version](147 bold) ' ``` ## Pulumi @@ -2705,10 +2966,10 @@ Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: | Opsi | Bawaan | Deskripsi | | ---------------- | -------------------------------------------- | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string shown before the Pulumi stack. | -| `style` | `"bold 5"` | Gaya penataan untuk modul. | +| `fromat` | `'via [$symbol($username@)$stack]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string shown before the Pulumi stack. | +| `style` | `'bold 5'` | Gaya penataan untuk modul. | | `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | | `disabled` | `false` | Disables the `pulumi` module. | @@ -2732,7 +2993,7 @@ Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: # ~/.config/starship.toml [pulumi] -format = "[🛥 ($version )$stack]($style) " +format = '[🛥 ($version )$stack]($style) ' ``` #### Without Pulumi version @@ -2740,28 +3001,28 @@ format = "[🛥 ($version )$stack]($style) " ```toml # ~/.config/starship.toml [pulumi] -symbol = "🛥 " -format = "[$symbol$stack]($style) " +symbol = '🛥 ' +format = '[$symbol$stack]($style) ' ``` ## PureScript The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: -- Direktori terkini yang berisikan sebuah file `spago.dhall` +- Direktori ini memiliki berkas `spago.dhall` - The current directory contains a file with the `.purs` extension ### Opsi | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | -| `detect_extensions` | `["purs"]` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `["spago.dhall"]` | filenames mana yang sebaiknya memicu modul ini. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'<=> '` | The symbol used before displaying the version of PureScript. | +| `detect_extensions` | `['purs']` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['spago.dhall']` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | -| `style` | `"bold white"` | Gaya penataan untuk modul. | +| `style` | `'bold white'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `purescript` module. | ### Variabel @@ -2780,7 +3041,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht # ~/.config/starship.toml [purescript] -format = "via [$symbol$version](bold white)" +format = 'via [$symbol$version](bold white)' ``` ## Python @@ -2794,10 +3055,10 @@ Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: - The current directory contains a `.python-version` file - The current directory contains a `Pipfile` file - The current directory contains a `__init__.py` file -- Direktori terkini yang berisikan sebuah file `pyproject.toml` -- Direktori terkini yang berisikan sebuah file `requirements.txt` -- Direktori terkini yang berisikan sebuah file `setup.py` -- Direktori terkini yang berisikan sebuah file `tox.ini` +- Direktori ini memiliki berkas `pyproject.toml` +- Direktori ini memiliki berkas `requirements.txt` +- Direktori ini memiliki berkas `setup.py` +- Direktori ini memiliki berkas `tox.ini` - The current directory contains a file with the `.py` extension. - A virtual environment is currently activated @@ -2806,14 +3067,14 @@ Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: | Opsi | Bawaan | Deskripsi | | -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | | `fromat` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | Gaya penataan untuk modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐍 '` | A format string representing the symbol of Python | +| `style` | `'yellow bold'` | Gaya penataan untuk 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 | -| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `detect_extensions` | `["py"]` | Ekstensi mana yang sebaiknya memicu modul ini | -| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | filenames mana yang sebaiknya memicu modul ini | +| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | +| `detect_extensions` | `['py']` | Ekstensi mana yang sebaiknya memicu modul ini | +| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | filenames mana yang sebaiknya memicu modul ini | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini | | `disabled` | `false` | Disables the `python` module. | @@ -2821,7 +3082,7 @@ Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: 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. +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. ::: @@ -2829,11 +3090,11 @@ The default values and order for `python_binary` was chosen to first identify th | Variabel | Contoh | Deskripsi | | ------------ | --------------- | ------------------------------------------ | -| version | `"v3.8.1"` | The version of `python` | -| symbol | `"🐍 "` | Menyalin nilai dari opsi `symbol` | -| style | `"yellow bold"` | Menyalin nilai dari opsi `style` | -| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | -| virtualenv | `"venv"` | The current `virtualenv` name | +| version | `'v3.8.1'` | The version of `python` | +| symbol | `'🐍 '` | Menyalin nilai dari opsi `symbol` | +| style | `'yellow bold'` | Menyalin nilai dari opsi `style` | +| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` | +| virtualenv | `'venv'` | The current `virtualenv` name | ### Contoh @@ -2841,7 +3102,7 @@ The default values and order for `python_binary` was chosen to first identify th # ~/.config/starship.toml [python] -symbol = "👾 " +symbol = '👾 ' pyenv_version_name = true ``` @@ -2850,7 +3111,7 @@ pyenv_version_name = true [python] # Only use the `python3` binary to get the version. -python_binary = "python3" +python_binary = 'python3' ``` ```toml @@ -2869,7 +3130,7 @@ detect_extensions = [] # # Note this will only work when the venv is inside the project and it will only # work in the directory that contains the venv dir but maybe this is ok? -python_binary = ["./venv/bin/python", "python", "python3", "python2"] +python_binary = ['./venv/bin/python', 'python', 'python3', 'python2'] ``` ## R @@ -2888,13 +3149,13 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"📐"` | A format string representing the symbol of R. | -| `style` | `"blue bold"` | Gaya penataan untuk modul. | -| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Ekstensi mana yang sebaiknya memicu modul ini | -| `detect_files` | `[".Rprofile"]` | filenames mana yang sebaiknya memicu modul ini | -| `detect_folders` | `[".Rproj.user"]` | Folder mana yang sebaiknya memicul modul ini | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'📐'` | A format string representing the symbol of R. | +| `style` | `'blue bold'` | Gaya penataan untuk modul. | +| `detect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | Ekstensi mana yang sebaiknya memicu modul ini | +| `detect_files` | `['.Rprofile']` | filenames mana yang sebaiknya memicu modul ini | +| `detect_folders` | `['.Rproj.user']` | Folder mana yang sebaiknya memicul modul ini | | `disabled` | `false` | Disables the `r` module. | ### Variabel @@ -2903,7 +3164,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | -------- | ------------- | --------------------------------- | | version | `v4.0.5` | The version of `R` | | symbol | | Menyalin nilai dari opsi `symbol` | -| style | `"blue bold"` | Menyalin nilai dari opsi `style` | +| style | `'blue bold'` | Menyalin nilai dari opsi `style` | ### Contoh @@ -2911,7 +3172,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr # ~/.config/starship.toml [rlang] -format = "with [📐 $version](blue bold) " +format = 'with [📐 $version](blue bold) ' ``` ## Raku @@ -2925,13 +3186,13 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------------------ | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version-$vm_version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦋 "` | The symbol used before displaying the version of Raku | -| `detect_extensions` | `["p6", "pm6", "pod6", "raku", "rakumod"]` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `["META6.json"]` | filenames mana yang sebaiknya memicu modul ini. | +| `fromat` | `'via [$symbol($version-$vm_version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦋 '` | The symbol used before displaying the version of Raku | +| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['META6.json']` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | -| `style` | `"bold 149"` | Gaya penataan untuk modul. | +| `style` | `'bold 149'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `raku` module. | ### Variabel @@ -2949,7 +3210,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra # ~/.config/starship.toml [raku] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## Red @@ -2962,13 +3223,13 @@ By default the `red` module shows the currently installed version of [Red](https | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | -| `detect_extensions` | `["red"]` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🔺 '` | A format string representing the symbol of Red. | +| `detect_extensions` | `['red']` | Ekstensi mana yang sebaiknya memicu modul ini. | | `detect_files` | `[]` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | -| `style` | `"red bold"` | Gaya penataan untuk modul. | +| `style` | `'red bold'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `red` module. | ### Variabel @@ -2987,7 +3248,7 @@ By default the `red` module shows the currently installed version of [Red](https # ~/.config/starship.toml [red] -symbol = "🔴 " +symbol = '🔴 ' ``` ## Ruby @@ -3005,14 +3266,14 @@ Starship gets the current Ruby version by running `ruby -v`. | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `detect_extensions` | `["rb"]` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `["Gemfile", ".ruby-version"]` | filenames mana yang sebaiknya memicu modul ini. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💎 '` | A format string representing the symbol of Ruby. | +| `detect_extensions` | `['rb']` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['Gemfile', '.ruby-version']` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | -| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | -| `style` | `"bold red"` | Gaya penataan untuk modul. | +| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Which environment variables should trigger this module. | +| `style` | `'bold red'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `ruby` module. | ### Variabel @@ -3031,7 +3292,7 @@ Starship gets the current Ruby version by running `ruby -v`. # ~/.config/starship.toml [ruby] -symbol = "🔺 " +symbol = '🔺 ' ``` ## Rust @@ -3045,13 +3306,13 @@ By default the `rust` module shows the currently installed version of [Rust](htt | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `detect_extensions` | `["rs"]` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `["Cargo.toml"]` | filenames mana yang sebaiknya memicu modul ini. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦀 '` | A format string representing the symbol of Rust | +| `detect_extensions` | `['rs']` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['Cargo.toml']` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | -| `style` | `"bold red"` | Gaya penataan untuk modul. | +| `style` | `'bold red'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `rust` module. | ### Variabel @@ -3072,7 +3333,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt # ~/.config/starship.toml [rust] -format = "via [⚙️ $version](red bold)" +format = 'via [⚙️ $version](red bold)' ``` ## Scala @@ -3087,13 +3348,13 @@ The `scala` module shows the currently installed version of [Scala](https://www. | Opsi | Bawaan | Deskripsi | | ------------------- | ---------------------------------------- | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [${symbol}(${version} )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["sbt", "scala"]` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | filenames mana yang sebaiknya memicu modul ini. | -| `detect_folders` | `[".metals"]` | Folder mana yang sebaiknya memicul modul ini. | -| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | -| `style` | `"red dimmed"` | Gaya penataan untuk modul. | +| `fromat` | `'via [${symbol}(${version} )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['sbt', 'scala']` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | filenames mana yang sebaiknya memicu modul ini. | +| `detect_folders` | `['.metals']` | Folder mana yang sebaiknya memicul modul ini. | +| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. | +| `style` | `'red dimmed'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `scala` module. | ### Variabel @@ -3112,7 +3373,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. # ~/.config/starship.toml [scala] -symbol = "🌟 " +symbol = '🌟 ' ``` ## Shell @@ -3129,19 +3390,19 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Opsi | Bawaan | Deskripsi | | ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `"bsh"` | A format string used to represent bash. | -| `fish_indicator` | `"fsh"` | A format string used to represent fish. | -| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. | -| `powershell_indicator` | `"psh"` | A format string used to represent powershell. | -| `ion_indicator` | `"ion"` | A format string used to represent ion. | -| `elvish_indicator` | `"esh"` | A format string used to represent elvish. | -| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. | -| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. | -| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. | -| `nu_indicator` | `"nu"` | A format string used to represent nu. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `fromat` | `"[$indicator]($style) "` | Format dari modul. | -| `style` | `"white bold"` | Gaya penataan untuk modul. | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `fromat` | `'[$indicator]($style) '` | Format dari modul. | +| `style` | `'white bold'` | Gaya penataan untuk modul. | | `disabled` | `true` | Disables the `shell` module. | ### Variabel @@ -3159,26 +3420,26 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [shell] -fish_indicator = "" -powershell_indicator = "_" -unknown_indicator = "mystery shell" -style = "cyan bold" +fish_indicator = '' +powershell_indicator = '_' +unknown_indicator = 'mystery shell' +style = 'cyan bold' disabled = false ``` ## SHLVL -The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ('shell level') environment variable, if it is set to a number and meets or exceeds the specified threshold. ### Opsi | Opsi | Bawaan | Deskripsi | | ----------- | ---------------------------- | ------------------------------------------------------------- | | `threshold` | `2` | Display threshold. | -| `fromat` | `"[$symbol$shlvl]($style) "` | Format dari modul. | -| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. | +| `fromat` | `'[$symbol$shlvl]($style) '` | Format dari modul. | +| `symbol` | `'↕️ '` | The symbol used to represent the `SHLVL`. | | `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. | -| `style` | `"bold yellow"` | Gaya penataan untuk modul. | +| `style` | `'bold yellow'` | Gaya penataan untuk modul. | | `disabled` | `true` | Disables the `shlvl` module. | ### Variabel @@ -3198,7 +3459,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int [shlvl] disabled = false -format = "$shlvl level(s) down" +format = '$shlvl level(s) down' threshold = 3 ``` @@ -3211,8 +3472,8 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | Opsi | Bawaan | Deskripsi | | ---------- | -------------------------------- | ------------------------------------------------ | | `fromat` | `'[$symbol\[$env\]]($style) '` | Format dari modul. | -| `symbol` | `""` | A format string displayed before the image name. | -| `style` | `"bold dimmed blue"` | Gaya penataan untuk modul. | +| `symbol` | `''` | A format string displayed before the image name. | +| `style` | `'bold dimmed blue'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `singularity` module. | ### Variabel @@ -3243,9 +3504,9 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | Opsi | Bawaan | Deskripsi | | ------------------- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | The number of directories the environment path should be truncated to. `0` artinya tidak ada potongan. Lihat juga modul [`directory`](#directory). | -| `symbol` | `"🅢 "` | Simbol yang digunakan sebelum nama environment. | -| `style` | `"bold blue"` | Gaya penataan untuk modul. | -| `fromat` | `"via [$symbol$environment]($style) "` | Format dari modul. | +| `symbol` | `'🅢 '` | Simbol yang digunakan sebelum nama environment. | +| `style` | `'bold blue'` | Gaya penataan untuk modul. | +| `fromat` | `'via [$symbol$environment]($style) '` | Format dari modul. | | `disabled` | `false` | Disables the `spack` module. | ### Variabel @@ -3264,7 +3525,7 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat # ~/.config/starship.toml [spack] -format = "[$symbol$environment](dimmed blue) " +format = '[$symbol$environment](dimmed blue) ' ``` ## Status @@ -3281,14 +3542,14 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Opsi | Bawaan | Deskripsi | | --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `fromat` | `"[$symbol$status]($style) "` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `success_symbol` | `""` | The symbol displayed on program success | -| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | -| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | -| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | -| `style` | `"bold red"` | Gaya penataan untuk modul. | +| `fromat` | `'[$symbol$status]($style) '` | The format of the module | +| `symbol` | `'❌'` | The symbol displayed on program error | +| `success_symbol` | `''` | The symbol displayed on program success | +| `not_executable_symbol` | `'🚫'` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `'🔍'` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `'🧱'` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `'⚡'` | The symbol displayed on any signal | +| `style` | `'bold red'` | Gaya penataan untuk modul. | | `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code | | `pipestatus` | `false` | Enable pipestatus reporting | @@ -3320,9 +3581,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [status] -style = "bg:blue" -symbol = "🔴 " -success_symbol = "🟢 SUCCESS" +style = 'bg:blue' +symbol = '🔴 ' +success_symbol = '🟢 SUCCESS' format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false @@ -3342,9 +3603,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Opsi | Bawaan | Deskripsi | | --------------- | ------------------------ | ------------------------------------------------------- | -| `fromat` | `"[as $symbol]($style)"` | The format of the module | -| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached | -| `style` | `"bold blue"` | Gaya penataan untuk modul. | +| `fromat` | `'[as $symbol]($style)'` | The format of the module | +| `symbol` | `'🧙 '` | The symbol displayed when credentials are cached | +| `style` | `'bold blue'` | Gaya penataan untuk modul. | | `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | | `disabled` | `true` | Disables the `sudo` module. | @@ -3363,8 +3624,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [sudo] -style = "bold green" -symbol = "👩‍💻 " +style = 'bold green' +symbol = '👩‍💻 ' disabled = false ``` @@ -3388,13 +3649,13 @@ By default the `swift` module shows the currently installed version of [Swift](h | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `detect_extensions` | `["swift"]` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `["Package.swift"]` | filenames mana yang sebaiknya memicu modul ini. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐦 '` | A format string representing the symbol of Swift | +| `detect_extensions` | `['swift']` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['Package.swift']` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | -| `style` | `"bold 202"` | Gaya penataan untuk modul. | +| `style` | `'bold 202'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `swift` module. | ### Variabel @@ -3413,7 +3674,7 @@ By default the `swift` module shows the currently installed version of [Swift](h # ~/.config/starship.toml [swift] -format = "via [🏎 $version](red bold)" +format = 'via [🏎 $version](red bold)' ``` ## Terraform @@ -3435,13 +3696,13 @@ Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol$workspace]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `fromat` | `'via [$symbol$workspace]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💠'` | A format string shown before the terraform workspace. | +| `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | Ekstensi mana yang sebaiknya memicu modul ini. | | `detect_files` | `[]` | filenames mana yang sebaiknya memicu modul ini. | -| `detect_folders` | `[".terraform"]` | Folder mana yang sebaiknya memicul modul ini. | -| `style` | `"bold 105"` | Gaya penataan untuk modul. | +| `detect_folders` | `['.terraform']` | Folder mana yang sebaiknya memicul modul ini. | +| `style` | `'bold 105'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `terraform` module. | ### Variabel @@ -3463,7 +3724,7 @@ Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: # ~/.config/starship.toml [terraform] -format = "[🏎💨 $version$workspace]($style) " +format = '[🏎💨 $version$workspace]($style) ' ``` #### Without Terraform version @@ -3472,7 +3733,7 @@ format = "[🏎💨 $version$workspace]($style) " # ~/.config/starship.toml [terraform] -format = "[🏎💨 $workspace]($style) " +format = '[🏎💨 $workspace]($style) ' ``` ## Waktu @@ -3489,15 +3750,15 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Opsi | Bawaan | Deskripsi | | ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `fromat` | `"at [$time]($style) "` | The format string for the module. | +| `fromat` | `'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. | +| `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 | +| `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. +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. ### Variabel @@ -3516,9 +3777,9 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de [time] disabled = false format = '🕙[\[ $time \]]($style) ' -time_format = "%T" -utc_time_offset = "-5" -time_range = "10:00:00-14:00:00" +time_format = '%T' +utc_time_offset = '-5' +time_range = '10:00:00-14:00:00' ``` ## Username @@ -3540,9 +3801,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Opsi | Bawaan | Deskripsi | | ------------- | ----------------------- | ------------------------------------------- | -| `style_root` | `"bold red"` | The style used when the user is root/admin. | -| `style_user` | `"bold yellow"` | The style used for non-root users. | -| `fromat` | `"[$user]($style) in "` | Format dari modul. | +| `style_root` | `'bold red'` | The style used when the user is root/admin. | +| `style_user` | `'bold yellow'` | The style used for non-root users. | +| `fromat` | `'[$user]($style) in '` | Format dari modul. | | `show_always` | `false` | Always shows the `username` module. | | `disabled` | `false` | Disables the `username` module. | @@ -3550,8 +3811,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Variabel | Contoh | Deskripsi | | -------- | ------------ | ------------------------------------------------------------------------------------------- | -| `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. | +| `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. | ### Contoh @@ -3559,9 +3820,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` # ~/.config/starship.toml [username] -style_user = "white bold" -style_root = "black bold" -format = "user: [$user]($style) " +style_user = 'white bold' +style_root = 'black bold' +format = 'user: [$user]($style) ' disabled = false show_always = true ``` @@ -3576,13 +3837,13 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'⍱ '` | A format string representing the symbol of Vagrant. | | `detect_extensions` | `[]` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `["Vagrantfile"]` | filenames mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['Vagrantfile']` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | -| `style` | `"cyan bold"` | Gaya penataan untuk modul. | +| `style` | `'cyan bold'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `vagrant` module. | ### Variabel @@ -3601,7 +3862,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// # ~/.config/starship.toml [vagrant] -format = "via [⍱ $version](bold white) " +format = 'via [⍱ $version](bold white) ' ``` ## V @@ -3615,13 +3876,13 @@ The `vlang` module shows you your currently installed version of [V](https://vla | Opsi | Bawaan | Deskripsi | | ------------------- | -------------------------------------------- | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"V "` | A format string representing the symbol of V | -| `detect_extensions` | `["v"]` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | filenames mana yang sebaiknya memicu modul ini. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'V '` | A format string representing the symbol of V | +| `detect_extensions` | `['v']` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | -| `style` | `"blue bold"` | Gaya penataan untuk modul. | +| `style` | `'blue bold'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `vlang` module. | ### Variabel @@ -3637,7 +3898,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla ```toml # ~/.config/starship.toml [vlang] -format = "via [V $version](blue bold) " +format = 'via [V $version](blue bold) ' ``` ## VCSH @@ -3648,9 +3909,9 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | Opsi | Bawaan | Deskripsi | | ---------- | -------------------------------- | ------------------------------------------------------ | -| `symbol` | | The symbol used before displaying the repository name. | -| `style` | `"bold yellow"` | Gaya penataan untuk modul. | -| `fromat` | `"vcsh [$symbol$repo]($style) "` | Format dari modul. | +| `symbol` | `''` | The symbol used before displaying the repository name. | +| `style` | `'bold yellow'` | Gaya penataan untuk modul. | +| `fromat` | `'vcsh [$symbol$repo]($style) '` | Format dari modul. | | `disabled` | `false` | Disables the `vcsh` module. | ### Variabel @@ -3669,7 +3930,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v # ~/.config/starship.toml [vcsh] -format = "via [✨ $repo](bold blue) " +format = '[🆅 $repo](bold blue) ' ``` ## Zig @@ -3682,12 +3943,12 @@ By default the the `zig` module shows the currently installed version of [Zig](h | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | Gaya penataan untuk modul. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'↯ '` | The symbol used before displaying the version of Zig. | +| `style` | `'bold yellow'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `zig` module. | -| `detect_extensions` | `["zig"]` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_extensions` | `['zig']` | Ekstensi mana yang sebaiknya memicu modul ini. | | `detect_files` | `[]` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | @@ -3707,7 +3968,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h # ~/.config/starship.toml [zig] -symbol = "⚡️ " +symbol = '⚡️ ' ``` ## Custom commands @@ -3752,16 +4013,16 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `command` | `''` | The command whose output should be printed. The command will be passed on stdin to the shell. | | `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `deskripsi` | `""` | The description of the module that is shown when running `starship explain`. | +| `deskripsi` | `''` | The description of the module that is shown when running `starship explain`. | | `detect_files` | `[]` | The files that will be searched in the working directory for a match. | | `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. | | `detect_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"` | Gaya penataan untuk modul. | -| `fromat` | `"[$symbol($output )]($style)"` | Format dari modul. | +| `symbol` | `''` | The symbol used before displaying the command output. | +| `style` | `'bold green'` | Gaya penataan untuk modul. | +| `fromat` | `'[$symbol($output )]($style)'` | Format dari modul. | | `disabled` | `false` | Disables this `custom` module. | | `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | | `use_stdin` | | An optional boolean value that overrides whether commands should be forwarded to the shell via the standard input or as an argument. If unset standard input is used by default, unless the shell does not support it (cmd, nushell). Setting this disables shell-specific argument handling. | @@ -3784,14 +4045,14 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt - 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. +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 -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. ```toml -shell = ["pwsh", "-Command", "-"] +shell = ['pwsh', '-Command', '-'] ``` ::: warning Make sure your custom shell configuration exits gracefully @@ -3812,19 +4073,19 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -detect_files = ["foo"] # can specify filters but wildcards are not supported -when = """ test "$HOME" = "$PWD" """ -format = " transcending [$output]($style)" +command = 'echo foo' # shows output of command +detect_files = ['foo'] # can specify filters but wildcards are not supported +when = ''' test "$HOME" = "$PWD" ''' +format = ' transcending [$output]($style)' [custom.time] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command', '-'] [custom.time-as-arg] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command'] use_stdin = false ``` diff --git a/docs/id-ID/guide/README.md b/docs/id-ID/guide/README.md index c5a78379..9808e770 100644 --- a/docs/id-ID/guide/README.md +++ b/docs/id-ID/guide/README.md @@ -219,7 +219,6 @@ Alternatively, install Starship using any of the following package managers: | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | | Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | -| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | @@ -417,6 +416,14 @@ Please check out these previous works that helped inspire the creation of starsh - **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons. +## ❤️ Sponsors + +Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website. + +**Supporter Tier** + +- [Dimension](https://dimension.dev/) +


Ikon roket Starship diff --git a/docs/id-ID/presets/README.md b/docs/id-ID/presets/README.md index 5d7631b0..838e08db 100644 --- a/docs/id-ID/presets/README.md +++ b/docs/id-ID/presets/README.md @@ -10,6 +10,14 @@ This preset changes the symbols for each module to use Nerd Font symbols. [![Tangkapan Layar dari preset simbol Nerd Font](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font) +## [No Nerd Fonts](./no-nerd-font.md) + +This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt. + +::: tip This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). ::: + +[Click to view No Nerd Font preset](./no-nerd-font) + ## [Segmen Berkurung](./bracketed-segments.md) Konfigurasi prasetel berikut mengubah format dari seluruh modul bawaan untuk menampilkan segmennya di dalam tanda kurung daripada menggunakan susunan kata bawaan Starship ("via", "on", dll.). @@ -28,6 +36,12 @@ Konfigurasi prasetel berikut menyembunyikan versi language runtimes. Jika kamu b [![Tangkapan Layar dari preset Penyembunyian Versi Runtime](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes) +## [No Empty Icons](./no-empty-icons.md) + +This preset does not show icons if the toolset is not found. + +[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Click to view No Runtime Versions preset")](./no-empty-icons.md) + ## [Pure Prompt](./pure-preset.md) This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). @@ -39,3 +53,9 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship. [![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png "Click to view Pure Prompt preset")](./pastel-powerline) + +## [Tokyo Night](./tokyo-night.md) + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) diff --git a/docs/id-ID/presets/no-empty-icons.md b/docs/id-ID/presets/no-empty-icons.md new file mode 100644 index 00000000..72d3f7a2 --- /dev/null +++ b/docs/id-ID/presets/no-empty-icons.md @@ -0,0 +1,17 @@ +[Return to Presets](./README.md#no-empty-icons) + +# No Empty Icons Preset + +If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. + +![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) + +### Konfigurasi + +```sh +starship preset no-empty-icons > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-empty-icons.toml) + +<<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/id-ID/presets/no-nerd-font.md b/docs/id-ID/presets/no-nerd-font.md new file mode 100644 index 00000000..d1290726 --- /dev/null +++ b/docs/id-ID/presets/no-nerd-font.md @@ -0,0 +1,19 @@ +[Return to Presets](./README.md#no-nerd-fonts) + +# No Nerd Fonts Preset + +This preset restricts the use of symbols to those from emoji and powerline sets. + +This means that even without a Nerd Font installed, you should be able to view all module symbols. + +This preset will become the default preset in a future release of starship. + +### Konfigurasi + +```sh +starship preset no-nerd-font > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-nerd-font.toml) + +<<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/id-ID/presets/tokyo-night.md b/docs/id-ID/presets/tokyo-night.md new file mode 100644 index 00000000..d1f3aebf --- /dev/null +++ b/docs/id-ID/presets/tokyo-night.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#pastel-powerline) + +# Tokyo Night Preset + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) + +### Prasyarat + +- [Nerd Font](https://www.nerdfonts.com/) yang sudah terpasang dan berjalan di dalam terminalmu + +### Konfigurasi + +```sh +starship preset tokyo-night > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/tokyo-night.toml) + +<<< @/.vuepress/public/presets/toml/tokyo-night.toml diff --git a/docs/it-IT/advanced-config/README.md b/docs/it-IT/advanced-config/README.md index 476651d6..671b2f30 100644 --- a/docs/it-IT/advanced-config/README.md +++ b/docs/it-IT/advanced-config/README.md @@ -8,11 +8,11 @@ Le configurazioni in questa sezione sono soggette a modifiche nelle future versi ::: -## TransientPrompt in PowerShell +## TransientPrompt su PowerShell -It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`. +È possibile rimpiazzare il prompt precedente con una stringa di testo personalizzata. È utile nei casi in cui alcune informazioni sulla shell non ci servono. Per attivarlo, esegui `Enable-TransientPrompt` sulla shell. Per mantenerlo permanente, metti questa dichiarazione nel tuo `$PROFILE`. Può essere disattivata al volo con `Disable-TransientPrompt`. -By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do +Per impostazione predefinita, il simbolo predefinito prima dell'input sarà rimpiazzato con `>`. Per personalizzarlo, definisci una nuova funzione chiamata `Invoke-Starship-TransientFunction`. Ad esempio, per mostrare il modulo dei `character`, dovresti fare ```powershell function Invoke-Starship-TransientFunction { @@ -26,7 +26,7 @@ Enable-TransientPrompt ## TransientPrompt and TransientRightPrompt in Cmd -Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient ` where \ can be one of: +Clink allows you to replace the previous-printed prompt with custom strings. È utile nei casi in cui alcune informazioni sulla shell non ci servono. To enable this, run `clink set prompt.transient ` where \ can be one of: - `always`: always replace the previous prompt - `same_dir`: replace the previous prompt only if the working directory is same @@ -34,7 +34,7 @@ Clink allows you to replace the previous-printed prompt with custom strings. Thi You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right: -- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do +- Per impostazione predefinita, il simbolo predefinito prima dell'input sarà rimpiazzato con `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. Ad esempio, per mostrare il modulo dei `character`, dovresti fare ```lua function starship_transient_prompt_func(prompt) @@ -56,11 +56,11 @@ load(io.popen('starship init cmd'):read("*a"))() ## TransientPrompt and TransientRightPrompt in Fish -It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `enable_transience` in the shell session. To make it permanent, put this statement in your `~/.config/fish/config.fish`. Transience can be disabled on-the-fly with `disable_transience`. +È possibile rimpiazzare il prompt precedente con una stringa di testo personalizzata. È utile nei casi in cui alcune informazioni sulla shell non ci servono. To enable this, run `enable_transience` in the shell session. To make it permanent, put this statement in your `~/.config/fish/config.fish`. Transience can be disabled on-the-fly with `disable_transience`. Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct. -- By default, the left side of input gets replaced with a bold-green `❯`. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do +- By default, the left side of input gets replaced with a bold-green `❯`. To customize this, define a new function called `starship_transient_prompt_func`. Ad esempio, per mostrare il modulo dei `character`, dovresti fare ```fish function starship_transient_prompt_func @@ -205,7 +205,9 @@ Some shells support a right prompt which renders on the same line as the input. Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](/config/#fill). -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. + +Note: Nushell 0.71.0 or later is required ### Esempio @@ -280,5 +282,5 @@ Se sono specificati più colori per il primo piano/sfondo, l'ultimo nella string Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: - Many terminals disable support for `blink` by default -- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564). +- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). - `strikethrough` is not supported by the default macOS Terminal.app diff --git a/docs/it-IT/config/README.md b/docs/it-IT/config/README.md index 77316f7e..68940af4 100644 --- a/docs/it-IT/config/README.md +++ b/docs/it-IT/config/README.md @@ -15,15 +15,17 @@ Tutta la configurazione per starship è fatta in questo file [TOML](https://gith # Inserts a blank line between shell prompts add_newline = true -# Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +# 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 ``` +### Config File Location + È possibile modificare la posizione predefinita del file di configurazione con la variabile d'ambiente `STARSHIP_CONFIG`: ```sh @@ -70,6 +72,62 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') Per convenzione, la maggior parte dei moduli ha un prefisso di colore predefinito del terminale (ad esempio `via` in "nodejs") e uno spazio vuoto come suffisso. +### Strings + +In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. + +The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. + +| Symbol | Type | Notes | +| ------ | ------------------------- | ------------------------------------------------------ | +| `'` | literal string | less escaping | +| `"` | string | more escaping | +| `'''` | multi-line literal string | less escaping | +| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | + +Per esempio: + +```toml +# literal string +format = '☺\☻ ' + +# regular string +format = "☺\\☻ " + +# escaping Starship symbols +format = '\[\$\] ' +``` + +When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: + +```toml +# with literal string +format = ''' + +\$''' + +# with multiline basic string +format = """ + +\\$""" + +# with basic string +format = "\n\\$" +``` + +In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. + +```toml +format = """ +line1\ +line1\ +line1 +line2\ +line2\ +line2 +""" +``` + ### Formato Stringhe Le stringhe di formato sono il formato con cui un modulo stampa tutte le sue variabili. La maggior parte dei moduli ha una voce chiamata `formato` che configura il formato di visualizzazione del modulo. È possibile utilizzare testi, variabili e gruppi di testo in una stringa di formato. @@ -80,9 +138,9 @@ Una variabile contiene un simbolo `$` seguito dal nome della variabile. The name Per esempio: -- `$version` è una stringa di formato con una variabile chiamata `version`. -- `$git_branch$git_commit` è una stringa di formato con due variabili denominate `git_branch` e `git_commit`. -- `$git_branch $git_commit` ha le due variabili separate con uno spazio. +- `'$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. #### Gruppo Testo @@ -94,20 +152,20 @@ Nella seconda parte, che è racchiusa tra `()`, è presente una [style string](# Per esempio: -- `[on](rosso grassetto)` stamperà una stringa `on` con testo in grassetto di colore rosso. -- `[⌘ $version](grassetto verde)` stamperà un simbolo `⌘` seguito dal contenuto della variabile `version`, con testo grassetto di colore verde. -- `[a [b](rosso) c](verde)` stamperà `a b c` con `b` rosso, e `a` e `c` verde. +- `'[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. #### Stringhe di stile La maggior parte dei moduli in starship ti permettono di configurare i loro stili di visualizzazione. Questo viene fatto con una voce (solitamente chiamata `style`) che è una stringa che specifica la configurazione. Ecco alcuni esempi di stringhe di stile per quello che fanno. Per maggiori dettagli sulla sintassi completa, consulta la [guida di configurazione avanzata](/advanced-config/). -- `"fg:green bg:blue"` imposta il testo verde su uno sfondo blu -- `"bg:blue fg:bright-green"` imposta un testo verde brillante su uno sfondo blu -- `"bold fg:27"` imposta il testo in grassetto con [ANSI color](https://i.stack.imgur.com/KTSQa.png) 27 -- `"underline bg:#bf5700"` imposta il testo sottolineato su uno sfondo arancione scuro -- `"bold italic fg:purple"` imposta il testo viola in corsivo e grassetto -- `""` disabilita esplicitamente tutti gli stili +- `'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 Nota che quello che assomiglia allo stile sarà controllato dal tuo emulatore terminale. Ad esempio, alcuni emulatori di terminale renderanno luminosi i colori invece del testo in grassetto, e alcuni temi colorati useranno gli stessi valori per i colori normali e luminosi. Inoltre, per ottenere il testo in corsivo, il tuo terminale deve supportare il corsivo. @@ -117,43 +175,20 @@ Una stringa di formato condizionale inserita in `(` e `)` non verrà presentata Per esempio: -- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. -- `(some text)` will always show nothing since there are no variables wrapped in the braces. -- 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\] )`. - -#### Special characters - -The following symbols have special usage in a format string and must be escaped: `$ \ [ ] ( )`. - -Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). - -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 = ''' - -\$''' -``` +- `'(@$region)'` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. +- `'(some text)'` will always show nothing since there are no variables wrapped in the braces. +- When `$combined` is a shortcut for `\[$a$b\]`, `'($combined)'` will show nothing only if `$a` and `$b` are both `None`. This works the same as `'(\[$a$b\] )'`. ### Negative matching -Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched. +Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading '!' character. The presence of _any_ negative indicator in the directory will result in the module not being matched. Extensions are matched against both the characters after the last dot in a filename, and the characters after the first dot in a filename. For example, `foo.bar.tar.gz` will be matched against `bar.tar.gz` and `gz` in the `detect_extensions` variable. Files whose name begins with a dot are not considered to have extensions at all. To see how this works in practice, you could match TypeScript but not MPEG Transport Stream files thus: ```toml -detect_extensions = ["ts", "!video.ts", "!audio.ts"] +detect_extensions = ['ts', '!video.ts', '!audio.ts'] ``` ## Prompt @@ -165,11 +200,11 @@ This is the list of prompt-wide configuration options. | Opzione | Default | Descrizione | | ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `format` | [link](#default-prompt-format) | Configura il formato del prompt. | -| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | +| `right_format` | `''` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | | `scan_timeout` | `30` | Timeout per starship per scansionare i file (in millisecondi). | | `command_timeout` | `500` | Timeout per i comandi eseguiti da starship (in millisecondi). | | `add_newline` | `true` | Inserisce una riga vuota tra i prompt della shell. | -| `palette` | `""` | Sets which color palette from `palettes` to use. | +| `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | ### Esempio @@ -178,10 +213,10 @@ This is the list of prompt-wide configuration options. # ~/.config/starship.toml # Use custom format -format = """ +format = ''' [┌───────────────────>](bold green) [│](bold green)$directory$rust$package -[└─>](bold green) """ +[└─>](bold green) ''' # Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 @@ -189,15 +224,15 @@ scan_timeout = 10 # Disable the blank line at the start of the prompt add_newline = false -# Set "foo" as custom color palette -palette = "foo" +# Set 'foo' as custom color palette +palette = 'foo' # Define custom colors [palettes.foo] # Overwrite existing color -blue = "21" +blue = '21' # Define new color -mustard = "#af8700" +mustard = '#af8700' ``` ### Default Prompt Format @@ -205,7 +240,7 @@ mustard = "#af8700" 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" +format = '$all' # Which is equivalent to format = """ @@ -236,7 +271,9 @@ $elixir\ $elm\ $erlang\ $golang\ +$guix_shell\ $haskell\ +$haxe\ $helm\ $java\ $julia\ @@ -245,6 +282,7 @@ $lua\ $nim\ $nodejs\ $ocaml\ +$opa\ $perl\ $php\ $pulumi\ @@ -281,6 +319,7 @@ $jobs\ $battery\ $time\ $status\ +$os\ $container\ $shell\ $character""" @@ -290,7 +329,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format = "$all$directory$character" +format = '$all$directory$character' ``` ## AWS @@ -305,15 +344,17 @@ When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. +When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. + ### Opzioni | Opzione | Default | Descrizione | | ------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | -| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | -| `profile_aliases` | | Table of profile aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | Lo stile per il modulo. | +| `symbol` | `'☁️ '` | The symbol used before displaying the current AWS profile. | +| `region_aliases` | `{}` | Table of region aliases to display in addition to the AWS name. | +| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | +| `style` | `'bold yellow'` | Lo stile per il modulo. | | `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Disables the `AWS` module. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -339,11 +380,11 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL [aws] format = 'on [$symbol($profile )(\($region\) )]($style)' -style = "bold blue" -symbol = "🅰 " +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' [aws.profile_aliases] CompanyGroupFrobozzOnCallAccess = 'Frobozz' ``` @@ -354,12 +395,12 @@ CompanyGroupFrobozzOnCallAccess = 'Frobozz' # ~/.config/starship.toml [aws] -format = "on [$symbol$region]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$region]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' ``` #### Display profile @@ -368,34 +409,48 @@ us-east-1 = "va" # ~/.config/starship.toml [aws] -format = "on [$symbol$profile]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$profile]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.profile_aliases] Enterprise_Naming_Scheme-voidstars = 'void**' ``` ## Azure -The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription, as defined in the `~/.azure/azureProfile.json` file. +The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription or the username, as defined in the `~/.azure/azureProfile.json` file. ### Opzioni | Variable | Default | Descrizione | | ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `"on [$symbol($subscription)]($style) "` | The format for the Azure module to render. | -| `symbol` | `"ﴃ "` | The symbol used in the format. | -| `style` | `"blu grassetto"` | The style used in the format. | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'ﴃ '` | The symbol used in the format. | +| `style` | `'blu grassetto'` | The style used in the format. | | `disabled` | `true` | Disables the `azure` module. | -### Esempio +### Examples + +#### Display Subscription Name ```toml # ~/.config/starship.toml [azure] disabled = false -format = "on [$symbol($subscription)]($style) " +format = 'on [$symbol($subscription)]($style) ' +symbol = 'ﴃ ' +style = 'blue bold' +``` + +#### Display Username + +```toml +# ~/.config/starship.toml + +[azure] +disabled = false +format = "on [$symbol($username)]($style) " symbol = "ﴃ " style = "blue bold" ``` @@ -408,12 +463,12 @@ The `battery` module shows how charged the device's battery is and its current c | Opzione | Default | Descrizione | | -------------------- | --------------------------------- | --------------------------------------------------- | -| `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. | +| `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. | @@ -423,9 +478,9 @@ The `battery` module shows how charged the device's battery is and its current c # ~/.config/starship.toml [battery] -full_symbol = "🔋 " -charging_symbol = "⚡️ " -discharging_symbol = "💀 " +full_symbol = '🔋 ' +charging_symbol = '⚡️ ' +discharging_symbol = '💀 ' ``` ### Battery Display @@ -435,7 +490,7 @@ The `display` configuration option is used to define when the battery indicator ```toml [[battery.display]] threshold = 10 -style = "bold red" +style = 'bold red' ``` The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. @@ -447,21 +502,21 @@ The `display` option is an array of the following table. | Opzione | Default | Descrizione | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | | `threshold` | `10` | The upper bound for the display option. | -| `style` | `"red bold"` | The style used if the display option is in use. | +| `style` | `'red bold'` | The style used if the display option is in use. | | `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. | | `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. | #### Esempio ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% threshold = 10 -style = "bold red" +style = 'bold red' -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% threshold = 30 -style = "bold yellow" -discharging_symbol = "💦" +style = 'bold yellow' +discharging_symbol = '💦' # when capacity is over 30%, the battery indicator will not be displayed ``` @@ -477,13 +532,13 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil | Opzione | Default | Descrizione | | ------------------- | ----------------------------------------------- | ----------------------------------------------------- | -| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. | -| `version_format` | `"v${raw}"` | Il formato della versione. | -| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. | +| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. | +| `version_format` | `'v${raw}'` | Il formato della versione. | +| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. | | `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Quali nomi di file dovrebbero attivare questo modulo. | | `detect_folders` | `[]` | Which folders should trigger this modules. | -| `style` | `"bold blue"` | Lo stile per il modulo. | +| `style` | `'bold blue'` | Lo stile per il modulo. | | `disabled` | `false` | Disables the `elixir` module. | ### Variables @@ -502,7 +557,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil # ~/.config/starship.toml [buf] -symbol = "🦬 " +symbol = '🦬 ' ``` ## Bun @@ -514,16 +569,16 @@ The `bun` module shows the currently installed version of the [bun](https://bun. ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"🍞 "` | A format string representing the symbol of Node.js. | -| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `["bun.lockb", "bunfig.toml"]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | -| `style` | `"bold red"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `bun` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. | +| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['bun.lockb', 'bunfig.toml']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `'bold red'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `bun` module. | ### Variables @@ -541,7 +596,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. # ~/.config/starship.toml [bun] -format = "via [🍔 $version](bold green) " +format = 'via [🍔 $version](bold green) ' ``` ## C @@ -550,17 +605,17 @@ The `c` module shows some information about your C compiler. By default the modu ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version(-$name) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"C "` | The symbol used before displaying the compiler details | -| `detect_extensions` | `["c", "h"]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | -| `commands` | [ [ "cc", "--version" ], [ "gcc", "--version" ], [ "clang", "--version" ] ] | How to detect what the compiler is | -| `style` | `"bold 149"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `c` module. | +| Opzione | Default | Descrizione | +| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | +| `style` | `'bold 149'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `c` module. | ### Variables @@ -577,7 +632,7 @@ NB that `version` is not in the default format. The `commands` option accepts a list of commands to determine the compiler version and name. -Each command is represented as a list of the executable name, followed by its arguments, usually something like `["mycc", "--version"]`. Starship will try executing each command until it gets a result on STDOUT. +Each command is represented as a list of the executable name, followed by its arguments, usually something like `['mycc', '--version']`. Starship will try executing each command until it gets a result on STDOUT. If a C compiler is not supported by this module, you can request it by [raising an issue on GitHub](https://github.com/starship/starship/). @@ -587,7 +642,7 @@ If a C compiler is not supported by this module, you can request it by [raising # ~/.config/starship.toml [c] -format = "via [$name $version]($style)" +format = 'via [$name $version]($style)' ``` ## Character @@ -611,13 +666,13 @@ By default it only changes color. If you also want to change its shape take a lo | Opzione | Default | Descrizione | | --------------------------- | -------------------- | --------------------------------------------------------------------------------------- | -| `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. | -| `vimcmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | -| `vimcmd_replace_one_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim `replace_one` mode. | -| `vimcmd_replace_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim replace mode. | -| `vimcmd_visual_symbol` | `"[❮](bold yellow)"` | The format string used before the text input if the shell is in vim replace mode. | +| `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. | +| `vimcmd_symbol` | `'[❮](bold green)'` | The format string used before the text input if the shell is in vim normal mode. | +| `vimcmd_replace_one_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim `replace_one` mode. | +| `vimcmd_replace_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim replace mode. | +| `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | | `disabled` | `false` | Disables the `character` module. | ### Variables @@ -634,8 +689,8 @@ By default it only changes color. If you also want to change its shape take a lo # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[✗](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[✗](bold red) ' ``` #### Without custom error shape @@ -644,8 +699,8 @@ error_symbol = "[✗](bold red) " # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[➜](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[➜](bold red) ' ``` #### With custom vim shape @@ -654,7 +709,7 @@ error_symbol = "[➜](bold red) " # ~/.config/starship.toml [character] -vicmd_symbol = "[V](bold green) " +vicmd_symbol = '[V](bold green) ' ``` ## CMake @@ -666,16 +721,16 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | -------------------------------------- | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"△ "` | The symbol used before the version of cmake. | -| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo | -| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Quali nomi di file dovrebbero attivare questo modulo | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo | -| `style` | `"bold blue"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `cmake` module. | +| Opzione | Default | Descrizione | +| ------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'△ '` | The symbol used before the version of cmake. | +| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo | +| `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | Quali nomi di file dovrebbero attivare questo modulo | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo | +| `style` | `'bold blue'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -696,16 +751,16 @@ The `cobol` module shows the currently installed version of COBOL. By default, t ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | -| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `style` | `"bold blue"` | Lo stile per il modulo. | -| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | -| `disabled` | `false` | Disables the `cobol` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- | +| `symbol` | `'⚙️ '` | The symbol used before displaying the version of COBOL. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold blue'` | Lo stile per il modulo. | +| `detect_extensions` | `['cbl', 'cob', 'CBL', 'COB']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `disabled` | `false` | Disables the `cobol` module. | ### Variables @@ -735,8 +790,8 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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"` | Lo stile per il modulo. | +| `format` | `'took [$duration]($style) '` | The format for the module. | +| `style` | `'bold yellow'` | Lo stile per il modulo. | | `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). | @@ -758,7 +813,7 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec [cmd_duration] min_time = 500 -format = "underwent [$duration](bold yellow)" +format = 'underwent [$duration](bold yellow)' ``` ## Conda @@ -776,9 +831,9 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | Opzione | Default | Descrizione | | ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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"` | Lo stile per il modulo. | -| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `symbol` | `'🅒 '` | The symbol used before the environment name. | +| `style` | `'bold green'` | Lo stile per il modulo. | +| `format` | `'via [$symbol$environment]($style) '` | The format for the module. | | `ignore_base` | `true` | Ignores `base` environment when activated. | | `disabled` | `false` | Disables the `conda` module. | @@ -798,7 +853,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c # ~/.config/starship.toml [conda] -format = "[$symbol$environment](dimmed green) " +format = '[$symbol$environment](dimmed green) ' ``` ## Container @@ -809,8 +864,8 @@ The `container` module displays a symbol and container name, if inside a contain | Opzione | Default | Descrizione | | ---------- | ---------------------------------- | ----------------------------------------- | -| `symbol` | `"⬢"` | The symbol shown, when inside a container | -| `style` | `"bold red dimmed"` | Lo stile per il modulo. | +| `symbol` | `'⬢'` | The symbol shown, when inside a container | +| `style` | `'bold red dimmed'` | Lo stile per il modulo. | | `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `container` module. | @@ -842,16 +897,16 @@ The `crystal` module shows the currently installed version of [Crystal](https:// ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `style` | `"bold red"` | Lo stile per il modulo. | -| `detect_extensions` | `["cr"]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `["shard.yml"]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | -| `disabled` | `false` | Disables the `crystal` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- | +| `symbol` | `'🔮 '` | The symbol used before displaying the version of crystal. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold red'` | Lo stile per il modulo. | +| `detect_extensions` | `['cr']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['shard.yml']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `disabled` | `false` | Disables the `crystal` module. | ### Variables @@ -869,7 +924,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// # ~/.config/starship.toml [crystal] -format = "via [✨ $version](bold blue) " +format = 'via [✨ $version](bold blue) ' ``` ## Daml @@ -880,16 +935,16 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"Λ "` | A format string representing the symbol of Daml | -| `style` | `"bold cyan"` | Lo stile per il modulo. | -| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `["daml.yaml"]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | -| `disabled` | `false` | Disables the `daml` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'Λ '` | A format string representing the symbol of Daml | +| `style` | `'bold cyan'` | Lo stile per il modulo. | +| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['daml.yaml']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `disabled` | `false` | Disables the `daml` module. | ### Variables @@ -907,7 +962,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d # ~/.config/starship.toml [daml] -format = "via [D $version](bold bright-green) " +format = 'via [D $version](bold bright-green) ' ``` ## Dart @@ -920,16 +975,16 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `detect_extensions` | `["dart"]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[".dart_tool"]` | Quali cartelle dovrebbero attivare questo modulo. | -| `style` | `"bold blue"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `dart` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🎯 '` | A format string representing the symbol of Dart | +| `detect_extensions` | `['dart']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `['.dart_tool']` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `'bold blue'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -947,7 +1002,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d # ~/.config/starship.toml [dart] -format = "via [🔰 $version](bold red) " +format = 'via [🔰 $version](bold red) ' ``` ## Deno @@ -958,16 +1013,16 @@ The `deno` module shows you your currently installed version of [Deno](https://d ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ----------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"🦕 "` | A format string representing the symbol of Deno | -| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `["deno.json", "deno.jsonc", "mod.ts", "mod.js", "deps.ts", "deps.js"]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | -| `style` | `"green bold"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `deno` module. | +| Opzione | Default | Descrizione | +| ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦕 '` | A format string representing the symbol of Deno | +| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `'green bold'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `deno` module. | ### Variables @@ -983,7 +1038,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d # ~/.config/starship.toml [deno] -format = "via [🦕 $version](green bold) " +format = 'via [🦕 $version](green bold) ' ``` ## Directory @@ -996,20 +1051,21 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `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"` | Lo stile per il modulo. | -| `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: "…/" | -| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | -| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) | +| Opzione | Default | Descrizione | +| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `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'` | Lo stile per il modulo. | +| `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: '…/' | +| `before_repo_root_style` | | The style for the path segment above the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `'[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) '` | The format of a git repo when `before_repo_root_style` and `repo_root_style` is defined. | +| `home_symbol` | `'~'` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |

This module has a few advanced configuration options that control how the directory is displayed. @@ -1024,8 +1080,8 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ```toml [directory.substitutions] -"/Volumes/network/path" = "/net" -"src/com/long/java/path" = "mypath" +'/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`. @@ -1036,8 +1092,8 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | Variable | Esempio | Descrizione | | --------- | --------------------- | ----------------------------------- | -| path | `"D:/Projects"` | The current directory path | -| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | +| 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 @@ -1048,11 +1104,11 @@ Let us consider the path `/path/to/home/git_repo/src/lib` | Variable | Esempio | Descrizione | | ------------------ | --------------------- | --------------------------------------- | -| before_root_path | `"/path/to/home/"` | The path before git root directory path | -| repo_root | `"git_repo"` | The git root directory name | -| path | `"/src/lib"` | The remaining path | -| style | `"black bold dimmed"` | Mirrors the value of option `style` | -| repo_root_style | `"underline white"` | Style for git root directory name | +| before_root_path | `'/path/to/home/'` | The path before git root directory path | +| repo_root | `'git_repo'` | The git root directory name | +| path | `'/src/lib'` | The remaining path | +| style | `'black bold dimmed'` | Mirrors the value of option `style` | +| repo_root_style | `'underline white'` | Style for git root directory name |
@@ -1063,7 +1119,7 @@ Let us consider the path `/path/to/home/git_repo/src/lib` [directory] truncation_length = 8 -truncation_symbol = "…/" +truncation_symbol = '…/' ``` ## Docker Context @@ -1074,13 +1130,13 @@ The `docker_context` module shows the currently active [Docker context](https:// | Opzione | Default | Descrizione | | ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `format` | `'via [$symbol$context]($style) '` | The format for the module. | +| `symbol` | `'🐳 '` | The symbol used before displaying the Docker context. | | `only_with_files` | `true` | Only show when there's a match | | `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | +| `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | Which filenames should trigger this module (needs `only_with_files` to be true). | | `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | -| `style` | `"blu grassetto"` | Lo stile per il modulo. | +| `style` | `'blu grassetto'` | Lo stile per il modulo. | | `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -1099,7 +1155,7 @@ The `docker_context` module shows the currently active [Docker context](https:// # ~/.config/starship.toml [docker_context] -format = "via [🐋 $context](blue bold)" +format = 'via [🐋 $context](blue bold)' ``` ## Dotnet @@ -1125,17 +1181,17 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$var_cluster" +'dev.local.cluster.k8s' = 'dev' +'.*/openshift-cluster/.*' = 'openshift' +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' [kubernetes.user_aliases] -"dev.local.cluster.k8s" = "dev" -"root/.*" = "root" +'dev.local.cluster.k8s' = 'dev' +'root/.*' = 'root' ``` Only show the module in directories that contain a `k8s` file. @@ -2121,14 +2249,14 @@ Long and automatically generated cluster names can be identified and shortened u ```toml [kubernetes.context_aliases] # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -".*/openshift-cluster/.*" = "openshift" +'.*/openshift-cluster/.*' = 'openshift' # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$var_cluster" +'.*/(?P[\\w-]+)/.*' = '$var_cluster' # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' ``` ## Line Break @@ -2159,8 +2287,8 @@ The `localip` module shows the IPv4 address of the primary network interface. | Opzione | Default | Descrizione | | ---------- | ------------------------- | ------------------------------------------------------ | | `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | Lo stile per il modulo. | +| `format` | `'[$localipv4]($style) '` | The format for the module. | +| `style` | `'bold yellow'` | Lo stile per il modulo. | | `disabled` | `true` | Disables the `localip` module. | ### Variables @@ -2179,7 +2307,7 @@ The `localip` module shows the IPv4 address of the primary network interface. [localip] ssh_only = false -format = "@[$localipv4](bold red) " +format = '@[$localipv4](bold red) ' disabled = false ``` @@ -2193,17 +2321,17 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | -| `detect_extensions` | `["lua"]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `[".lua-version"]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `["lua"]` | Quali cartelle dovrebbero attivare questo modulo. | -| `style` | `"bold blue"` | Lo stile per il modulo. | -| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | -| `disabled` | `false` | Disables the `lua` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🌙 '` | A format string representing the symbol of Lua. | +| `detect_extensions` | `['lua']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['.lua-version']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `['lua']` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `'bold blue'` | Lo stile per il modulo. | +| `lua_binary` | `'lua'` | Configures the lua binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `lua` module. | ### Variables @@ -2221,7 +2349,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o # ~/.config/starship.toml [lua] -format = "via [🌕 $version](bold blue) " +format = 'via [🌕 $version](bold blue) ' ``` ## Memory Usage @@ -2241,9 +2369,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Opzione | Default | Descrizione | | ----------- | ----------------------------------------------- | -------------------------------------------------------- | | `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"` | Lo stile per il modulo. | +| `format` | `'via $symbol [${ram}( \| ${swap})]($style) '` | The format for the module. | +| `symbol` | `'🐏'` | The symbol used before displaying the memory usage. | +| `style` | `'bold dimmed white'` | Lo stile per il modulo. | | `disabled` | `true` | Disables the `memory_usage` module. | ### Variables @@ -2267,8 +2395,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y [memory_usage] disabled = false threshold = -1 -symbol = " " -style = "bold dimmed green" +symbol = ' ' +style = 'bold dimmed green' ``` ## Meson @@ -2282,10 +2410,10 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. | Opzione | Default | Descrizione | | ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- | | `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | -| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. | -| `format` | `"via [$symbol$project]($style) "` | The format for the module. | -| `symbol` | `"⬢ "` | The symbol used before displaying the project name. | -| `style` | `"blu grassetto"` | Lo stile per il modulo. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | +| `format` | `'via [$symbol$project]($style) '` | The format for the module. | +| `symbol` | `'⬢ '` | The symbol used before displaying the project name. | +| `style` | `'blu grassetto'` | Lo stile per il modulo. | | `disabled` | `false` | Disables the `meson` module. | ### Variables @@ -2305,9 +2433,9 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. [meson] disabled = false -truncation_symbol = "--" -symbol = " " -style = "bold dimmed green" +truncation_symbol = '--' +symbol = ' ' +style = 'bold dimmed green' ``` ## Mercurial Branch @@ -2318,11 +2446,11 @@ The `hg_branch` module shows the active branch of the repo in your current direc | Opzione | Default | Descrizione | | ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | -| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | -| `style` | `"bold purple"` | Lo stile per il modulo. | -| `format` | `"on [$symbol$branch]($style) "` | The format for the module. | +| `symbol` | `' '` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `style` | `'bold purple'` | Lo stile per il modulo. | +| `format` | `'on [$symbol$branch]($style) '` | The format for the module. | | `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | -| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a branch name was truncated. | | `disabled` | `true` | Disables the `hg_branch` module. | ### Variables @@ -2341,9 +2469,9 @@ The `hg_branch` module shows the active branch of the repo in your current direc # ~/.config/starship.toml [hg_branch] -format = "on [🌱 $branch](bold purple)" +format = 'on [🌱 $branch](bold purple)' truncation_length = 4 -truncation_symbol = "" +truncation_symbol = '' ``` ## Nim @@ -2357,16 +2485,16 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | -| `detect_extensions` | `["nim", "nims", "nimble"]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `["nim.cfg"]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | -| `style` | `"bold yellow"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `nim` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'👑 '` | The symbol used before displaying the version of Nim. | +| `detect_extensions` | `['nim', 'nims', 'nimble']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['nim.cfg']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `'bold yellow'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `nim` module. | ### Variables @@ -2384,8 +2512,8 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang # ~/.config/starship.toml [nim] -style = "yellow" -symbol = "🎣 " +style = 'yellow' +symbol = '🎣 ' ``` ## Nix-shell @@ -2397,10 +2525,10 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | Opzione | Default | Descrizione | | ------------ | ---------------------------------------------- | ----------------------------------------------------- | | `format` | `'via [$symbol$state( \($name\))]($style) '` | The format for the module. | -| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | -| `style` | `"bold blue"` | Lo stile per il modulo. | -| `impure_msg` | `"impure"` | A format string shown when the shell is impure. | -| `pure_msg` | `"pure"` | A format string shown when the shell is pure. | +| `symbol` | `'❄️ '` | A format string representing the symbol of nix-shell. | +| `style` | `'bold blue'` | Lo stile per il modulo. | +| `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 @@ -2421,8 +2549,8 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ [nix_shell] disabled = true -impure_msg = "[impure shell](bold red)" -pure_msg = "[pure shell](bold green)" +impure_msg = '[impure shell](bold red)' +pure_msg = '[pure shell](bold green)' format = 'via [☃️ $state( \($name\))](bold blue) ' ``` @@ -2441,13 +2569,13 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | Opzione | Default | Descrizione | | ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `" "` | A format string representing the symbol of Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts", "mts", "cts"]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `["package.json", ".node-version"]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `["node_modules"]` | Quali cartelle dovrebbero attivare questo modulo. | -| `style` | `"bold green"` | Lo stile per il modulo. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string representing the symbol of Node.js. | +| `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['package.json', '.node-version']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `['node_modules']` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `'bold green'` | Lo stile per il modulo. | | `disabled` | `false` | Disables the `nodejs` module. | | `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | @@ -2467,7 +2595,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n # ~/.config/starship.toml [nodejs] -format = "via [🤖 $version](bold green) " +format = 'via [🤖 $version](bold green) ' ``` ## OCaml @@ -2483,18 +2611,18 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam ### Opzioni -| Opzione | Default | Descrizione | -| ------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | -| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | -| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | -| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `["_opam", "esy.lock"]` | Quali cartelle dovrebbero attivare questo modulo. | -| `style` | `"bold yellow"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `ocaml` module. | +| Opzione | Default | Descrizione | +| ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐫 '` | The symbol used before displaying the version of OCaml. | +| `global_switch_indicator` | `''` | The format string used to represent global OPAM switch. | +| `local_switch_indicator` | `'*'` | The format string used to represent local OPAM switch. | +| `detect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['dune', 'dune-project', 'jbuild', 'jbuild-ignore', '.merlin']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `['_opam', 'esy.lock']` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `'bold yellow'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `ocaml` module. | ### Variables @@ -2514,7 +2642,43 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam # ~/.config/starship.toml [ocaml] -format = "via [🐪 $version]($style) " +format = 'via [🐪 $version]($style) ' +``` + +## Open Policy Agent + +The `opa` module shows the currently installed version of the OPA tool. By default the module will be shown if the current directory contains a `.rego` file. + +### Opzioni + +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | +| `detect_extensions` | `['rego']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `'bold blue'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `opa` module. | + +### Variables + +| Variable | Esempio | Descrizione | +| --------- | --------- | ------------------------------------ | +| version | `v0.44.0` | The version of `opa` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Esempio + +```toml +# ~/.config/starship.toml + +[opa] +format = 'via [⛑️ $version](bold red) ' ``` ## OpenStack @@ -2526,8 +2690,8 @@ The `openstack` module shows the current OpenStack cloud and project. The module | Opzione | Default | Descrizione | | ---------- | ----------------------------------------------- | -------------------------------------------------------------- | | `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | -| `style` | `"bold yellow"` | Lo stile per il modulo. | +| `symbol` | `'☁️ '` | The symbol used before displaying the current OpenStack cloud. | +| `style` | `'bold yellow'` | Lo stile per il modulo. | | `disabled` | `false` | Disables the `openstack` module. | ### Variables @@ -2548,8 +2712,105 @@ The `openstack` module shows the current OpenStack cloud and project. The module [openstack] format = 'on [$symbol$cloud(\($project\))]($style) ' -style = "bold yellow" -symbol = "☁️ " +style = 'bold yellow' +symbol = '☁️ ' +``` + +## OS + +The `os` module shows the current operating system. OS information is detected via the [os_info](https://lib.rs/crates/os_info) crate. + +::: warning + +The [os_info](https://lib.rs/crates/os_info) crate used by this module is known to be inaccurate on some systems. + +::: + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Opzioni + +| Opzione | Default | Descrizione | +| ---------- | --------------------- | ------------------------------------------------------ | +| `format` | `"[$symbol]($style)"` | The format for the module. | +| `style` | `"bold white"` | Lo stile per il modulo. | +| `disabled` | `true` | Disables the `os` module. | +| `symbols` | | A table that maps each operating system to its symbol. | + +`symbols` allows you to define arbitrary symbols to display for each operating system type. Operating system types not defined by your configuration use the default symbols table below. All operating systems currently supported by the module are listed below. If you would like an operating system to be added, feel free to open a [feature request](https://github.com/starship/starship/issues/new/choose). + +```toml +# This is the default symbols table. +[os.symbols] +Alpine = "🏔️ " +Amazon = "🙂 " +Android = "🤖 " +Arch = "🎗️ " +CentOS = "💠 " +Debian = "🌀 " +DragonFly = "🐉 " +Emscripten = "🔗 " +EndeavourOS = "🚀 " +Fedora = "🎩 " +FreeBSD = "😈 " +Garuda = "🦅 " +Gentoo = "🗜️ " +HardenedBSD = "🛡️ " +Illumos = "🐦 " +Linux = "🐧 " +Macos = "🍎 " +Manjaro = "🥭 " +Mariner = "🌊 " +MidnightBSD = "🌘 " +Mint = "🌿 " +NetBSD = "🚩 " +NixOS = "❄️ " +OpenBSD = "🐡 " +openSUSE = "🦎 " +OracleLinux = "🦴 " +Pop = "🍭 " +Raspbian = "🍓 " +Redhat = "🎩 " +RedHatEnterprise = "🎩 " +Redox = "🧪 " +Solus = "⛵ " +SUSE = "🦎 " +Ubuntu = "🎯 " +Unknown = "❓ " +Windows = "🪟 " +``` + +### Variables + +| Variable | Esempio | Descrizione | +| --------- | ------------ | ------------------------------------------------------------------ | +| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | +| name | `Arch Linux` | The current operating system name | +| type | `Arch` | The current operating system type | +| codename | | The current operating system codename, if applicable | +| edition | | The current operating system edition, if applicable | +| version | | The current operating system version, if applicable | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Esempio + +```toml +# ~/.config/starship.toml + +[os] +format = "on [($name )]($style)" +style = "bold blue" +disabled = false + +[os.symbols] +Windows = " " +Arch = "Arch is the best! " ``` ## Package Version @@ -2578,14 +2839,14 @@ The `package` module is shown when the current directory is the repository for a ### Opzioni -| Opzione | Default | Descrizione | -| ----------------- | --------------------------------- | -------------------------------------------------------------------------------------------- | -| `format` | `"is [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `style` | `"bold 208"` | Lo stile per il modulo. | -| `display_private` | `false` | Abilita la visualizzazione della versione per i pacchetti contrassegnati come privati. | -| `disabled` | `false` | Disabilita il modulo `package`. | +| Opzione | Default | Descrizione | +| ----------------- | --------------------------------- | ------------------------------------------------------------------------------------------- | +| `format` | `'is [$symbol$version]($style) '` | The format for the module. | +| `symbol` | `'📦 '` | The symbol used before displaying the version the package. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold 208'` | Lo stile per il modulo. | +| `display_private` | `false` | Abilita la visualizzazione della versione per i pacchetti contrassegnati come privati. | +| `disabled` | `false` | Disabilita il modulo `package`. | ### Variables @@ -2603,7 +2864,7 @@ The `package` module is shown when the current directory is the repository for a # ~/.config/starship.toml [package] -format = "via [🎁 $version](208 bold) " +format = 'via [🎁 $version](208 bold) ' ``` ## Perl @@ -2618,16 +2879,16 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | -| `detect_extensions` | `["pl", "pm", "pod"]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | -| `style` | `"bold 149"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `perl` module. | +| Opzione | Default | Descrizione | +| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | +| `detect_extensions` | `['pl', 'pm', 'pod']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `'bold 149'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `perl` module. | ### Variables @@ -2643,7 +2904,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe # ~/.config/starship.toml [perl] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## PHP @@ -2656,16 +2917,16 @@ The `php` module shows the currently installed version of [PHP](https://www.php. ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | -| `detect_extensions` | `["php"]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `["composer.json", ".php-version"]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | -| `style` | `"147 bold"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `php` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐘 '` | The symbol used before displaying the version of PHP. | +| `detect_extensions` | `['php']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['composer.json', '.php-version']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `'147 bold'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `php` module. | ### Variables @@ -2683,7 +2944,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. # ~/.config/starship.toml [php] -format = "via [🔹 $version](147 bold) " +format = 'via [🔹 $version](147 bold) ' ``` ## Pulumi @@ -2703,14 +2964,14 @@ By default the module will be shown if any of the following conditions are met: ### Opzioni -| Opzione | Default | Descrizione | -| ---------------- | -------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `" "` | A format string shown before the Pulumi stack. | -| `style` | `"bold 5"` | Lo stile per il modulo. | -| `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | -| `disabled` | `false` | Disables the `pulumi` module. | +| Opzione | Default | Descrizione | +| ---------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($username@)$stack]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string shown before the Pulumi stack. | +| `style` | `'bold 5'` | Lo stile per il modulo. | +| `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | +| `disabled` | `false` | Disables the `pulumi` module. | ### Variables @@ -2732,7 +2993,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [pulumi] -format = "[🛥 ($version )$stack]($style) " +format = '[🛥 ($version )$stack]($style) ' ``` #### Without Pulumi version @@ -2740,8 +3001,8 @@ format = "[🛥 ($version )$stack]($style) " ```toml # ~/.config/starship.toml [pulumi] -symbol = "🛥 " -format = "[$symbol$stack]($style) " +symbol = '🛥 ' +format = '[$symbol$stack]($style) ' ``` ## PureScript @@ -2753,16 +3014,16 @@ The `purescript` module shows the currently installed version of [PureScript](ht ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | -| `detect_extensions` | `["purs"]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `["spago.dhall"]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | -| `style` | `"bold white"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `purescript` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'<=> '` | The symbol used before displaying the version of PureScript. | +| `detect_extensions` | `['purs']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['spago.dhall']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `'bold white'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -2780,7 +3041,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht # ~/.config/starship.toml [purescript] -format = "via [$symbol$version](bold white)" +format = 'via [$symbol$version](bold white)' ``` ## Python @@ -2803,25 +3064,25 @@ By default the module will be shown if any of the following conditions are met: ### Opzioni -| Opzione | Default | Descrizione | -| -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | Lo stile per il modulo. | -| `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | -| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `detect_extensions` | `["py"]` | Quali estensioni dovrebbero attivare questo modulo | -| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Quali nomi di file dovrebbero attivare questo modulo | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo | -| `disabled` | `false` | Disables the `python` module. | +| Opzione | Default | Descrizione | +| -------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐍 '` | A format string representing the symbol of Python | +| `style` | `'yellow bold'` | Lo stile per il modulo. | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | +| `detect_extensions` | `['py']` | Quali estensioni dovrebbero attivare questo modulo | +| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Quali nomi di file dovrebbero attivare questo modulo | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo | +| `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. +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. ::: @@ -2829,11 +3090,11 @@ The default values and order for `python_binary` was chosen to first identify th | Variable | Esempio | Descrizione | | ------------ | --------------- | ------------------------------------------ | -| 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 | +| 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 | ### Esempio @@ -2841,7 +3102,7 @@ The default values and order for `python_binary` was chosen to first identify th # ~/.config/starship.toml [python] -symbol = "👾 " +symbol = '👾 ' pyenv_version_name = true ``` @@ -2850,7 +3111,7 @@ pyenv_version_name = true [python] # Only use the `python3` binary to get the version. -python_binary = "python3" +python_binary = 'python3' ``` ```toml @@ -2869,7 +3130,7 @@ detect_extensions = [] # # Note this will only work when the venv is inside the project and it will only # work in the directory that contains the venv dir but maybe this is ok? -python_binary = ["./venv/bin/python", "python", "python3", "python2"] +python_binary = ['./venv/bin/python', 'python', 'python3', 'python2'] ``` ## R @@ -2886,16 +3147,16 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"📐"` | A format string representing the symbol of R. | -| `style` | `"blu grassetto"` | Lo stile per il modulo. | -| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Quali estensioni dovrebbero attivare questo modulo | -| `detect_files` | `[".Rprofile"]` | Quali nomi di file dovrebbero attivare questo modulo | -| `detect_folders` | `[".Rproj.user"]` | Quali cartelle dovrebbero attivare questo modulo | -| `disabled` | `false` | Disables the `r` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'📐'` | A format string representing the symbol of R. | +| `style` | `'blu grassetto'` | Lo stile per il modulo. | +| `detect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | Quali estensioni dovrebbero attivare questo modulo | +| `detect_files` | `['.Rprofile']` | Quali nomi di file dovrebbero attivare questo modulo | +| `detect_folders` | `['.Rproj.user']` | Quali cartelle dovrebbero attivare questo modulo | +| `disabled` | `false` | Disables the `r` module. | ### Variables @@ -2903,7 +3164,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | -------- | ----------------- | ------------------------------------ | | version | `v4.0.5` | The version of `R` | | symbol | | Mirrors the value of option `symbol` | -| style | `"blu grassetto"` | Mirrors the value of option `style` | +| style | `'blu grassetto'` | Mirrors the value of option `style` | ### Esempio @@ -2911,7 +3172,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr # ~/.config/starship.toml [rlang] -format = "with [📐 $version](blue bold) " +format = 'with [📐 $version](blue bold) ' ``` ## Raku @@ -2923,16 +3184,16 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version-$vm_version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"🦋 "` | The symbol used before displaying the version of Raku | -| `detect_extensions` | `["p6", "pm6", "pod6", "raku", "rakumod"]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `["META6.json"]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | -| `style` | `"bold 149"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `raku` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version-$vm_version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦋 '` | The symbol used before displaying the version of Raku | +| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['META6.json']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `'bold 149'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `raku` module. | ### Variables @@ -2949,7 +3210,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra # ~/.config/starship.toml [raku] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## Red @@ -2960,16 +3221,16 @@ By default the `red` module shows the currently installed version of [Red](https ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | -| `detect_extensions` | `["red"]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | -| `style` | `"red bold"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `red` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🔺 '` | A format string representing the symbol of Red. | +| `detect_extensions` | `['red']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `'red bold'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `red` module. | ### Variables @@ -2987,7 +3248,7 @@ By default the `red` module shows the currently installed version of [Red](https # ~/.config/starship.toml [red] -symbol = "🔴 " +symbol = '🔴 ' ``` ## Ruby @@ -3003,17 +3264,17 @@ Starship gets the current Ruby version by running `ruby -v`. ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `detect_extensions` | `["rb"]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `["Gemfile", ".ruby-version"]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | -| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | -| `style` | `"bold red"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `ruby` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💎 '` | A format string representing the symbol of Ruby. | +| `detect_extensions` | `['rb']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['Gemfile', '.ruby-version']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Which environment variables should trigger this module. | +| `style` | `'bold red'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `ruby` module. | ### Variables @@ -3031,7 +3292,7 @@ Starship gets the current Ruby version by running `ruby -v`. # ~/.config/starship.toml [ruby] -symbol = "🔺 " +symbol = '🔺 ' ``` ## Rust @@ -3043,16 +3304,16 @@ By default the `rust` module shows the currently installed version of [Rust](htt ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `detect_extensions` | `["rs"]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `["Cargo.toml"]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | -| `style` | `"bold red"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `rust` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦀 '` | A format string representing the symbol of Rust | +| `detect_extensions` | `['rs']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['Cargo.toml']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `'bold red'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -3072,7 +3333,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt # ~/.config/starship.toml [rust] -format = "via [⚙️ $version](red bold)" +format = 'via [⚙️ $version](red bold)' ``` ## Scala @@ -3085,16 +3346,16 @@ The `scala` module shows the currently installed version of [Scala](https://www. ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ---------------------------------------- | -------------------------------------------------------------------------------------------- | -| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `detect_extensions` | `["sbt", "scala"]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | -| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | -| `style` | `"red dimmed"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `scala` module. | +| Opzione | Default | Descrizione | +| ------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}(${version} )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['sbt', 'scala']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `['.metals']` | Which folders should trigger this modules. | +| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. | +| `style` | `'red dimmed'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `scala` module. | ### Variables @@ -3112,7 +3373,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. # ~/.config/starship.toml [scala] -symbol = "🌟 " +symbol = '🌟 ' ``` ## Shell @@ -3129,19 +3390,19 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Opzione | Default | Descrizione | | ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `"bsh"` | A format string used to represent bash. | -| `fish_indicator` | `"fsh"` | A format string used to represent fish. | -| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. | -| `powershell_indicator` | `"psh"` | A format string used to represent powershell. | -| `ion_indicator` | `"ion"` | A format string used to represent ion. | -| `elvish_indicator` | `"esh"` | A format string used to represent elvish. | -| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. | -| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. | -| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. | -| `nu_indicator` | `"nu"` | A format string used to represent nu. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `"[$indicator]($style) "` | The format for the module. | -| `style` | `"white bold"` | Lo stile per il modulo. | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `style` | `'white bold'` | Lo stile per il modulo. | | `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3159,26 +3420,26 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [shell] -fish_indicator = "" -powershell_indicator = "_" -unknown_indicator = "mystery shell" -style = "cyan bold" +fish_indicator = '' +powershell_indicator = '_' +unknown_indicator = 'mystery shell' +style = 'cyan bold' disabled = false ``` ## SHLVL -The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ('shell level') environment variable, if it is set to a number and meets or exceeds the specified threshold. ### Opzioni | Opzione | Default | Descrizione | | ----------- | ---------------------------- | ------------------------------------------------------------- | | `threshold` | `2` | Display threshold. | -| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. | -| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. | +| `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"` | Lo stile per il modulo. | +| `style` | `'bold yellow'` | Lo stile per il modulo. | | `disabled` | `true` | Disables the `shlvl` module. | ### Variables @@ -3198,7 +3459,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int [shlvl] disabled = false -format = "$shlvl level(s) down" +format = '$shlvl level(s) down' threshold = 3 ``` @@ -3211,8 +3472,8 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | Opzione | Default | Descrizione | | ---------- | -------------------------------- | ------------------------------------------------ | | `format` | `'[$symbol\[$env\]]($style) '` | The format for the module. | -| `symbol` | `""` | A format string displayed before the image name. | -| `style` | `"bold dimmed blue"` | Lo stile per il modulo. | +| `symbol` | `''` | A format string displayed before the image name. | +| `style` | `'bold dimmed blue'` | Lo stile per il modulo. | | `disabled` | `false` | Disables the `singularity` module. | ### Variables @@ -3243,9 +3504,9 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | Opzione | Default | Descrizione | | ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | The number of directories the environment path should be truncated to. `0` means no truncation. Also see the [`directory`](#directory) module. | -| `symbol` | `"🅢 "` | The symbol used before the environment name. | -| `style` | `"bold blue"` | Lo stile per il modulo. | -| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `symbol` | `'🅢 '` | The symbol used before the environment name. | +| `style` | `'bold blue'` | Lo stile per il modulo. | +| `format` | `'via [$symbol$environment]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `spack` module. | ### Variables @@ -3264,7 +3525,7 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat # ~/.config/starship.toml [spack] -format = "[$symbol$environment](dimmed blue) " +format = '[$symbol$environment](dimmed blue) ' ``` ## Status @@ -3281,14 +3542,14 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Opzione | Default | Descrizione | | --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `format` | `"[$symbol$status]($style) "` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `success_symbol` | `""` | The symbol displayed on program success | -| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | -| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | -| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | -| `style` | `"bold red"` | Lo stile per il modulo. | +| `format` | `'[$symbol$status]($style) '` | The format of the module | +| `symbol` | `'❌'` | The symbol displayed on program error | +| `success_symbol` | `''` | The symbol displayed on program success | +| `not_executable_symbol` | `'🚫'` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `'🔍'` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `'🧱'` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `'⚡'` | The symbol displayed on any signal | +| `style` | `'bold red'` | Lo stile per il modulo. | | `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code | | `pipestatus` | `false` | Enable pipestatus reporting | @@ -3320,9 +3581,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [status] -style = "bg:blue" -symbol = "🔴 " -success_symbol = "🟢 SUCCESS" +style = 'bg:blue' +symbol = '🔴 ' +success_symbol = '🟢 SUCCESS' format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false @@ -3342,9 +3603,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Opzione | Default | Descrizione | | --------------- | ------------------------ | ------------------------------------------------------- | -| `format` | `"[as $symbol]($style)"` | The format of the module | -| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached | -| `style` | `"bold blue"` | Lo stile per il modulo. | +| `format` | `'[as $symbol]($style)'` | The format of the module | +| `symbol` | `'🧙 '` | The symbol displayed when credentials are cached | +| `style` | `'bold blue'` | Lo stile per il modulo. | | `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | | `disabled` | `true` | Disables the `sudo` module. | @@ -3363,8 +3624,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [sudo] -style = "bold green" -symbol = "👩‍💻 " +style = 'bold green' +symbol = '👩‍💻 ' disabled = false ``` @@ -3386,16 +3647,16 @@ By default the `swift` module shows the currently installed version of [Swift](h ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `detect_extensions` | `["swift"]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `["Package.swift"]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | -| `style` | `"bold 202"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `swift` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐦 '` | A format string representing the symbol of Swift | +| `detect_extensions` | `['swift']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['Package.swift']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `'bold 202'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -3413,7 +3674,7 @@ By default the `swift` module shows the currently installed version of [Swift](h # ~/.config/starship.toml [swift] -format = "via [🏎 $version](red bold)" +format = 'via [🏎 $version](red bold)' ``` ## Terraform @@ -3433,16 +3694,16 @@ By default the module will be shown if any of the following conditions are met: ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[".terraform"]` | Quali cartelle dovrebbero attivare questo modulo. | -| `style` | `"bold 105"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `terraform` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol$workspace]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💠'` | A format string shown before the terraform workspace. | +| `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `['.terraform']` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `'bold 105'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `terraform` module. | ### Variables @@ -3463,7 +3724,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [terraform] -format = "[🏎💨 $version$workspace]($style) " +format = '[🏎💨 $version$workspace]($style) ' ``` #### Without Terraform version @@ -3472,7 +3733,7 @@ format = "[🏎💨 $version$workspace]($style) " # ~/.config/starship.toml [terraform] -format = "[🏎💨 $workspace]($style) " +format = '[🏎💨 $workspace]($style) ' ``` ## Ora @@ -3489,15 +3750,15 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Opzione | Default | Descrizione | | ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | The format string for the module. | +| `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. | +| `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 | +| `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. +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 @@ -3516,9 +3777,9 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de [time] disabled = false format = '🕙[\[ $time \]]($style) ' -time_format = "%T" -utc_time_offset = "-5" -time_range = "10:00:00-14:00:00" +time_format = '%T' +utc_time_offset = '-5' +time_range = '10:00:00-14:00:00' ``` ## Username @@ -3540,9 +3801,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Opzione | Default | Descrizione | | ------------- | ----------------------- | ------------------------------------------- | -| `style_root` | `"bold red"` | The style used when the user is root/admin. | -| `style_user` | `"bold yellow"` | The style used for non-root users. | -| `format` | `"[$user]($style) in "` | The format for the module. | +| `style_root` | `'bold red'` | The style used when the user is root/admin. | +| `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. | @@ -3550,8 +3811,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Variable | Esempio | Descrizione | | -------- | ------------ | ------------------------------------------------------------------------------------------- | -| `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. | +| `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. | ### Esempio @@ -3559,9 +3820,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` # ~/.config/starship.toml [username] -style_user = "white bold" -style_root = "black bold" -format = "user: [$user]($style) " +style_user = 'white bold' +style_root = 'black bold' +format = 'user: [$user]($style) ' disabled = false show_always = true ``` @@ -3574,16 +3835,16 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | -| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `["Vagrantfile"]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | -| `style` | `"cyan bold"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `vagrant` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'⍱ '` | A format string representing the symbol of Vagrant. | +| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['Vagrantfile']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `'cyan bold'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `vagrant` module. | ### Variables @@ -3601,7 +3862,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// # ~/.config/starship.toml [vagrant] -format = "via [⍱ $version](bold white) " +format = 'via [⍱ $version](bold white) ' ``` ## V @@ -3613,16 +3874,16 @@ The `vlang` module shows you your currently installed version of [V](https://vla ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | -------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"V "` | Una stringa di formato che rappresenta il simbolo di V | -| `detect_extensions` | `["v"]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | -| `style` | `"blu grassetto"` | Lo stile per il modulo. | -| `disabled` | `false` | Disabilita il modulo `vlang`. | +| Opzione | Default | Descrizione | +| ------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'V '` | Una stringa di formato che rappresenta il simbolo di V | +| `detect_extensions` | `['v']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `'blu grassetto'` | Lo stile per il modulo. | +| `disabled` | `false` | Disabilita il modulo `vlang`. | ### Variables @@ -3637,7 +3898,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla ```toml # ~/.config/starship.toml [vlang] -format = "via [V $version](blue bold) " +format = 'via [V $version](blue bold) ' ``` ## VCSH @@ -3648,9 +3909,9 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | Opzione | Default | Descrizione | | ---------- | -------------------------------- | ------------------------------------------------------ | -| `symbol` | | The symbol used before displaying the repository name. | -| `style` | `"bold yellow"` | Lo stile per il modulo. | -| `format` | `"vcsh [$symbol$repo]($style) "` | The format for the module. | +| `symbol` | `''` | The symbol used before displaying the repository name. | +| `style` | `'bold yellow'` | Lo stile per il modulo. | +| `format` | `'vcsh [$symbol$repo]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `vcsh` module. | ### Variables @@ -3669,7 +3930,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v # ~/.config/starship.toml [vcsh] -format = "[🆅 $repo](bold blue) " +format = '[🆅 $repo](bold blue) ' ``` ## Zig @@ -3680,16 +3941,16 @@ By default the the `zig` module shows the currently installed version of [Zig](h ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `zig` module. | -| `detect_extensions` | `["zig"]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'↯ '` | The symbol used before displaying the version of Zig. | +| `style` | `'bold yellow'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `zig` module. | +| `detect_extensions` | `['zig']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | ### Variables @@ -3707,7 +3968,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h # ~/.config/starship.toml [zig] -symbol = "⚡️ " +symbol = '⚡️ ' ``` ## Custom commands @@ -3752,16 +4013,16 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | Opzione | Default | Descrizione | | ------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `command` | `''` | The command whose output should be printed. The command will be passed on stdin to the shell. | | `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `descrizione` | `""` | The description of the module that is shown when running `starship explain`. | +| `descrizione` | `''` | The description of the module that is shown when running `starship explain`. | | `detect_files` | `[]` | The files that will be searched in the working directory for a match. | | `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. | | `detect_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"` | Lo stile per il modulo. | -| `format` | `"[$symbol($output )]($style)"` | The format for the module. | +| `symbol` | `''` | The symbol used before displaying the command output. | +| `style` | `'bold green'` | Lo stile per il modulo. | +| `format` | `'[$symbol($output )]($style)'` | The format for the module. | | `disabled` | `false` | Disables this `custom` module. | | `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | | `use_stdin` | | An optional boolean value that overrides whether commands should be forwarded to the shell via the standard input or as an argument. If unset standard input is used by default, unless the shell does not support it (cmd, nushell). Setting this disables shell-specific argument handling. | @@ -3784,14 +4045,14 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt - 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. +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 -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. ```toml -shell = ["pwsh", "-Command", "-"] +shell = ['pwsh', '-Command', '-'] ``` ::: warning Make sure your custom shell configuration exits gracefully @@ -3812,19 +4073,19 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -detect_files = ["foo"] # can specify filters but wildcards are not supported -when = """ test "$HOME" = "$PWD" """ -format = " transcending [$output]($style)" +command = 'echo foo' # shows output of command +detect_files = ['foo'] # can specify filters but wildcards are not supported +when = ''' test "$HOME" = "$PWD" ''' +format = ' transcending [$output]($style)' [custom.time] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command', '-'] [custom.time-as-arg] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command'] use_stdin = false ``` diff --git a/docs/it-IT/guide/README.md b/docs/it-IT/guide/README.md index 5043757a..3bb28a83 100644 --- a/docs/it-IT/guide/README.md +++ b/docs/it-IT/guide/README.md @@ -219,7 +219,6 @@ Alternatively, install Starship using any of the following package managers: | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | | Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | -| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | @@ -417,6 +416,14 @@ Ti invito di controllare questi lavori precedenti che hanno contribuito a ispira - **[reujab/silver](https://github.com/reujab/silver)** – Un prompt multi-shell personalizzabile come powerline con icone. +## ❤️ Sponsors + +Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website. + +**Supporter Tier** + +- [Dimension](https://dimension.dev/) +


Starship rocket icon diff --git a/docs/it-IT/presets/README.md b/docs/it-IT/presets/README.md index b09df057..2b215073 100644 --- a/docs/it-IT/presets/README.md +++ b/docs/it-IT/presets/README.md @@ -10,6 +10,14 @@ This preset changes the symbols for each module to use Nerd Font symbols. [![Screenshot dei preset di Nerd Font Symbols](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font) +## [No Nerd Fonts](./no-nerd-font.md) + +This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt. + +::: tip This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). ::: + +[Click to view No Nerd Font preset](./no-nerd-font) + ## [Bracketed Segments](./bracketed-segments.md) This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.). @@ -28,6 +36,12 @@ This preset hides the version of language runtimes. If you work in containers or [![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes) +## [No Empty Icons](./no-empty-icons.md) + +This preset does not show icons if the toolset is not found. + +[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Click to view No Runtime Versions preset")](./no-empty-icons.md) + ## [Pure Prompt](./pure-preset.md) This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). @@ -39,3 +53,9 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship. [![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png "Click to view Pure Prompt preset")](./pastel-powerline) + +## [Tokyo Night](./tokyo-night.md) + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) diff --git a/docs/it-IT/presets/no-empty-icons.md b/docs/it-IT/presets/no-empty-icons.md new file mode 100644 index 00000000..bdcb67d1 --- /dev/null +++ b/docs/it-IT/presets/no-empty-icons.md @@ -0,0 +1,17 @@ +[Return to Presets](./README.md#no-empty-icons) + +# No Empty Icons Preset + +If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. + +![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) + +### Configurazione + +```sh +starship preset no-empty-icons > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-empty-icons.toml) + +<<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/it-IT/presets/no-nerd-font.md b/docs/it-IT/presets/no-nerd-font.md new file mode 100644 index 00000000..5656e8e1 --- /dev/null +++ b/docs/it-IT/presets/no-nerd-font.md @@ -0,0 +1,19 @@ +[Return to Presets](./README.md#no-nerd-fonts) + +# No Nerd Fonts Preset + +This preset restricts the use of symbols to those from emoji and powerline sets. + +This means that even without a Nerd Font installed, you should be able to view all module symbols. + +This preset will become the default preset in a future release of starship. + +### Configurazione + +```sh +starship preset no-nerd-font > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-nerd-font.toml) + +<<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/it-IT/presets/tokyo-night.md b/docs/it-IT/presets/tokyo-night.md new file mode 100644 index 00000000..f405fa7f --- /dev/null +++ b/docs/it-IT/presets/tokyo-night.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#pastel-powerline) + +# Tokyo Night Preset + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) + +### Prerequisiti + +- Un [ Nerd Font ](https://www.nerdfonts.com/) installato e abilitato nel tuo terminale + +### Configurazione + +```sh +starship preset tokyo-night > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/tokyo-night.toml) + +<<< @/.vuepress/public/presets/toml/tokyo-night.toml diff --git a/docs/ja-JP/README.md b/docs/ja-JP/README.md index d75cc573..9fd27087 100644 --- a/docs/ja-JP/README.md +++ b/docs/ja-JP/README.md @@ -4,14 +4,14 @@ heroImage: /logo.svg heroText: tagline: シェル用の最小限の、非常に高速で、無限にカスタマイズ可能なプロンプトです! actionText: Get Started → -actionLink: ./guide/ +actionLink: ./ja-JP/guide/ features: - title: 互換性優先 details: 一般的なほとんどのOSの一般的なほとんどのシェル上で動作します。 あらゆるところで使用してください! - - title: Rust 製 - details: Rust の最高レベルの速度と安全性を用いることで、可能な限り高速かつ信頼性を高くしています。 + title: Rust製 + details: Rustの最高レベルの速度と安全性を用いることで、可能な限り高速かつ信頼性を高くしています。 - title: カスタマイズ可能 details: それぞれの細かい点は好みにカスタマイズが出来るため、ミニマルにも多機能にも好きなようにプロンプトを設定することができます。 diff --git a/docs/ja-JP/advanced-config/README.md b/docs/ja-JP/advanced-config/README.md index 81ced6a9..4669b10b 100644 --- a/docs/ja-JP/advanced-config/README.md +++ b/docs/ja-JP/advanced-config/README.md @@ -205,7 +205,9 @@ Invoke-Expression (&starship init powershell) 注意: 右プロンプトは入力の場所に続く単一の行です。 To right align modules above the input line in a multi-line prompt, see the [`fill` module](/config/#fill). -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. + +Note: Nushell 0.71.0 or later is required ### 設定例 @@ -280,5 +282,5 @@ continuation_prompt = "▶▶" Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: - Many terminals disable support for `blink` by default -- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564). +- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). - `strikethrough` is not supported by the default macOS Terminal.app diff --git a/docs/ja-JP/config/README.md b/docs/ja-JP/config/README.md index 05d7b11c..05df16c0 100644 --- a/docs/ja-JP/config/README.md +++ b/docs/ja-JP/config/README.md @@ -9,20 +9,23 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Starshipのすべての設定は、この[TOML](https://github.com/toml-lang/toml)ファイルで行われます。 ```toml -# エディターの補完を設定スキーマに合わせて取得 +# Get editor completions based on the config schema "$schema" = 'https://starship.rs/config-schema.json' -# シェルのプロンプトの間に空行を挿入する +# Inserts a blank line between shell prompts add_newline = true -# 記号"❯"を記号"➜"に置き換える -[character] # 編集するモジュールの名前は"character" -success_symbol = "[➜](bold green)" # "success_symbol"を記号"➜"で"bold green"(太字の緑色)にセット -# パッケージモジュールを無効化することでプロンプトを完全に非表示にする +# 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 ``` +### Config File Location + `STARSHIP_CONFIG` 環境変数を使用することによって、デフォルトの設定ファイルの場所を変更できます。 ```sh @@ -69,6 +72,62 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') 慣例により、ほとんどのモジュールにはデフォルトの端末色の接頭辞(「nodejs」の`via` など)と接尾辞として空のスペースがあります。 +### Strings + +In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. + +The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. + +| Symbol | Type | Notes | +| ------ | ------------------------- | ------------------------------------------------------ | +| `'` | literal string | less escaping | +| `"` | string | more escaping | +| `'''` | multi-line literal string | less escaping | +| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | + +例: + +```toml +# literal string +format = '☺\☻ ' + +# regular string +format = "☺\\☻ " + +# escaping Starship symbols +format = '\[\$\] ' +``` + +When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: + +```toml +# with literal string +format = ''' + +\$''' + +# with multiline basic string +format = """ + +\\$""" + +# with basic string +format = "\n\\$" +``` + +In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. + +```toml +format = """ +line1\ +line1\ +line1 +line2\ +line2\ +line2 +""" +``` + ### 文字列のフォーマット 文字列の書式は、モジュールがすべての変数を出力する書式です。 ほとんどのモジュールには、モジュールの表示形式を設定する `format` というエントリがあります。 テキスト、変数、およびテキストグループをフォーマット文字列で使用できます。 @@ -79,9 +138,9 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') 例: -- `$version` は、`version` という名前の変数を持つフォーマット文字列です。 -- `$git_branch$git_commit` は `git_branch` と `git_commit` という2つの変数を持つフォーマット文字列です。 -- `$git_branch $git_commit` には空白で区切られた 2 つの変数があります。 +- `'$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. #### テキストグループ @@ -93,22 +152,22 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') 例: -- `[on](red bold)` は文字列 `on` に太字のテキストを赤色で表示します。 -- `[⌘ $version](bold green)` は `⌘` 記号とその後に続く変数 `version` の値を、太字の緑色で表示します。 -- `[a [b](red) c](green)` は `a b c` を `b` だけ赤色に表示し、 `a` と `c` を緑色に表示します。 +- `'[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. #### スタイルの設定 Starshipのほとんどのモジュールでは、表示スタイルを設定できます。 これは、設定を指定する文字列であるエントリ(`style`)で行われます。 スタイル文字列の例とその機能を次に示します。 完全な構文の詳細については、詳細は [高度な設定](/advanced-config/)を参照してください 。 -- `"fg:green bg:blue"` は、青色の背景に緑色のテキストを設定します -- `"bg:blue fg:bright-green"` は、青色の背景に明るい緑色のテキストを設定します -- `"bold fg:27"` は、 [ANSIカラー](https://i.stack.imgur.com/KTSQa.png) 27の太字テキストを設定します -- `"underline bg:#bf5700"` は、焦げたオレンジ色の背景に下線付きのテキストを設定します -- `"bold italic fg:purple"`は、紫色の太字斜体のテキストを設定します -- `""` はすべてのスタイルを明示的に無効にします +- `'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 -スタイリングがどのように見えるかは、端末エミュレータによって制御されることに注意してください。 たとえば、一部の端末エミュレータはテキストを太字にする代わりに色を明るくします。また、一部のカラーテーマは通常の色と明るい色と同じ値を使用します。また、斜体のテキストを取得するには、端末で斜体をサポートする必要があります。スタイリングがどのように見えるかは、端末エミュレータによって制御されることに注意してください。たとえば、一部の端末エミュレータはテキストを太字にする代わりに色を明るくします。また、一部のカラーテーマは通常の色と明るい色と同じ値を使用します。 また、斜体のテキストを取得するには、端末で斜体をサポートする必要があります。 +スタイリングがどのように見えるかは、端末エミュレータによって制御されることに注意してください。 たとえば、一部の端末エミュレータはテキストを太字にする代わりに色を明るくします。また、一部のカラーテーマは通常の色と明るい色と同じ値を使用します。 また、斜体のテキストを取得するには、端末で斜体をサポートする必要があります。 #### 条件付きフォーマット設定 @@ -116,43 +175,20 @@ Starshipのほとんどのモジュールでは、表示スタイルを設定で 例: -- `(@$region)` は`region`が`None`または空だった場合表示されませんが、値がある場合は`@` に続いてregionの値が表示されます。 -- `(some text)` は括弧の中に変数がないので、常に何も表示しません。 -- `$all` が `\[$a$b\]` のショートカットである時、 `$a` と `$b` が両方とも `None` である場合に限り、`($all)` は何も表示しません。 これは `(\[$a$b\] )` と同じ動作をします。 - -#### 特殊文字 - -次の記号はフォーマット文字列で特殊な用途を持っているため、エスケープする必要があります。: `$ \ [ ] ( )`. - -TOMLには、 [基本文字列とリテラル文字列](https://toml.io/en/v1.0.0#string)の両方があることに注意してください。 設定では、リテラル文字列(シングルクォートで囲まれた文字列)を使用することをお勧めします。基本文字列(ダブルクォートで囲まれた文字列)を使用したい場合は、バックスラッシュ自体をエスケープする必要があります。(例: `\\`を使用する) - -例えば、新しい行に `$` 記号を表示したい場合、以下の `format` の設定が等価です。 - -```toml -# 基本文字列と -format = "\n\\$" - -# 複数行の基本文字列と -format = """ - -\\$""" - -# リテラル文字列と -format = ''' - -\$''' -``` +- `'(@$region)'` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. +- `'(some text)'` will always show nothing since there are no variables wrapped in the braces. +- When `$combined` is a shortcut for `\[$a$b\]`, `'($combined)'` will show nothing only if `$a` and `$b` are both `None`. This works the same as `'(\[$a$b\] )'`. ### Negative matching -Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched. +Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading '!' character. The presence of _any_ negative indicator in the directory will result in the module not being matched. Extensions are matched against both the characters after the last dot in a filename, and the characters after the first dot in a filename. For example, `foo.bar.tar.gz` will be matched against `bar.tar.gz` and `gz` in the `detect_extensions` variable. Files whose name begins with a dot are not considered to have extensions at all. To see how this works in practice, you could match TypeScript but not MPEG Transport Stream files thus: ```toml -detect_extensions = ["ts", "!video.ts", "!audio.ts"] +detect_extensions = ['ts', '!video.ts', '!audio.ts'] ``` ## プロンプト @@ -164,11 +200,11 @@ detect_extensions = ["ts", "!video.ts", "!audio.ts"] | オプション | デフォルト | 説明 | | ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `format` | [link](#default-prompt-format) | プロンプトの形式を設定します。 | -| `right_format` | `""` | [右プロンプトの有効化](/advanced-config/#enable-right-prompt)を参照してください。 | +| `right_format` | `''` | [右プロンプトの有効化](/advanced-config/#enable-right-prompt)を参照してください。 | | `scan_timeout` | `30` | ファイルをスキャンする際のタイムアウト時間 (milliseconds) です。 | | `command_timeout` | `500` | Starshipによって実行されたコマンドのタイムアウト時間 (milliseconds) です。 | | `add_newline` | `true` | シェルプロンプトの間に空行を挿入します。 | -| `palette` | `""` | Sets which color palette from `palettes` to use. | +| `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | ### 設定例 @@ -176,28 +212,27 @@ detect_extensions = ["ts", "!video.ts", "!audio.ts"] ```toml # ~/.config/starship.toml -# カスタムフォーマットを利用します -format = """ +# Use custom format +format = ''' [┌───────────────────>](bold green) [│](bold green)$directory$rust$package -[└─>](bold green) """ - -# starshipが現在のディレクトリ下のファイルをチェックするまで10ミリ秒待ちます +[└─>](bold green) ''' +# Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 # Disable the blank line at the start of the prompt add_newline = false -# Set "foo" as custom color palette -palette = "foo" +# Set 'foo' as custom color palette +palette = 'foo' # Define custom colors [palettes.foo] # Overwrite existing color -blue = "21" +blue = '21' # Define new color -mustard = "#af8700" +mustard = '#af8700' ``` ### デフォルトのプロンプトフォーマット @@ -205,7 +240,7 @@ mustard = "#af8700" デフォルトの `format` は、空または `format` が指定されていない場合、プロンプトのフォーマットを定義するために使用されます。 デフォルトは次のとおりです。 ```toml -format = "$all" +format = '$all' # Which is equivalent to format = """ @@ -236,7 +271,9 @@ $elixir\ $elm\ $erlang\ $golang\ +$guix_shell\ $haskell\ +$haxe\ $helm\ $java\ $julia\ @@ -245,6 +282,7 @@ $lua\ $nim\ $nodejs\ $ocaml\ +$opa\ $perl\ $php\ $pulumi\ @@ -281,6 +319,7 @@ $jobs\ $battery\ $time\ $status\ +$os\ $container\ $shell\ $character""" @@ -289,8 +328,8 @@ $character""" デフォルトのフォーマットを拡張したいだけなら、`$all`を使用できます。 フォーマットに明示的に追加したモジュールは重複しません。 例: ```toml -# ディレクトリを2行目に移動 -format = "$all$directory$character" +# Move the directory to the second line +format = '$all$directory$character' ``` ## AWS @@ -305,28 +344,30 @@ format = "$all$directory$character" [AWSume](https://awsu.me)を使う場合、環境変数`AWSUME_PROFILE`からプロファイルが、環境変数`AWSUME_EXPIRATION`から資格情報の有効期限が読み込まれます。 +When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. + ### オプション | オプション | デフォルト | 説明 | | ------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | module のフォーマットです。 | -| `symbol` | `"☁️ "` | 現在のAWSプロファイルを表示する前に表示される記号です。 | -| `region_aliases` | | AWS名に加えて表示するリージョンのエイリアスです。 | -| `profile_aliases` | | AWS名に加えて表示するプロファイルのエイリアスです。 | -| `style` | `"bold yellow"` | モジュールのスタイルです。 | +| `symbol` | `'☁️ '` | 現在のAWSプロファイルを表示する前に表示される記号です。 | +| `region_aliases` | `{}` | AWS名に加えて表示するリージョンのエイリアスです。 | +| `profile_aliases` | `{}` | AWS名に加えて表示するプロファイルのエイリアスです。 | +| `style` | `'bold yellow'` | モジュールのスタイルです。 | | `expiration_symbol` | `X` | この記号は一時的な資格情報が有効期限切れの場合に表示されます。 | | `disabled` | `false` | `aws`モジュールを無効にします。 | | `force_display` | `false` | `true`の場合、`credentials`、`credential_process`または`sso_start_url`が設定されていない場合でも情報を表示します。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | ---------------- | ---------------------- | -| region | `ap-northeast-1` | 現在のAWSリージョン | -| profile | `astronauts` | 現在のAWSプロファイル | -| duration | `2h27m20s` | 一時的な資格情報の有効期限 | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | ---------------- | ----------------------- | +| region | `ap-northeast-1` | 現在のAWSリージョン | +| profile | `astronauts` | 現在のAWSプロファイル | +| duration | `2h27m20s` | 一時的な資格情報の有効期限 | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -335,13 +376,15 @@ format = "$all$directory$character" #### すべてを表示 ```toml +# ~/.config/starship.toml + [aws] format = 'on [$symbol($profile )(\($region\) )]($style)' -style = "bold blue" -symbol = "🅰 " +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' [aws.profile_aliases] CompanyGroupFrobozzOnCallAccess = 'Frobozz' ``` @@ -352,12 +395,12 @@ CompanyGroupFrobozzOnCallAccess = 'Frobozz' # ~/.config/starship.toml [aws] -format = "on [$symbol$region]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$region]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' ``` #### プロファイルを表示 @@ -366,34 +409,48 @@ us-east-1 = "va" # ~/.config/starship.toml [aws] -format = "on [$symbol$profile]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$profile]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.profile_aliases] Enterprise_Naming_Scheme-voidstars = 'void**' ``` ## Azure -`azure` モジュールは、現在のAzureサブスクリプションを表示します。 これは、 `~/.azure/azureProfile.json` ファイルで定義されているデフォルトのサブスクリプションの名前の表示に基づいています。 +`azure` モジュールは、現在のAzureサブスクリプションを表示します。 これは、 `~/.azure/azureProfile.json` ファイルで定義されているデフォルトのサブスクリプション名またはユーザー名の表示に基づいています。 ### オプション | 変数 | デフォルト | 説明 | | ---------- | ---------------------------------------- | ----------------------- | -| `format` | `"on [$symbol($subscription)]($style) "` | Azure module のフォーマットです。 | -| `symbol` | `"ﴃ "` | フォーマットで使用される記号です。 | -| `style` | `"blue bold"` | フォーマットで使用されるスタイルです。 | +| `format` | `'on [$symbol($subscription)]($style) '` | Azure module のフォーマットです。 | +| `symbol` | `'ﴃ '` | フォーマットで使用される記号です。 | +| `style` | `'blue bold'` | フォーマットで使用されるスタイルです。 | | `disabled` | `true` | `azure`モジュールを無効にします。 | ### 設定例 +#### サブスクリプション名を表示 + ```toml # ~/.config/starship.toml [azure] disabled = false -format = "on [$symbol($subscription)]($style) " +format = 'on [$symbol($subscription)]($style) ' +symbol = 'ﴃ ' +style = 'blue bold' +``` + +#### ユーザー名を表示 + +```toml +# ~/.config/starship.toml + +[azure] +disabled = false +format = "on [$symbol($username)]($style) " symbol = "ﴃ " style = "blue bold" ``` @@ -406,12 +463,12 @@ style = "blue bold" | オプション | デフォルト | 説明 | | -------------------- | --------------------------------- | ------------------------- | -| `full_symbol` | `" "` | バッテリーが満タンのときに表示される記号です。 | -| `charging_symbol` | `" "` | バッテリーの充電中に表示される記号です。 | -| `discharging_symbol` | `" "` | バッテリーが放電しているときに表示される記号です。 | -| `unknown_symbol` | `" "` | バッテリー状態が不明なときに表示される記号です。 | -| `empty_symbol` | `" "` | バッテリーが空のときに表示される記号です。 | -| `format` | `"[$symbol$percentage]($style) "` | moduleのフォーマットです。 | +| `full_symbol` | `' '` | バッテリーが満タンのときに表示される記号です。 | +| `charging_symbol` | `' '` | バッテリーの充電中に表示される記号です。 | +| `discharging_symbol` | `' '` | バッテリーが放電しているときに表示される記号です。 | +| `unknown_symbol` | `' '` | バッテリー状態が不明なときに表示される記号です。 | +| `empty_symbol` | `' '` | バッテリーが空のときに表示される記号です。 | +| `format` | `'[$symbol$percentage]($style) '` | module のフォーマットです。 | | `display` | [link](#battery-display) | モジュールの閾値とスタイルを表示します。 | | `disabled` | `false` | `battery`モジュールを無効にします。 | @@ -421,9 +478,9 @@ style = "blue bold" # ~/.config/starship.toml [battery] -full_symbol = "🔋 " -charging_symbol = "⚡️ " -discharging_symbol = "💀 " +full_symbol = '🔋 ' +charging_symbol = '⚡️ ' +discharging_symbol = '💀 ' ``` ### バッテリーの表示 @@ -433,7 +490,7 @@ discharging_symbol = "💀 " ```toml [[battery.display]] threshold = 10 -style = "bold red" +style = 'bold red' ``` `charging_symbol`と`discharging_symbol`オプションのデフォルト値はそれぞれ`battery`の `charging_symbol`と`discharging_symbol`になります。 @@ -445,23 +502,23 @@ style = "bold red" | オプション | デフォルト | 説明 | | -------------------- | ------------ | -------------------------------------------------------------------------------------- | | `threshold` | `10` | バッテリーが表示される上限です。 | -| `style` | `"red bold"` | displayオプションが使用されている場合のスタイルです。 | +| `style` | `'red bold'` | displayオプションが使用されている場合のスタイルです。 | | `charging_symbol` | | displayオプションが使用されている場合はこののシンボルが表示されます。デフォルトはバッテリーの `charging_symbol` オプションと同じになります。 | | `discharging_symbol` | | displayオプションが使用されている場合はこののシンボルが表示されます。デフォルトはバッテリーの `discharging_symbol` オプションと同じになります。 | #### 設定例 ```toml -[[battery.display]] # "bold red"(太字の赤)でdischarging_symbolをバッテーリー残量が0%から10%の間で表示 +[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% threshold = 10 -style = "bold red" +style = 'bold red' -[[battery.display]] # "bold yellow"(太字の黄)で記号💦をバッテリー残量が10%から30%の間で表示 +[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% threshold = 30 -style = "bold yellow" -discharging_symbol = "💦" +style = 'bold yellow' +discharging_symbol = '💦' -# バッテリー残量が30%を超えると、バッテリーインジケータは表示されません +# when capacity is over 30%, the battery indicator will not be displayed ``` ## Buf @@ -475,22 +532,22 @@ discharging_symbol = "💦" | オプション | デフォルト | 説明 | | ------------------- | ----------------------------------------------- | -------------------------- | -| `format` | `"with [$symbol($version )]($style)"` | `buf`モジュールの形式。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 | -| `symbol` | `"🦬 "` | Bufのバージョンを表示する前に使用される記号です。 | +| `format` | `'with [$symbol($version )]($style)'` | `buf`モジュールの形式。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 | +| `symbol` | `'🦬 '` | Bufのバージョンを表示する前に使用される記号です。 | | `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold blue"` | モジュールのスタイルです。 | +| `style` | `'bold blue'` | モジュールのスタイルです。 | | `disabled` | `false` | `elixir`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | -------- | ---------------------- | -| `version` | `v1.0.0` | `buf`のバージョン | -| `symbol` | | オプション `記号` の値をミラーする | -| `style`* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | -------- | ----------------------- | +| `version` | `v1.0.0` | `buf`のバージョン | +| `symbol` | | オプション `symbol` の値をミラーする | +| `style`* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -500,7 +557,7 @@ discharging_symbol = "💦" # ~/.config/starship.toml [buf] -symbol = "🦬 " +symbol = '🦬 ' ``` ## Bun @@ -514,22 +571,22 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"🍞 "` | A format string representing the symbol of Node.js. | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. | | `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["bun.lockb", "bunfig.toml"]` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_files` | `['bun.lockb', 'bunfig.toml']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold red"` | モジュールのスタイルです。 | +| `style` | `'bold red'` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `bun` module. | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | -------- | ---------------------- | -| version | `v0.1.4` | The version of `bun` | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | -------- | ----------------------- | +| version | `v0.1.4` | The version of `bun` | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -539,7 +596,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. # ~/.config/starship.toml [bun] -format = "via [🍔 $version](bold green) " +format = 'via [🍔 $version](bold green) ' ``` ## C @@ -550,24 +607,24 @@ format = "via [🍔 $version](bold green) " | オプション | デフォルト | 説明 | | ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------ | -| `format` | `"via [$symbol($version(-$name) )]($style)"` | モジュールのフォーマット文字列。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"C "` | コンパイラの詳細を表示する前に使用される記号です。 | -| `detect_extensions` | `["c", "h"]` | どの拡張子がこのモジュールをアクティブにするか | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | モジュールのフォーマット文字列。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'C '` | コンパイラの詳細を表示する前に使用される記号です。 | +| `detect_extensions` | `['c', 'h']` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `commands` | [ [ "cc", "--version" ], [ "gcc", "--version" ], [ "clang", "--version" ] ] | コンパイラを検出する方法 | -| `style` | `"bold 149"` | モジュールのスタイルです。 | +| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | コンパイラを検出する方法 | +| `style` | `'bold 149'` | モジュールのスタイルです。 | | `disabled` | `false` | `c`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| ------- | ------ | ---------------------- | -| name | clang | コンパイラ名 | -| version | 13.0.0 | コンパイラのバージョン | -| symbol | | オプション `記号` の値をミラーする | -| style | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| ------- | ------ | ----------------------- | +| name | clang | コンパイラ名 | +| version | 13.0.0 | コンパイラのバージョン | +| symbol | | オプション `symbol` の値をミラーする | +| style | | オプション `style` の値をミラーする | `version`はデフォルトのフォーマットではないことに注意してください。 @@ -575,7 +632,7 @@ format = "via [🍔 $version](bold green) " `commands`オプションは、コンパイラのバージョンと名前を判別するためのコマンドのリストを受け入れます。 -各コマンドは、実行可能ファイル名の後に引数を続けるリストとして表されます。通常は`["mycc", "--version"]`のようになります。 StarshipはSTDOUTから結果が得られるまで各コマンドを実行を試みます。 +Each command is represented as a list of the executable name, followed by its arguments, usually something like `['mycc', '--version']`. StarshipはSTDOUTから結果が得られるまで各コマンドを実行を試みます。 もし、Cコンパイラがこのモジュールでサポートされていない場合は、[GitHubで問題を提起する](https://github.com/starship/starship/)ことでリクエストできます。 @@ -585,14 +642,14 @@ format = "via [🍔 $version](bold green) " # ~/.config/starship.toml [c] -format = "via [$name $version]($style)" +format = 'via [$name $version]($style)' ``` ## 文字 `character`モジュールは、端末でテキストが入力される場所の横に文字(通常は矢印)を表示します。 -文字は、最後のコマンドが成功したかどうかを示します。 表し方は下記の2つです。 +characterは、最後のコマンドが成功したかどうかを示します。 表し方は下記の2つです。 - 色の変更 (`赤`/`緑`) - プロンプトの表示の変更 (`❯`/`✖`) @@ -607,16 +664,16 @@ format = "via [$name $version]($style)" ### オプション -| オプション | デフォルト | 説明 | -| --------------------------- | -------------------- | ------------------------------------------------------ | -| `format` | `"$symbol"` | テキスト入力の前に使用される書式文字列。 | -| `success_symbol` | `"[❯](bold green)"` | 前のコマンドが成功した場合にテキスト入力の前に使用される書式文字列です。 | -| `error_symbol` | `"[❯](bold red)"` | 前のコマンドが失敗した場合にテキスト入力の前に使用される書式文字列です。 | -| `vimcmd_symbol` | `"[❮](bold green)"` | シェルが vim ノーマルモードの場合にテキスト入力の前に使用されるフォーマット文字列。 | -| `vimcmd_replace_one_symbol` | `"[❮](bold purple)"` | シェルがvimの`replace_one`モードの場合にテキスト入力の前に使用されるフォーマット文字列です。 | -| `vimcmd_replace_symbol` | `"[❮](bold purple)"` | シェルがvimの置換モードの場合にテキスト入力の前に使用されるフォーマット文字列。 | -| `vimcmd_visual_symbol` | `"[❮](bold yellow)"` | シェルがvimの置換モードの場合にテキスト入力の前に使用されるフォーマット文字列。 | -| `disabled` | `false` | `character`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| --------------------------- | -------------------- | -------------------------------------------------------------------------------- | +| `format` | `'$symbol '` | テキスト入力の前に使用されるフォーマット文字列。 | +| `success_symbol` | `'[❯](bold green)'` | 前のコマンドが成功した場合にテキスト入力の前に使用されるフォーマット文字列です。 | +| `error_symbol` | `'[❯](bold red)'` | 前のコマンドが失敗した場合にテキスト入力の前に使用されるフォーマット文字列です。 | +| `vimcmd_symbol` | `'[❮](bold green)'` | シェルがvimノーマルモードの場合にテキスト入力の前に使用されるフォーマット文字列です。 | +| `vimcmd_replace_one_symbol` | `'[❮](bold purple)'` | シェルがvimの`replace_one`モードの場合にテキスト入力の前に使用されるフォーマット文字列です。 | +| `vimcmd_replace_symbol` | `'[❮](bold purple)'` | シェルがvimの置換モードの場合にテキスト入力の前に使用されるフォーマット文字列。 | +| `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | +| `disabled` | `false` | `character`モジュールを無効にします。 | ### 変数 @@ -632,8 +689,8 @@ format = "via [$name $version]($style)" # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[✗](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[✗](bold red) ' ``` #### エラーの形状をカスタムしない @@ -642,8 +699,8 @@ error_symbol = "[✗](bold red) " # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[➜](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[➜](bold red) ' ``` #### vimの形状をカスタムする @@ -652,7 +709,7 @@ error_symbol = "[➜](bold red) " # ~/.config/starship.toml [character] -vicmd_symbol = "[V](bold green) " +vicmd_symbol = '[V](bold green) ' ``` ## CMake @@ -666,22 +723,22 @@ vicmd_symbol = "[V](bold green) " | オプション | デフォルト | 説明 | | ------------------- | -------------------------------------- | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"△ "` | cmakeのバージョンの前に使用される記号 | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'△ '` | cmakeのバージョンの前に使用される記号 | | `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold blue"` | モジュールのスタイルです。 | +| `style` | `'bold blue'` | モジュールのスタイルです。 | | `disabled` | `false` | `cmake`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | --------- | ---------------------- | -| version | `v3.17.3` | cmake のバージョン | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | --------- | ----------------------- | +| version | `v3.17.3` | cmake のバージョン | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -696,22 +753,22 @@ vicmd_symbol = "[V](bold green) " | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `symbol` | `"⚙️ "` | COBOLのバージョンを表示する前に使用される記号です。 | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `style` | `"bold blue"` | モジュールのスタイルです。 | -| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | どの拡張子がこのモジュールをアクティブにするか | +| `symbol` | `'⚙️ '` | COBOLのバージョンを表示する前に使用される記号です。 | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `style` | `'bold blue'` | モジュールのスタイルです。 | +| `detect_extensions` | `['cbl', 'cob', 'CBL', 'COB']` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | | `disabled` | `false` | `cobol`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | ---------- | ---------------------- | -| version | `v3.1.2.0` | `cobol`のバージョン | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | ---------- | ----------------------- | +| version | `v3.1.2.0` | `cobol`のバージョン | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -733,11 +790,11 @@ preexecのような機能を必要とするBashユーザーは、 [rcalorasのba | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------- | | `min_time` | `2_000` | 実行時間を表示する最短期間(ミリ秒単位)です。 | | `show_milliseconds` | `false` | 実行時間の秒に加えてミリ秒を表示します。 | -| `format` | `"took [$duration]($style) "` | module のフォーマットです。 | -| `style` | `"bold yellow"` | モジュールのスタイルです。 | +| `format` | `'took [$duration]($style) '` | module のフォーマットです。 | +| `style` | `'bold yellow'` | モジュールのスタイルです。 | | `disabled` | `false` | `cmd_duration`モジュールを無効にします。 | | `show_notifications` | `false` | コマンドが完了したらデスクトップ通知を表示します。 | -| `min_time_to_notify` | `45_000` | 通知を持続する最短期間(ミリ秒単位) | +| `min_time_to_notify` | `45_000` | 通知を持続する最短期間 (ミリ秒単位) です。 | | `notification_timeout` | | 通知を表示する期間 (ミリ秒単位) です。 もし設定されていない場合、通知のタイムアウトはデーモンによって決定されます。 すべての通知デーモンがこのオプションを受け入れるわけではありません。 | ### 変数 @@ -756,7 +813,7 @@ preexecのような機能を必要とするBashユーザーは、 [rcalorasのba [cmd_duration] min_time = 500 -format = "underwent [$duration](bold yellow)" +format = 'underwent [$duration](bold yellow)' ``` ## Conda @@ -774,19 +831,19 @@ Note: これはconda自身の プロンプト修飾子 を抑制しません。` | オプション | デフォルト | 説明 | | ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | 環境が`conda create -p [path]`で作成された場合、環境パスが切り捨てられるディレクトリ数。 `0`は切り捨てがないことを意味します。 [`directory`](#directory)もご覧ください。 | -| `symbol` | `"🅒 "` | 環境名の直前に使用されるシンボルです。 | -| `style` | `"bold green"` | モジュールのスタイルです。 | -| `format` | `"via [$symbol$environment]($style) "` | module のフォーマットです。 | +| `symbol` | `'🅒 '` | 環境名の直前に使用されるシンボルです。 | +| `style` | `'bold green'` | モジュールのスタイルです。 | +| `format` | `'via [$symbol$environment]($style) '` | module のフォーマットです。 | | `ignore_base` | `true` | アクティブになった時、環境`base`を無視します。 | | `disabled` | `false` | `conda`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| ----------- | ------------ | ---------------------- | -| environment | `astronauts` | 現在の conda 環境 | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| ----------- | ------------ | ----------------------- | +| environment | `astronauts` | 現在の conda 環境 | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -796,7 +853,7 @@ Note: これはconda自身の プロンプト修飾子 を抑制しません。` # ~/.config/starship.toml [conda] -format = "[$symbol$environment](dimmed green) " +format = '[$symbol$environment](dimmed green) ' ``` ## コンテナ @@ -807,18 +864,18 @@ format = "[$symbol$environment](dimmed green) " | オプション | デフォルト | 説明 | | ---------- | ---------------------------------- | ------------------------- | -| `symbol` | `"⬢"` | コンテナ内にいる場合、このシンボルが表示されます。 | -| `style` | `"bold red dimmed"` | モジュールのスタイルです。 | +| `symbol` | `'⬢'` | コンテナ内にいる場合、このシンボルが表示されます。 | +| `style` | `'bold red dimmed'` | モジュールのスタイルです。 | | `format` | `'[$symbol \[$name\]]($style) '` | module のフォーマットです。 | | `disabled` | `false` | `container`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | ------------------- | ---------------------- | -| name | `fedora-toolbox:35` | コンテナ名 | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | ------------------- | ----------------------- | +| name | `fedora-toolbox:35` | コンテナ名 | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -842,22 +899,22 @@ format = '[$symbol \[$name\]]($style) ' | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `symbol` | `"🔮 "` | Crystalのバージョンを表示する前に使用される記号です。 | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `style` | `"bold red"` | モジュールのスタイルです。 | -| `detect_extensions` | `["cr"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["shard.yml"]` | どのファイル名がこのモジュールをアクティブにするか | +| `symbol` | `'🔮 '` | Crystalのバージョンを表示する前に使用される記号です。 | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `style` | `'bold red'` | モジュールのスタイルです。 | +| `detect_extensions` | `['cr']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['shard.yml']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | | `disabled` | `false` | `crystal`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | --------- | ---------------------- | -| version | `v0.32.1` | `crystal` のバージョン | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | --------- | ----------------------- | +| version | `v0.32.1` | `crystal` のバージョン | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -867,7 +924,7 @@ format = '[$symbol \[$name\]]($style) ' # ~/.config/starship.toml [crystal] -format = "via [✨ $version](bold blue) " +format = 'via [✨ $version](bold blue) ' ``` ## Daml @@ -880,22 +937,22 @@ format = "via [✨ $version](bold blue) " | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"Λ "` | Damlの記号を表すフォーマット文字列です。 | -| `style` | `"bold cyan"` | モジュールのスタイルです。 | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'Λ '` | Damlの記号を表すフォーマット文字列です。 | +| `style` | `'bold cyan'` | モジュールのスタイルです。 | | `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["daml.yaml"]` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_files` | `['daml.yaml']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | | `disabled` | `false` | `daml`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | -------- | ---------------------- | -| version | `v2.2.0` | `daml`のバージョン | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | -------- | ----------------------- | +| version | `v2.2.0` | `daml`のバージョン | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -905,7 +962,7 @@ format = "via [✨ $version](bold blue) " # ~/.config/starship.toml [daml] -format = "via [D $version](bold bright-green) " +format = 'via [D $version](bold bright-green) ' ``` ## Dart @@ -920,22 +977,22 @@ format = "via [D $version](bold bright-green) " | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------------------- | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"🎯 "` | Dartのシンボルを表すフォーマット文字列 | -| `detect_extensions` | `["dart"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `[".dart_tool"]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold blue"` | モジュールのスタイルです。 | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'🎯 '` | Dartのシンボルを表すフォーマット文字列 | +| `detect_extensions` | `['dart']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_folders` | `['.dart_tool']` | どのフォルダーがこのモジュールをアクティブにするか | +| `style` | `'bold blue'` | モジュールのスタイルです。 | | `disabled` | `false` | `dart`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | -------- | ---------------------- | -| version | `v2.8.4` | `dart` のバージョン | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | -------- | ----------------------- | +| version | `v2.8.4` | `dart` のバージョン | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -945,7 +1002,7 @@ format = "via [D $version](bold bright-green) " # ~/.config/starship.toml [dart] -format = "via [🔰 $version](bold red) " +format = 'via [🔰 $version](bold red) ' ``` ## Deno @@ -958,22 +1015,22 @@ format = "via [🔰 $version](bold red) " | オプション | デフォルト | 説明 | | ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"🦕 "` | Dart のシンボルを表すフォーマット文字列 | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'🦕 '` | Dart のシンボルを表すフォーマット文字列 | | `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["deno.json", "deno.jsonc", "mod.ts", "mod.js", "deps.ts", "deps.js"]` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"green bold"` | モジュールのスタイルです。 | +| `style` | `'green bold'` | モジュールのスタイルです。 | | `disabled` | `false` | `deno`モジュールを無効化します。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | -------- | ---------------------- | -| version | `v1.8.3` | `deno`のバージョン | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | -------- | ----------------------- | +| version | `v1.8.3` | `deno`のバージョン | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | ### 設定例 @@ -981,33 +1038,34 @@ format = "via [🔰 $version](bold red) " # ~/.config/starship.toml [deno] -format = "via [🦕 $version](green bold) " +format = 'via [🦕 $version](green bold) ' ``` ## Directory -`directory`モジュールには、現在のディレクトリへのパスが表示され、3つの親フォルダは切り捨てられます。 ディレクトリは、現在のgitリポジトリであるとルートとなります。 +`directory` モジュールは現在のディレクトリへのパスを表示します。親フォルダは3つまでに切り捨てられます。 git リポジトリ内にいる場合は、リポジトリのルートで切り捨てられます。 -fishスタイルのpwdオプションを使用すると、切り捨てられたパスを非表示にする代わりに、オプションで有効にした番号に基づいて各ディレクトリの短縮名が表示されます。 +fish スタイルの pwd オプションを使用している場合、切り捨てられたパスを非表示にする代わりに、オプションで有効にした数値に基づいた各ディレクトリの短縮名が表示されます。 -例として、`~/Dev/Nix/nixpkgs/pkgs`で、`nixpkgs`がリポジトリルートであり、オプションが`1`に設定されている場合を挙げます。 以前は`nixpkgs/pkgs`でしたが、`~/D/N/nixpkgs/pkgs`が表示されます。 +たとえば、`~/Dev/Nix/nixpkgs/pkgs`で、`nixpkgs` がリポジトリルートであり、オプションが `1` に設定されている場合を挙げます。 この場合、`nixpkgs/pkgs` の代わりに、`~/D/N/nixpkgs/pkgs` と表示されます。 ### オプション -| オプション | デフォルト | 説明 | -| ------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | -| `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` | `"🔒"` | このシンボルが表示されている時、現在のディレクトリは読み取り専用です。 | -| `read_only_style` | `"red"` | 読み取り専用シンボルのスタイルです。 | -| `truncation_symbol` | `""` | 切り捨てられたパスの接頭辞として付けるシンボルです。 例: "…/" | -| `repo_root_style` | | gitリポジトリのルートのスタイルです。 デフォルトの値は `style` と同じです。 | -| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | `repo_root_style` が定義されている場合の git リポジトリのフォーマットです。 | -| `home_symbol` | `"~"` | ホームディレクトリを示すシンボルです。 | -| `use_os_path_sep` | `true` | `/`を使用する代わりに、OS固有のパスの区切り文字を使用します。(例: Windowsの場合`\`) | +| オプション | デフォルト | 説明 | +| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `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` | `'🔒'` | このシンボルが表示されている時、現在のディレクトリは読み取り専用です。 | +| `read_only_style` | `'red'` | 読み取り専用シンボルのスタイルです。 | +| `truncation_symbol` | `''` | 切り捨てられたパスの接頭辞として付けるシンボルです。 eg: '…/' | +| `before_repo_root_style` | | The style for the path segment above the root of the git repo. デフォルトの値は `style` と同じです。 | +| `repo_root_style` | | gitリポジトリのルートのスタイルです。 デフォルトの値は `style` と同じです。 | +| `repo_root_format` | `'[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) '` | The format of a git repo when `before_repo_root_style` and `repo_root_style` is defined. | +| `home_symbol` | `'~'` | ホームディレクトリを示すシンボルです。 | +| `use_os_path_sep` | `true` | `/`を使用する代わりに、OS固有のパスの区切り文字を使用します。(例: Windowsの場合`\`) |

このモジュールは、どのようにディレクトリを表示するかについての高度なオプションをいくつか持っています。 @@ -1022,8 +1080,8 @@ fishスタイルのpwdオプションを使用すると、切り捨てられた ```toml [directory.substitutions] -"/Volumes/network/path" = "/net" -"src/com/long/java/path" = "mypath" +'/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`. @@ -1034,8 +1092,8 @@ fishスタイルのpwdオプションを使用すると、切り捨てられた | 変数 | 設定例 | 説明 | | --------- | --------------------- | ---------------------- | -| path | `"D:/Projects"` | カレントディレクトリのパス | -| style\* | `"black bold dimmed"` | オプション `style` の値をミラーする | +| path | `'D:/Projects'` | カレントディレクトリのパス | +| style\* | `'black bold dimmed'` | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -1046,11 +1104,11 @@ fishスタイルのpwdオプションを使用すると、切り捨てられた | 変数 | 設定例 | 説明 | | ------------------ | --------------------- | ---------------------- | -| before_root_path | `"/path/to/home/"` | gitルートディレクトリパスの前のパス | -| repo_root | `"git_repo"` | gitルートディレクトリの名前 | -| path | `"/src/lib"` | 残りのパス | -| style | `"black bold dimmed"` | オプション `style` の値をミラーする | -| repo_root_style | `"underline white"` | gitルートディレクトリの名前のスタイル | +| before_root_path | `'/path/to/home/'` | gitルートディレクトリパスの前のパス | +| repo_root | `'git_repo'` | gitルートディレクトリの名前 | +| path | `'/src/lib'` | 残りのパス | +| style | `'black bold dimmed'` | オプション `style` の値をミラーする | +| repo_root_style | `'underline white'` | gitルートディレクトリの名前のスタイル |
@@ -1061,7 +1119,7 @@ fishスタイルのpwdオプションを使用すると、切り捨てられた [directory] truncation_length = 8 -truncation_symbol = "…/" +truncation_symbol = '…/' ``` ## Docker Context @@ -1070,24 +1128,24 @@ truncation_symbol = "…/" ### オプション -| オプション | デフォルト | 説明 | -| ------------------- | ---------------------------------- | -------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | module のフォーマットです。 | -| `symbol` | `"🐳 "` | Dockerコンテキストを表示する前に使用される記号です。 | -| `only_with_files` | `true` | ファイルに一致する場合にのみ表示 | -| `detect_extensions` | `[]` | どの拡張子がこのモジュールをトリガーするか(`only_with_files`がtrueになっている必要があります)。 | -| `detect_files` | `The format for the module.` | どんなファイル名がこのモジュールをトリガーするか(`only_with_files`がtrueになっている必要があります)。 | -| `detect_folders` | `[]` | どんなフォルダがこのモジュールをトリガーするか(`only_with_files`がtrueになっている必要があります)。 | -| `style` | `"blue bold"` | モジュールのスタイルです。 | -| `disabled` | `false` | `docker_context`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ------------------- | ------------------------------------------------------------- | -------------------------------------------------------------- | +| `format` | `'via [$symbol$context]($style) '` | module のフォーマットです。 | +| `symbol` | `'🐳 '` | Dockerコンテキストを表示する前に使用される記号です。 | +| `only_with_files` | `true` | ファイルに一致する場合にのみ表示 | +| `detect_extensions` | `[]` | どの拡張子がこのモジュールをトリガーするか(`only_with_files`がtrueになっている必要があります)。 | +| `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | どんなファイル名がこのモジュールをトリガーするか(`only_with_files`がtrueになっている必要があります)。 | +| `detect_folders` | `[]` | どんなフォルダがこのモジュールをトリガーするか(`only_with_files`がtrueになっている必要があります)。 | +| `style` | `'blue bold'` | モジュールのスタイルです。 | +| `disabled` | `false` | `docker_context`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | -------------- | ---------------------- | -| context | `test_context` | 現在の Docker コンテキスト | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | -------------- | ----------------------- | +| context | `test_context` | 現在の Docker コンテキスト | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -1097,7 +1155,7 @@ truncation_symbol = "…/" # ~/.config/starship.toml [docker_context] -format = "via [🐋 $context](blue bold)" +format = 'via [🐋 $context](blue bold)' ``` ## Dotnet @@ -1125,14 +1183,14 @@ format = "via [🐋 $context](blue bold)" | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `".NET "` | dotnetのバージョンを表示する前に使用される記号です。 | +| `format` | `'via [$symbol($version )(🎯 $tfm )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'.NET '` | dotnetのバージョンを表示する前に使用される記号です。 | | `heuristic` | `true` | より高速なバージョン検出を使用して、starshipの動作を維持します。 | -| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_extensions` | `['csproj', 'fsproj', 'xproj']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['global.json', 'project.json', 'Directory.Build.props', 'Directory.Build.targets', 'Packages.props']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold blue"` | モジュールのスタイルです。 | +| `style` | `'bold blue'` | モジュールのスタイルです。 | | `disabled` | `false` | `dotnet`モジュールを無効にします。 | ### 変数 @@ -1152,8 +1210,8 @@ format = "via [🐋 $context](blue bold)" # ~/.config/starship.toml [dotnet] -symbol = "🥅 " -style = "green" +symbol = '🥅 ' +style = 'green' heuristic = false ``` @@ -1168,22 +1226,22 @@ heuristic = false | オプション | デフォルト | 説明 | | ------------------- | ----------------------------------------------------------- | ------------------------------------------------------ | | `format` | `'via [$symbol($version \(OTP $otp_version\) )]($style)'` | module elixirのフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"💧 "` | Elixir/Erlangのバージョンを表示する前に使用される記号です。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'💧 '` | Elixir/Erlangのバージョンを表示する前に使用される記号です。 | | `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["mix.exs"]` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_files` | `['mix.exs']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold purple"` | モジュールのスタイルです。 | +| `style` | `'bold purple'` | モジュールのスタイルです。 | | `disabled` | `false` | `elixir`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| ----------- | ------- | ---------------------- | -| version | `v1.10` | `elixir`のバージョン | -| otp_version | | `elixir`のotpバージョン | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| ----------- | ------- | ----------------------- | +| version | `v1.10` | `elixir`のバージョン | +| otp_version | | `elixir`のotpバージョン | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -1193,7 +1251,7 @@ heuristic = false # ~/.config/starship.toml [elixir] -symbol = "🔮 " +symbol = '🔮 ' ``` ## Elm @@ -1210,22 +1268,22 @@ symbol = "🔮 " | オプション | デフォルト | 説明 | | ------------------- | -------------------------------------------------- | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"🌳 "` | Elmのシンボルを表すフォーマット文字列 | -| `detect_extensions` | `["elm"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["elm.json", "elm-package.json", ".elm-version"]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `["elm-stuff"]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"cyan bold"` | モジュールのスタイルです。 | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'🌳 '` | Elmのシンボルを表すフォーマット文字列 | +| `detect_extensions` | `['elm']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['elm.json', 'elm-package.json', '.elm-version']` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_folders` | `['elm-stuff']` | どのフォルダーがこのモジュールをアクティブにするか | +| `style` | `'cyan bold'` | モジュールのスタイルです。 | | `disabled` | `false` | `elm`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | --------- | ---------------------- | -| version | `v0.19.1` | `elm`のバージョン | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | --------- | ----------------------- | +| version | `v0.19.1` | `elm`のバージョン | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -1235,7 +1293,7 @@ symbol = "🔮 " # ~/.config/starship.toml [elm] -format = "via [ $version](cyan bold) " +format = 'via [ $version](cyan bold) ' ``` ## 環境変数 @@ -1255,7 +1313,7 @@ format = "via [ $version](cyan bold) " # ~/.config/starship.toml [env_var.USER] -default = "unknown user" +default = 'unknown user' ``` ::: @@ -1264,19 +1322,19 @@ default = "unknown user" | オプション | デフォルト | 説明 | | ---------- | ------------------------------ | ------------------------------------- | -| `symbol` | `""` | 環境変数を表示する前に使用される記号です。 | +| `symbol` | `''` | 環境変数を表示する前に使用される記号です。 | | `variable` | | 表示される環境変数です。 | | `default` | | 上のvariableが定義されていない場合に表示されるデフォルトの値です。 | -| `format` | `"with [$env_value]($style) "` | module のフォーマットです。 | +| `format` | `'with [$env_value]($style) '` | module のフォーマットです。 | | `disabled` | `false` | `env_var`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | ------------------------------------------- | ---------------------- | -| env_value | `Windows NT` (if _variable_ would be `$OS`) | オプション`variable`の値 | -| symbol | | オプション `記号` の値をミラーする | -| style\* | `black bold dimmed` | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | ------------------------------------------- | ----------------------- | +| env_value | `Windows NT` (if _variable_ would be `$OS`) | オプション`variable`の値 | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | `black bold dimmed` | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -1286,8 +1344,8 @@ default = "unknown user" # ~/.config/starship.toml [env_var] -variable = "SHELL" -default = "unknown shell" +variable = 'SHELL' +default = 'unknown shell' ``` Displaying multiple environmental variables: @@ -1296,10 +1354,10 @@ Displaying multiple environmental variables: # ~/.config/starship.toml [env_var.SHELL] -variable = "SHELL" -default = "unknown shell" +variable = 'SHELL' +default = 'unknown shell' [env_var.USER] -default = "unknown user" +default = 'unknown user' ``` ## Erlang @@ -1313,22 +1371,22 @@ default = "unknown user" | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `" "` | Erlangのバージョンを表示する前に使用される記号です。 | -| `style` | `"bold red"` | モジュールのスタイルです。 | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `' '` | Erlangのバージョンを表示する前に使用される記号です。 | +| `style` | `'bold red'` | モジュールのスタイルです。 | | `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["rebar.config", "elang.mk"]` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_files` | `['rebar.config', 'elang.mk']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | | `disabled` | `false` | `erlang`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | --------- | ---------------------- | -| version | `v22.1.3` | `erlang` のバージョン | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | --------- | ----------------------- | +| version | `v22.1.3` | `erlang` のバージョン | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -1338,7 +1396,7 @@ default = "unknown user" # ~/.config/starship.toml [erlang] -format = "via [e $version](bold red) " +format = 'via [e $version](bold red) ' ``` ## Fill @@ -1349,19 +1407,19 @@ format = "via [e $version](bold red) " | オプション | デフォルト | 説明 | | ---------- | -------------- | ------------------- | -| `symbol` | `"."` | 行を埋めるために使う記号 | -| `style` | `"bold black"` | モジュールのスタイルです。 | +| `symbol` | `'.'` | 行を埋めるために使う記号 | +| `style` | `'bold black'` | モジュールのスタイルです。 | | `disabled` | `false` | `fill`モジュールを無効にします。 | ### 設定例 ```toml # ~/.config/starship.toml -format = "AA $fill BB $fill CC" +format = 'AA $fill BB $fill CC' [fill] -symbol = "-" -style = "bold green" +symbol = '-' +style = 'bold green' ``` このような出力になります: @@ -1379,10 +1437,10 @@ AA -------------------------------------------- BB ----------------------------- | オプション | デフォルト | 説明 | | ----------------- | ---------------------------------------------------------- | ----------------------------- | | `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | module のフォーマットです。 | -| `symbol` | `"☁️ "` | 現在のGCPプロファイルを表示する前に表示される記号です。 | -| `region_aliases` | | GCP名に加えて表示するリージョンのエイリアスです。 | -| `project_aliases` | | GCP名に加えて表示するプロジェクトのエイリアスです。 | -| `style` | `"bold blue"` | モジュールのスタイルです。 | +| `symbol` | `'☁️ '` | 現在のGCPプロファイルを表示する前に表示される記号です。 | +| `region_aliases` | `{}` | GCP名に加えて表示するリージョンのエイリアスです。 | +| `project_aliases` | `{}` | GCP名に加えて表示するプロジェクトのエイリアスです。 | +| `style` | `'bold blue'` | モジュールのスタイルです。 | | `disabled` | `false` | `gcloud`モジュールを無効にします。 | ### 変数 @@ -1394,7 +1452,7 @@ AA -------------------------------------------- BB ----------------------------- | domain | `example.com` | 現在のGCPプロファイルのドメイン | | project | | 現在のGCPプロジェクト | | active | `default` | `~/.config/gcloud/active_config` に書かれたアクティブな設定名 | -| symbol | | オプション `記号` の値をミラーする | +| symbol | | オプション `symbol` の値をミラーする | | style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -1416,8 +1474,8 @@ format = 'on [$symbol$account(@$domain)(\($project\))]($style) ' # ~/.config/starship.toml [gcloud] -format = "[$symbol$active]($style) " -style = "bold yellow" +format = '[$symbol$active]($style) ' +style = 'bold yellow' ``` #### アカウントとエイリアスされたリージョンを表示する @@ -1426,10 +1484,10 @@ style = "bold yellow" # ~/.config/starship.toml [gcloud] -symbol = "️🇬️ " +symbol = '️🇬️ ' [gcloud.region_aliases] -us-central1 = "uc1" -asia-northeast1 = "an1" +us-central1 = 'uc1' +asia-northeast1 = 'an1' ``` #### アカウントとエイリアスされたプロジェクトを表示 @@ -1440,7 +1498,7 @@ asia-northeast1 = "an1" [gcloud] format = 'on [$symbol$account(@$domain)(\($project\))]($style) ' [gcloud.project_aliases] -very-long-project-name = "vlpn" +very-long-project-name = 'vlpn' ``` ## Git Branch @@ -1449,17 +1507,17 @@ very-long-project-name = "vlpn" ### オプション -| オプション | デフォルト | 説明 | -| -------------------- | ------------------------------------------------- | -------------------------------------------------------------- | -| `always_show_remote` | `false` | ローカルブランチ名と等しい場合でも、リモート追跡ブランチ名を表示します。 | -| `format` | `"on [$symbol$branch(:$remote_branch)]($style) "` | module のフォーマットです。 現在のブランチ名を参照するには、`"$branch"`を使用します。 | -| `symbol` | `" "` | gitブランチのシンボルを表すフォーマット文字列。 | -| `style` | `"bold purple"` | モジュールのスタイルです。 | -| `truncation_length` | `2^63 - 1` | Truncates a git branch to `N` graphemes. | -| `truncation_symbol` | `"…"` | ブランチ名切り捨てられていることを示すための記号です。 `""`で記号なしにできます。 | -| `only_attached` | `false` | Only show the branch name when not in a detached `HEAD` state. | -| `ignore_branches` | `[]` | 表示しない名前のリスト。 "master"や"main"に有用。 | -| `disabled` | `false` | `git_branch`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| -------------------- | ------------------------------------------------- | ---------------------------------------------------------------------- | +| `always_show_remote` | `false` | ローカルブランチ名と等しい場合でも、リモート追跡ブランチ名を表示します。 | +| `format` | `'on [$symbol$branch(:$remote_branch)]($style) '` | module のフォーマットです。 Use `'$branch'` to refer to the current branch name. | +| `symbol` | `' '` | gitブランチのシンボルを表すフォーマット文字列。 | +| `style` | `'bold purple'` | モジュールのスタイルです。 | +| `truncation_length` | `2^63 - 1` | Truncates a git branch to `N` graphemes. | +| `truncation_symbol` | `'…'` | ブランチ名切り捨てられていることを示すための記号です。 You can use `''` for no symbol. | +| `only_attached` | `false` | Only show the branch name when not in a detached `HEAD` state. | +| `ignore_branches` | `[]` | 表示しない名前のリスト。 Useful for 'master' or 'main'. | +| `disabled` | `false` | `git_branch`モジュールを無効にします。 | ### 変数 @@ -1468,7 +1526,7 @@ very-long-project-name = "vlpn" | branch | `master` | 現在のブランチがない場合は、現在のブランチ名は`HEAD`に戻ります(例: git detached `HEAD`) | | remote_name | `origin` | リモート名 | | remote_branch | `master` | `remote_name`で追跡されたブランチ名 | -| symbol | | オプション `記号` の値をミラーする | +| symbol | | オプション `symbol` の値をミラーする | | style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -1479,10 +1537,10 @@ very-long-project-name = "vlpn" # ~/.config/starship.toml [git_branch] -symbol = "🌱 " +symbol = '🌱 ' truncation_length = 4 -truncation_symbol = "" -ignore_branches = ["master", "main"] +truncation_symbol = '' +ignore_branches = ['master', 'main'] ``` ## Git コミット @@ -1493,13 +1551,13 @@ ignore_branches = ["master", "main"] | オプション | デフォルト | 説明 | | -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ | -| `commit_hash_length` | `7` | 表示されるgitコミットハッシュの長さです。 | +| `commit_hash_length` | `7` | 表示される git コミットハッシュの長さ。 | | `format` | `'[\($hash$tag\)]($style) '` | module のフォーマットです。 | -| `style` | `"bold green"` | モジュールのスタイルです。 | +| `style` | `'bold green'` | モジュールのスタイルです。 | | `only_detached` | `true` | detached `HEAD` 状態のときのみ git コミットハッシュを表示する | | `tag_disabled` | `true` | `git_commit` モジュールのタグ情報の表示を無効にする。 | | `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. | -| `tag_symbol` | `" 🏷 "` | 表示される情報の前に追加されるタグシンボル | +| `tag_symbol` | `' 🏷 '` | 表示される情報の前に追加されるタグシンボル | | `disabled` | `false` | `git_commit` モジュールを無効にします。 | ### 変数 @@ -1518,25 +1576,25 @@ ignore_branches = ["master", "main"] [git_commit] commit_hash_length = 4 -tag_symbol = "🔖 " +tag_symbol = '🔖 ' ``` ## Git State -`git_state`モジュールはgitディレクトリの進行状態を表します。 (例: _REBASING_, _BISECTING_, その他) 進捗情報がある場合(例: REBASING 3/10)はその情報も表示されます。 +`git_state`モジュールはgitディレクトリの進行状態を表します。 (例: _REBASING_, _BISECTING_, その他) 進行状況の情報がある場合は (例:REBASING 3/10)、その情報も表示されます。 ### オプション | オプション | デフォルト | 説明 | | -------------- | --------------------------------------------------------------- | -------------------------------------------------------- | -| `rebase` | `"REBASING"` | `rebase`進行中に表示されるフォーマット文字列です。 | -| `merge` | `"MERGING"` | `merge`進行中に表示されるフォーマット文字列です。 | -| `revert` | `"REVERTING"` | `revert`進行中に表示されるフォーマット文字列です。 | -| `cherry_pick` | `"CHERRY-PICKING"` | `cherry-pick`進行中に表示されるフォーマット文字列です。 | -| `bisect` | `"BISECTING"` | `bisect`進行中に表示されるフォーマット文字列です。 | -| `am` | `"AM"` | `apply-mailbox` (`git am`) 進行中に表示されるフォーマット文字列です。 | -| `am_or_rebase` | `"AM/REBASE"` | あいまいな`apply-mailbox`または`rebase`が進行中のときに表示されるフォーマット文字列です。 | -| `style` | `"bold yellow"` | モジュールのスタイルです。 | +| `rebase` | `'REBASING'` | `rebase`進行中に表示されるフォーマット文字列です。 | +| `merge` | `'MERGING'` | `merge`進行中に表示されるフォーマット文字列です。 | +| `revert` | `'REVERTING'` | `revert`進行中に表示されるフォーマット文字列です。 | +| `cherry_pick` | `'CHERRY-PICKING'` | `cherry-pick`進行中に表示されるフォーマット文字列です。 | +| `bisect` | `'BISECTING'` | `bisect`進行中に表示されるフォーマット文字列です。 | +| `am` | `'AM'` | `apply-mailbox` (`git am`) 進行中に表示されるフォーマット文字列です。 | +| `am_or_rebase` | `'AM/REBASE'` | あいまいな`apply-mailbox`または`rebase`が進行中のときに表示されるフォーマット文字列です。 | +| `style` | `'bold yellow'` | モジュールのスタイルです。 | | `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | module のフォーマットです。 | | `disabled` | `false` | `git_state`モジュールを無効にします。 | @@ -1558,7 +1616,7 @@ tag_symbol = "🔖 " [git_state] format = '[\($state( $progress_current of $progress_total)\)]($style) ' -cherry_pick = "[🍒 PICKING](bold red)" +cherry_pick = '[🍒 PICKING](bold red)' ``` ## Git Metrics @@ -1567,7 +1625,7 @@ The `git_metrics` module will show the number of added and deleted lines in the ::: tip -このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 +このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで `disabled` を `false` に設定します。 ::: @@ -1575,10 +1633,10 @@ The `git_metrics` module will show the number of added and deleted lines in the | オプション | デフォルト | 説明 | | -------------------- | ------------------------------------------------------------ | ------------------------------------- | -| `added_style` | `"bold green"` | The style for the added count. | -| `deleted_style` | `"bold red"` | The style for the deleted count. | +| `added_style` | `'bold green'` | The style for the added count. | +| `deleted_style` | `'bold red'` | The style for the deleted count. | | `only_nonzero_diffs` | `true` | Render status only for changed items. | -| `format` | `"([+$added]($added_style) )([-$deleted]($deleted_style) )"` | module のフォーマットです。 | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | module のフォーマットです。 | | `disabled` | `true` | Disables the `git_metrics` module. | ### 変数 @@ -1598,13 +1656,13 @@ The `git_metrics` module will show the number of added and deleted lines in the # ~/.config/starship.toml [git_metrics] -added_style = "bold blue" -format = "[+$added]($added_style)/[-$deleted]($deleted_style) " +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' ``` ## Git Status -`git_status`モジュールは、現在のディレクトリのリポジトリの状態を表すシンボルを表示します。 +`git_status` モジュールは、カレントディレクトリのリポジトリの状態を表すシンボルを表示します。 ::: tip @@ -1617,18 +1675,18 @@ WSL環境のWindowsディレクトリ(例: `/mnt/c/`以下) では、Git Status | オプション | デフォルト | 説明 | | ------------------- | ----------------------------------------------- | ---------------------------------------------------------------------- | | `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | `git_status` のデフォルトフォーマット | -| `conflicted` | `"="` | このブランチにはマージの競合があります。 | -| `ahead` | `"⇡"` | `ahead`のフォーマット | -| `behind` | `"⇣"` | `behind`のフォーマット | -| `diverged` | `"⇕"` | `diverged`のフォーマット | -| `up_to_date` | `""` | `up_to_date`のフォーマット | -| `untracked` | `"?"` | `untracked`のフォーマット | -| `stashed` | `"$"` | `stashed`のフォーマット | -| `modified` | `"!"` | `modified`のフォーマット | -| `staged` | `"+"` | `staged`のフォーマット | -| `renamed` | `"»"` | `renamed`のフォーマット | -| `deleted` | `"✘"` | `deleted`のフォーマット | -| `style` | `"bold red"` | モジュールのスタイルです。 | +| `conflicted` | `'='` | このブランチにはマージの競合があります。 | +| `ahead` | `'⇡'` | `ahead`のフォーマット | +| `behind` | `'⇣'` | `behind`のフォーマット | +| `diverged` | `'⇕'` | `diverged`のフォーマット | +| `up_to_date` | `''` | `up_to_date`のフォーマット | +| `untracked` | `'?'` | `untracked`のフォーマット | +| `stashed` | `'$'` | `stashed`のフォーマット | +| `modified` | `'!'` | `modified`のフォーマット | +| `staged` | `'+'` | `staged`のフォーマット | +| `renamed` | `'»'` | `renamed`のフォーマット | +| `deleted` | `'✘'` | `deleted`のフォーマット | +| `style` | `'bold red'` | モジュールのスタイルです。 | | `ignore_submodules` | `false` | サブモジュールの変更を無視します。 | | `disabled` | `false` | `git_status`モジュールを無効にします。 | | `windows_starship` | | WSLでWindowsディレクトリの`git_status`で使用するWindows Starshipの実行ファイルのLinux上でのパス。 | @@ -1671,17 +1729,17 @@ The following variables can be used in `conflicted`, `ahead`, `behind`, `untrack # ~/.config/starship.toml [git_status] -conflicted = "🏳" -ahead = "🏎💨" -behind = "😰" -diverged = "😵" -up_to_date = "✓" -untracked = "🤷" -stashed = "📦" -modified = "📝" +conflicted = '🏳' +ahead = '🏎💨' +behind = '😰' +diverged = '😵' +up_to_date = '✓' +untracked = '🤷' +stashed = '📦' +modified = '📝' staged = '[++\($count\)](green)' -renamed = "👅" -deleted = "🗑" +renamed = '👅' +deleted = '🗑' ``` Show ahead/behind count of the branch being tracked @@ -1690,9 +1748,9 @@ Show ahead/behind count of the branch being tracked # ~/.config/starship.toml [git_status] -ahead = "⇡${count}" -diverged = "⇕⇡${ahead_count}⇣${behind_count}" -behind = "⇣${count}" +ahead = '⇡${count}' +diverged = '⇕⇡${ahead_count}⇣${behind_count}' +behind = '⇣${count}' ``` Use Windows Starship executable on Windows paths in WSL @@ -1701,7 +1759,7 @@ Use Windows Starship executable on Windows paths in WSL # ~/.config/starship.toml [git_status] -windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.exe" +windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe' ``` ## Go @@ -1722,22 +1780,22 @@ windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.e | オプション | デフォルト | 説明 | | ------------------- | ----------------------------------------------------------------------------------------- | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"🐹 "` | A format string representing the symbol of Go. | -| `detect_extensions` | `["go"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["go.mod", "go.sum", "go.work", "glide.yaml", "Gopkg.yml", "Gopkg.lock", ".go-version"]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `["Godeps"]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold cyan"` | モジュールのスタイルです。 | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'🐹 '` | A format string representing the symbol of Go. | +| `detect_extensions` | `['go']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_folders` | `['Godeps']` | どのフォルダーがこのモジュールをアクティブにするか | +| `style` | `'bold cyan'` | モジュールのスタイルです。 | | `disabled` | `false` | `golang`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | --------- | ---------------------- | -| version | `v1.12.1` | The version of `go` | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | --------- | ----------------------- | +| version | `v1.12.1` | The version of `go` | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -1747,7 +1805,39 @@ windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.e # ~/.config/starship.toml [golang] -format = "via [🏎💨 $version](bold cyan) " +format = 'via [🏎💨 $version](bold cyan) ' +``` + +## Guix-shell + +The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. + +### オプション + +| オプション | デフォルト | 説明 | +| ---------- | -------------------------- | ------------------------------------------------------ | +| `format` | `'via [$symbol]($style) '` | module のフォーマットです。 | +| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. | +| `style` | `"yellow bold"` | モジュールのスタイルです。 | +| `disabled` | `false` | Disables the `guix_shell` module. | + +### 変数 + +| 変数 | 設定例 | 説明 | +| --------- | --- | ----------------------- | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | + +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 + +### 設定例 + +```toml +# ~/.config/starship.toml + +[guix_shell] +disabled = true +format = 'via [🐂](yellow bold) ' ``` ## Haskell @@ -1763,12 +1853,12 @@ The `haskell` module finds the current selected GHC version and/or the selected | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | -------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `symbol` | `"λ "` | A format string representing the symbol of Haskell | -| `detect_extensions` | `["hs", "cabal", "hs-boot"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["stack.yaml", "cabal.project"]` | どのファイル名がこのモジュールをアクティブにするか | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `symbol` | `'λ '` | A format string representing the symbol of Haskell | +| `detect_extensions` | `['hs', 'cabal', 'hs-boot']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['stack.yaml', 'cabal.project']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold purple"` | モジュールのスタイルです。 | +| `style` | `'bold purple'` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `haskell` module. | ### 変数 @@ -1778,11 +1868,51 @@ The `haskell` module finds the current selected GHC version and/or the selected | version | | `ghc_version` or `snapshot` depending on whether the current project is a Stack project | | snapshot | `lts-18.12` | Currently selected Stack snapshot | | ghc\_version | `9.2.1` | Currently installed GHC version | -| symbol | | オプション `記号` の値をミラーする | +| symbol | | オプション `symbol` の値をミラーする | | style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 +## Haxe + +The `haxe` module shows the currently installed version of [Haxe](https://haxe.org/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 + +- The current directory contains a `project.xml`, `Project.xml`, `application.xml`, `haxelib.json`, `hxformat.json` or `.haxerc` file +- The current directory contains a `.haxelib` or a `haxe_libraries` directory +- The current directory contains a file with the `.hx` or `.hxml` extension + +### オプション + +| オプション | デフォルト | 説明 | +| ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | +| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `detect_extensions` | `["hx", "hxml"]` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_folders` | `[".haxelib", "haxe_libraries"]` | どのフォルダーがこのモジュールをアクティブにするか | +| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. | +| `style` | `"bold fg:202"` | モジュールのスタイルです。 | +| `disabled` | `false` | Disables the `haxe` module. | + +### 変数 + +| 変数 | 設定例 | 説明 | +| --------- | -------- | ----------------------- | +| version | `v4.2.5` | The version of `haxe` | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | + +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 + +### 設定例 + +```toml +# ~/.config/starship.toml + +[haxe] +format = "via [⌘ $version](bold fg:202) " +``` + ## Helm `helm`モジュールは、現在インストールされている[Helm](https://helm.sh/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 @@ -1794,22 +1924,22 @@ The `haskell` module finds the current selected GHC version and/or the selected | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | | `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["helmfile.yaml", "Chart.yaml"]` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_files` | `['helmfile.yaml', 'Chart.yaml']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `symbol` | `"⎈ "` | A format string representing the symbol of Helm. | -| `style` | `"bold white"` | モジュールのスタイルです。 | +| `symbol` | `'⎈ '` | A format string representing the symbol of Helm. | +| `style` | `'bold white'` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `helm` module. | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | -------- | ---------------------- | -| version | `v3.1.1` | The version of `helm` | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | -------- | ----------------------- | +| version | `v3.1.1` | The version of `helm` | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -1819,7 +1949,7 @@ The `haskell` module finds the current selected GHC version and/or the selected # ~/.config/starship.toml [helm] -format = "via [⎈ $version](bold white) " +format = 'via [⎈ $version](bold white) ' ``` ## ホスト名 @@ -1828,22 +1958,22 @@ format = "via [⎈ $version](bold white) " ### オプション -| オプション | デフォルト | 説明 | -| ------------ | -------------------------------------- | --------------------------------------------------------------------------- | -| `ssh_only` | `true` | SSHセッションに接続されている場合にのみホスト名を表示します。 | -| `ssh_symbol` | `"🌐 "` | A format string representing the symbol when connected to SSH session. | -| `trim_at` | `"."` | この文字が最初にマッチするまでをホスト名と認識します。 `"."`は最初の. までをホスト名として認識します。 `""`を指定した場合トリムしません。 | -| `format` | `"[$ssh_symbol$hostname]($style) in "` | module のフォーマットです。 | -| `style` | `"bold dimmed green"` | モジュールのスタイルです。 | -| `disabled` | `false` | `hostname`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `ssh_only` | `true` | SSHセッションに接続されている場合にのみホスト名を表示します。 | +| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | +| `trim_at` | `'.'` | この文字が最初にマッチするまでをホスト名と認識します。 `'.'` will stop after the first dot. `''` will disable any truncation | +| `format` | `'[$ssh_symbol$hostname]($style) in '` | module のフォーマットです。 | +| `style` | `'bold dimmed green'` | モジュールのスタイルです。 | +| `disabled` | `false` | `hostname`モジュールを無効にします。 | ### 変数 | 変数 | 設定例 | 説明 | | ---------- | ---------- | ----------------------------------------------------- | -| ホスト名 | `computer` | The hostname of the computer | +| hostname | `computer` | The hostname of the computer | | style\* | | オプション `style` の値をミラーする | -| ssh_symbol | `"🌏 "` | The symbol to represent when connected to SSH session | +| ssh_symbol | `'🌏 '` | The symbol to represent when connected to SSH session | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -1854,8 +1984,8 @@ format = "via [⎈ $version](bold white) " [hostname] ssh_only = false -format = "[$ssh_symbol](bold blue) on [$hostname](bold red) " -trim_at = ".companyname.com" +format = '[$ssh_symbol](bold blue) on [$hostname](bold red) ' +trim_at = '.companyname.com' disabled = false ``` @@ -1870,22 +2000,22 @@ disabled = false | オプション | デフォルト | 説明 | | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | -| `format` | `"via [${symbol}(${version} )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", "deps.edn", "project.clj", "build.boot"]` | どのファイル名がこのモジュールをアクティブにするか | +| `format` | `'via [${symbol}(${version} )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `detect_extensions` | `['java', 'class', 'gradle', 'jar', 'cljs', 'cljc']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['pom.xml', 'build.gradle.kts', 'build.sbt', '.java-version', 'deps.edn', 'project.clj', 'build.boot']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `symbol` | `"☕ "` | A format string representing the symbol of Java | -| `style` | `"red dimmed"` | モジュールのスタイルです。 | -| `disabled` | `false` | `Java`モジュールを無効にします。 | +| `symbol` | `'☕ '` | A format string representing the symbol of Java | +| `style` | `'red dimmed'` | モジュールのスタイルです。 | +| `disabled` | `false` | `java`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | ----- | ---------------------- | -| version | `v14` | The version of `java` | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | ----- | ----------------------- | +| version | `v14` | The version of `java` | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -1895,7 +2025,7 @@ disabled = false # ~/.config/starship.toml [java] -symbol = "🌟 " +symbol = '🌟 ' ``` ## ジョブ @@ -1927,20 +2057,20 @@ The `threshold` option is deprecated, but if you want to use it, the module will | `threshold`* | `1` | 超過した場合、ジョブの数を表示します。 | | `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. | | `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. | -| `format` | `"[$symbol$number]($style) "` | module のフォーマットです。 | -| `symbol` | `"✦"` | The string used to represent the `symbol` variable. | -| `style` | `"bold blue"` | モジュールのスタイルです。 | +| `format` | `'[$symbol$number]($style) '` | module のフォーマットです。 | +| `symbol` | `'✦'` | The string used to represent the `symbol` variable. | +| `style` | `'bold blue'` | モジュールのスタイルです。 | | `disabled` | `false` | `jobs`モジュールを無効にします。 | *: This option is deprecated, please use the `number_threshold` and `symbol_threshold` options instead. ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | --- | ---------------------- | -| number | `1` | ジョブの数 | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | --- | ----------------------- | +| number | `1` | ジョブの数 | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -1950,7 +2080,7 @@ The `threshold` option is deprecated, but if you want to use it, the module will # ~/.config/starship.toml [jobs] -symbol = "+ " +symbol = '+ ' number_threshold = 4 symbol_threshold = 0 ``` @@ -1967,22 +2097,22 @@ symbol_threshold = 0 | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `detect_extensions` | `["jl"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["Project.toml", "Manifest.toml"]` | どのファイル名がこのモジュールをアクティブにするか | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `detect_extensions` | `['jl']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['Project.toml', 'Manifest.toml']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `symbol` | `"ஃ "` | Juliaのシンボルを表すフォーマット文字列 | -| `style` | `"bold purple"` | モジュールのスタイルです。 | +| `symbol` | `'ஃ '` | Juliaのシンボルを表すフォーマット文字列 | +| `style` | `'bold purple'` | モジュールのスタイルです。 | | `disabled` | `false` | `julia`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | -------- | ---------------------- | -| version | `v1.4.0` | `julia`のバージョン | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | -------- | ----------------------- | +| version | `v1.4.0` | `julia`のバージョン | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -1992,7 +2122,7 @@ symbol_threshold = 0 # ~/.config/starship.toml [julia] -symbol = "∴ " +symbol = '∴ ' ``` ## Kotlin @@ -2005,23 +2135,23 @@ symbol = "∴ " | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `detect_extensions` | `["kt", "kts"]` | どの拡張子がこのモジュールをアクティブにするか | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `detect_extensions` | `['kt', 'kts']` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `symbol` | `"🅺 "` | Kotlinのシンボルを表すフォーマット文字列 | -| `style` | `"bold blue"` | モジュールのスタイルです。 | -| `kotlin_binary` | `"kotlin"` | Starshipがバージョンを取得するときに実行するkotlinバイナリを設定します。 | +| `symbol` | `'🅺 '` | Kotlinのシンボルを表すフォーマット文字列 | +| `style` | `'bold blue'` | モジュールのスタイルです。 | +| `kotlin_binary` | `'kotlin'` | Starshipがバージョンを取得するときに実行するkotlinバイナリを設定します。 | | `disabled` | `false` | `kotlin`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | --------- | ---------------------- | -| version | `v1.4.21` | `kotlin`のバージョン | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | --------- | ----------------------- | +| version | `v1.4.21` | `kotlin`のバージョン | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -2031,26 +2161,26 @@ symbol = "∴ " # ~/.config/starship.toml [kotlin] -symbol = "🅺 " +symbol = '🅺 ' ``` ```toml # ~/.config/starship.toml [kotlin] -# Kotlinコンパイラバイナリを使用してバージョンを確認する -kotlin_binary = "kotlinc" +# Uses the Kotlin Compiler binary to get the installed version +kotlin_binary = 'kotlinc' ``` ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. `$KUBECONFIG` 環境変数が設定されている場合、このモジュールは環境変数を優先して使用し、`~/.kube/config` は使用しません。 +Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. 環境変数`$KUBECONFIG`が設定されている場合、このモジュールはそれを利用し、`~/.kube/config`を利用しません。 ::: tip -このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 +このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで `disabled` を `false` に設定します。 -When the module is enabled it will always be active, unless any of `detect_extensions`, `detect_files` or `detect_folders` have been st in which case the module will only be active in directories that match those conditions. +When the module is enabled it will always be active, unless any of `detect_extensions`, `detect_files` or `detect_folders` have been set in which case the module will only be active in directories that match those conditions. ::: @@ -2058,11 +2188,11 @@ When the module is enabled it will always be active, unless any of `detect_exten | オプション | デフォルト | 説明 | | ------------------- | ---------------------------------------------------- | --------------------------------- | -| `symbol` | `"☸ "` | クラスター名の前に表示されるシンボルを表すフォーマット文字列。 | +| `symbol` | `'☸ '` | クラスター名の前に表示されるシンボルを表すフォーマット文字列。 | | `format` | `'[$symbol$context( \($namespace\))]($style) in '` | module のフォーマットです。 | -| `style` | `"cyan bold"` | モジュールのスタイルです。 | -| `context_aliases` | | コンテキストの表示エイリアスを定義するテーブル。 | -| `user_aliases` | | Table of user aliases to display. | +| `style` | `'cyan bold'` | モジュールのスタイルです。 | +| `context_aliases` | `{}` | コンテキストの表示エイリアスを定義するテーブル。 | +| `user_aliases` | `{}` | Table of user aliases to display. | | `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | @@ -2076,7 +2206,7 @@ When the module is enabled it will always be active, unless any of `detect_exten | namespace | `starship-namespace` | 設定されている場合、現在の Kubernetes の namespace 名 | | user | `starship-user` | If set, the current kubernetes user | | cluster | `starship-cluster` | If set, the current kubernetes cluster | -| symbol | | オプション `記号` の値をミラーする | +| symbol | | オプション `symbol` の値をミラーする | | style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -2090,12 +2220,12 @@ When the module is enabled it will always be active, unless any of `detect_exten format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false [kubernetes.context_aliases] -"dev.local.cluster.k8s" = "dev" -".*/openshift-cluster/.*" = "openshift" -"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +'dev.local.cluster.k8s' = 'dev' +'.*/openshift-cluster/.*' = 'openshift' +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' [kubernetes.user_aliases] -"dev.local.cluster.k8s" = "dev" -"root/.*" = "root" +'dev.local.cluster.k8s' = 'dev' +'root/.*' = 'root' ``` Only show the module in directories that contain a `k8s` file. @@ -2119,25 +2249,25 @@ Long and automatically generated cluster names can be identified and shortened u ```toml [kubernetes.context_aliases] # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -".*/openshift-cluster/.*" = "openshift" +'.*/openshift-cluster/.*' = 'openshift' # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$var_cluster" +'.*/(?P[\\w-]+)/.*' = '$var_cluster' # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' ``` ## Line Break -`line_break`モジュールは、プロンプトを2行に分割します。 +`line_break` モジュールは、プロンプトを2行に分割します。 ### オプション -| オプション | デフォルト | 説明 | -| ---------- | ------- | ------------------------------------- | -| `disabled` | `false` | `line_break`モジュールを無効にして、プロンプトを1行にします。 | +| オプション | デフォルト | 説明 | +| ---------- | ------- | -------------------------------------- | +| `disabled` | `false` | `line_break` モジュールを無効にして、プロンプトを1行にします。 | ### 設定例 @@ -2157,8 +2287,8 @@ disabled = true | オプション | デフォルト | 説明 | | ---------- | ------------------------- | ----------------------------------- | | `ssh_only` | `true` | SSHセッションに接続されている場合にのみ、IPアドレスを表示します。 | -| `format` | `"[$localipv4]($style) "` | module のフォーマットです。 | -| `style` | `"bold yellow"` | モジュールのスタイルです。 | +| `format` | `'[$localipv4]($style) '` | module のフォーマットです。 | +| `style` | `'bold yellow'` | モジュールのスタイルです。 | | `disabled` | `true` | `localip`モジュールを無効にします。 | ### 変数 @@ -2177,7 +2307,7 @@ disabled = true [localip] ssh_only = false -format = "@[$localipv4](bold red) " +format = '@[$localipv4](bold red) ' disabled = false ``` @@ -2193,23 +2323,23 @@ disabled = false | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"🌙 "` | Luaのシンボルを表すフォーマット文字列 | -| `detect_extensions` | `["lua"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `[".lua-version"]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `["lua"]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold blue"` | モジュールのスタイルです。 | -| `lua_binary` | `"lua"` | Starshipがバージョンを取得するときに実行するLuaバイナリを設定します。 | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'🌙 '` | Luaのシンボルを表すフォーマット文字列 | +| `detect_extensions` | `['lua']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['.lua-version']` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_folders` | `['lua']` | どのフォルダーがこのモジュールをアクティブにするか | +| `style` | `'bold blue'` | モジュールのスタイルです。 | +| `lua_binary` | `'lua'` | Starshipがバージョンを取得するときに実行するLuaバイナリを設定します。 | | `disabled` | `false` | `lua`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | -------- | ---------------------- | -| version | `v5.4.0` | `lua` のバージョン | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | -------- | ----------------------- | +| version | `v5.4.0` | `lua` のバージョン | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -2219,7 +2349,7 @@ disabled = false # ~/.config/starship.toml [lua] -format = "via [🌕 $version](bold blue) " +format = 'via [🌕 $version](bold blue) ' ``` ## メモリ使用量 @@ -2230,7 +2360,7 @@ format = "via [🌕 $version](bold blue) " ::: tip -このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 +このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで `disabled` を `false` に設定します。 ::: @@ -2239,9 +2369,9 @@ format = "via [🌕 $version](bold blue) " | オプション | デフォルト | 説明 | | ----------- | ----------------------------------------------- | --------------------------- | | `threshold` | `75` | この閾値を超えない限り、メモリ使用率は表示されません。 | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | module のフォーマットです。 | -| `symbol` | `"🐏"` | メモリ使用率を表示する前に使用される記号です。 | -| `style` | `"bold dimmed white"` | モジュールのスタイルです。 | +| `format` | `'via $symbol [${ram}( \| ${swap})]($style) '` | module のフォーマットです。 | +| `symbol` | `'🐏'` | メモリ使用率を表示する前に使用される記号です。 | +| `style` | `'bold dimmed white'` | モジュールのスタイルです。 | | `disabled` | `true` | `memory_usage`モジュールを無効にします。 | ### 変数 @@ -2252,7 +2382,7 @@ format = "via [🌕 $version](bold blue) " | 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 | `🐏` | オプション `記号` の値をミラーする | +| symbol | `🐏` | オプション `symbol` の値をミラーする | | style\* | | オプション `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 @@ -2265,8 +2395,8 @@ format = "via [🌕 $version](bold blue) " [memory_usage] disabled = false threshold = -1 -symbol = " " -style = "bold dimmed green" +symbol = ' ' +style = 'bold dimmed green' ``` ## Meson @@ -2277,21 +2407,21 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. ### オプション -| オプション | デフォルト | 説明 | -| ------------------- | ---------------------------------- | ------------------------------------------------------------------------- | -| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | -| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. `""`で記号なしにできます。 | -| `format` | `"via [$symbol$project]($style) "` | module のフォーマットです。 | -| `symbol` | `"⬢ "` | The symbol used before displaying the project name. | -| `style` | `"blue bold"` | モジュールのスタイルです。 | -| `disabled` | `false` | Disables the `meson` module. | +| オプション | デフォルト | 説明 | +| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- | +| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | +| `format` | `'via [$symbol$project]($style) '` | module のフォーマットです。 | +| `symbol` | `'⬢ '` | The symbol used before displaying the project name. | +| `style` | `'blue bold'` | モジュールのスタイルです。 | +| `disabled` | `false` | Disables the `meson` module. | ### 変数 | 変数 | 設定例 | 説明 | | --------- | ---------- | ------------------------------ | | project | `starship` | The current Meson project name | -| symbol | `🐏` | オプション `記号` の値をミラーする | +| symbol | `🐏` | オプション `symbol` の値をミラーする | | style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -2303,9 +2433,9 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. [meson] disabled = false -truncation_symbol = "--" -symbol = " " -style = "bold dimmed green" +truncation_symbol = '--' +symbol = ' ' +style = 'bold dimmed green' ``` ## Mercurial Branch @@ -2316,11 +2446,11 @@ style = "bold dimmed green" | オプション | デフォルト | 説明 | | ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | -| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | -| `style` | `"bold purple"` | モジュールのスタイルです。 | -| `format` | `"on [$symbol$branch]($style) "` | module のフォーマットです。 | +| `symbol` | `' '` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `style` | `'bold purple'` | モジュールのスタイルです。 | +| `format` | `'on [$symbol$branch]($style) '` | module のフォーマットです。 | | `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | -| `truncation_symbol` | `"…"` | ブランチ名切り捨てられていることを示すための記号です。 | +| `truncation_symbol` | `'…'` | ブランチ名切り捨てられていることを示すための記号です。 | | `disabled` | `true` | Disables the `hg_branch` module. | ### 変数 @@ -2328,7 +2458,7 @@ style = "bold dimmed green" | 変数 | 設定例 | 説明 | | --------- | -------- | --------------------------- | | branch | `master` | The active mercurial branch | -| symbol | | オプション `記号` の値をミラーする | +| symbol | | オプション `symbol` の値をミラーする | | style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -2339,9 +2469,9 @@ style = "bold dimmed green" # ~/.config/starship.toml [hg_branch] -format = "on [🌱 $branch](bold purple)" +format = 'on [🌱 $branch](bold purple)' truncation_length = 4 -truncation_symbol = "" +truncation_symbol = '' ``` ## Nim @@ -2357,22 +2487,22 @@ truncation_symbol = "" | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | -| `detect_extensions` | `["nim", "nims", "nimble"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["nim.cfg"]` | どのファイル名がこのモジュールをアクティブにするか | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'👑 '` | The symbol used before displaying the version of Nim. | +| `detect_extensions` | `['nim', 'nims', 'nimble']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['nim.cfg']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold yellow"` | モジュールのスタイルです。 | +| `style` | `'bold yellow'` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `nim` module. | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | -------- | ---------------------- | -| version | `v1.2.0` | The version of `nimc` | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | -------- | ----------------------- | +| version | `v1.2.0` | The version of `nimc` | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -2382,8 +2512,8 @@ truncation_symbol = "" # ~/.config/starship.toml [nim] -style = "yellow" -symbol = "🎣 " +style = 'yellow' +symbol = '🎣 ' ``` ## Nix-shell @@ -2395,10 +2525,10 @@ symbol = "🎣 " | オプション | デフォルト | 説明 | | ------------ | ---------------------------------------------- | ----------------------------------------------------- | | `format` | `'via [$symbol$state( \($name\))]($style) '` | module のフォーマットです。 | -| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | -| `style` | `"bold blue"` | モジュールのスタイルです。 | -| `impure_msg` | `"impure"` | A format string shown when the shell is impure. | -| `pure_msg` | `"pure"` | A format string shown when the shell is pure. | +| `symbol` | `'❄️ '` | A format string representing the symbol of nix-shell. | +| `style` | `'bold blue'` | モジュールのスタイルです。 | +| `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` | `nix_shell`モジュールを無効にします。 | ### 変数 @@ -2407,7 +2537,7 @@ symbol = "🎣 " | --------- | ------- | -------------------------- | | state | `pure` | The state of the nix-shell | | name | `lorri` | The name of the nix-shell | -| symbol | | オプション `記号` の値をミラーする | +| symbol | | オプション `symbol` の値をミラーする | | style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -2419,8 +2549,8 @@ symbol = "🎣 " [nix_shell] disabled = true -impure_msg = "[impure shell](bold red)" -pure_msg = "[pure shell](bold green)" +impure_msg = '[impure shell](bold red)' +pure_msg = '[pure shell](bold green)' format = 'via [☃️ $state( \($name\))](bold blue) ' ``` @@ -2439,23 +2569,23 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `" "` | A format string representing the symbol of Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts", "mts", "cts"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["package.json", ".node-version"]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `["node_modules"]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold green"` | モジュールのスタイルです。 | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `' '` | A format string representing the symbol of Node.js. | +| `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['package.json', '.node-version']` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_folders` | `['node_modules']` | どのフォルダーがこのモジュールをアクティブにするか | +| `style` | `'bold green'` | モジュールのスタイルです。 | | `disabled` | `false` | `nodejs`モジュールを無効にします。 | | `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | ---------- | ---------------------- | -| version | `v13.12.0` | The version of `node` | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | ---------- | ----------------------- | +| version | `v13.12.0` | The version of `node` | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -2465,7 +2595,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' # ~/.config/starship.toml [nodejs] -format = "via [🤖 $version](bold green) " +format = 'via [🤖 $version](bold green) ' ``` ## OCaml @@ -2483,15 +2613,15 @@ format = "via [🤖 $version](bold green) " | オプション | デフォルト | 説明 | | ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------- | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | モジュールのフォーマット文字列。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | -| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | -| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | -| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `["_opam", "esy.lock"]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold yellow"` | モジュールのスタイルです。 | +| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | モジュールのフォーマット文字列。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'🐫 '` | The symbol used before displaying the version of OCaml. | +| `global_switch_indicator` | `''` | The format string used to represent global OPAM switch. | +| `local_switch_indicator` | `'*'` | The format string used to represent local OPAM switch. | +| `detect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['dune', 'dune-project', 'jbuild', 'jbuild-ignore', '.merlin']` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_folders` | `['_opam', 'esy.lock']` | どのフォルダーがこのモジュールをアクティブにするか | +| `style` | `'bold yellow'` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `ocaml` module. | ### 変数 @@ -2501,7 +2631,7 @@ format = "via [🤖 $version](bold green) " | version | `v4.10.0` | The version of `ocaml` | | switch_name | `my-project` | The active OPAM switch | | switch_indicator | | Mirrors the value of `indicator` for currently active OPAM switch | -| symbol | | オプション `記号` の値をミラーする | +| symbol | | オプション `symbol` の値をミラーする | | style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -2512,7 +2642,43 @@ format = "via [🤖 $version](bold green) " # ~/.config/starship.toml [ocaml] -format = "via [🐪 $version]($style) " +format = 'via [🐪 $version]($style) ' +``` + +## Open Policy Agent + +The `opa` module shows the currently installed version of the OPA tool. By default the module will be shown if the current directory contains a `.rego` file. + +### オプション + +| オプション | デフォルト | 説明 | +| ------------------- | ------------------------------------ | ------------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | +| `detect_extensions` | `['rego']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | +| `style` | `'bold blue'` | モジュールのスタイルです。 | +| `disabled` | `false` | Disables the `opa` module. | + +### 変数 + +| 変数 | 設定例 | 説明 | +| --------- | --------- | ----------------------- | +| version | `v0.44.0` | The version of `opa` | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | + +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 + +### 設定例 + +```toml +# ~/.config/starship.toml + +[opa] +format = 'via [⛑️ $version](bold red) ' ``` ## OpenStack @@ -2524,8 +2690,8 @@ The `openstack` module shows the current OpenStack cloud and project. The module | オプション | デフォルト | 説明 | | ---------- | ----------------------------------------------- | -------------------------------------------------------------- | | `format` | `'on [$symbol$cloud(\($project\))]($style) '` | module のフォーマットです。 | -| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | -| `style` | `"bold yellow"` | モジュールのスタイルです。 | +| `symbol` | `'☁️ '` | The symbol used before displaying the current OpenStack cloud. | +| `style` | `'bold yellow'` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `openstack` module. | ### 変数 @@ -2534,7 +2700,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module | --------- | ------ | ----------------------------- | | cloud | `corp` | The current OpenStack cloud | | project | `dev` | The current OpenStack project | -| symbol | | オプション `記号` の値をミラーする | +| symbol | | オプション `symbol` の値をミラーする | | style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -2546,8 +2712,105 @@ The `openstack` module shows the current OpenStack cloud and project. The module [openstack] format = 'on [$symbol$cloud(\($project\))]($style) ' -style = "bold yellow" -symbol = "☁️ " +style = 'bold yellow' +symbol = '☁️ ' +``` + +## OS + +The `os` module shows the current operating system. OS information is detected via the [os_info](https://lib.rs/crates/os_info) crate. + +::: warning + +The [os_info](https://lib.rs/crates/os_info) crate used by this module is known to be inaccurate on some systems. + +::: + +::: tip + +このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで `disabled` を `false` に設定します。 + +::: + +### オプション + +| オプション | デフォルト | 説明 | +| ---------- | --------------------- | ------------------------------------------------------ | +| `format` | `"[$symbol]($style)"` | module のフォーマットです。 | +| `style` | `"bold white"` | モジュールのスタイルです。 | +| `disabled` | `true` | Disables the `os` module. | +| `symbols` | | A table that maps each operating system to its symbol. | + +`symbols` allows you to define arbitrary symbols to display for each operating system type. Operating system types not defined by your configuration use the default symbols table below. All operating systems currently supported by the module are listed below. If you would like an operating system to be added, feel free to open a [feature request](https://github.com/starship/starship/issues/new/choose). + +```toml +# This is the default symbols table. +[os.symbols] +Alpine = "🏔️ " +Amazon = "🙂 " +Android = "🤖 " +Arch = "🎗️ " +CentOS = "💠 " +Debian = "🌀 " +DragonFly = "🐉 " +Emscripten = "🔗 " +EndeavourOS = "🚀 " +Fedora = "🎩 " +FreeBSD = "😈 " +Garuda = "🦅 " +Gentoo = "🗜️ " +HardenedBSD = "🛡️ " +Illumos = "🐦 " +Linux = "🐧 " +Macos = "🍎 " +Manjaro = "🥭 " +Mariner = "🌊 " +MidnightBSD = "🌘 " +Mint = "🌿 " +NetBSD = "🚩 " +NixOS = "❄️ " +OpenBSD = "🐡 " +openSUSE = "🦎 " +OracleLinux = "🦴 " +Pop = "🍭 " +Raspbian = "🍓 " +Redhat = "🎩 " +RedHatEnterprise = "🎩 " +Redox = "🧪 " +Solus = "⛵ " +SUSE = "🦎 " +Ubuntu = "🎯 " +Unknown = "❓ " +Windows = "🪟 " +``` + +### 変数 + +| 変数 | 設定例 | 説明 | +| --------- | ------------ | ------------------------------------------------------------------ | +| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | +| name | `Arch Linux` | The current operating system name | +| type | `Arch` | The current operating system type | +| codename | | The current operating system codename, if applicable | +| edition | | The current operating system edition, if applicable | +| version | | The current operating system version, if applicable | +| style\* | | オプション `style` の値をミラーする | + +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 + +### 設定例 + +```toml +# ~/.config/starship.toml + +[os] +format = "on [($name )]($style)" +style = "bold blue" +disabled = false + +[os.symbols] +Windows = " " +Arch = "Arch is the best! " ``` ## パッケージのバージョン @@ -2578,10 +2841,10 @@ symbol = "☁️ " | オプション | デフォルト | 説明 | | ----------------- | --------------------------------- | --------------------------------------------------------- | -| `format` | `"is [$symbol$version]($style) "` | module のフォーマットです。 | -| `symbol` | `"📦 "` | パッケージのバージョンを表示する前に使用される記号です。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `style` | `"bold 208"` | モジュールのスタイルです。 | +| `format` | `'is [$symbol$version]($style) '` | module のフォーマットです。 | +| `symbol` | `'📦 '` | パッケージのバージョンを表示する前に使用される記号です。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `style` | `'bold 208'` | モジュールのスタイルです。 | | `display_private` | `false` | Enable displaying version for packages marked as private. | | `disabled` | `false` | `package` モジュールを無効にします。 | @@ -2590,7 +2853,7 @@ symbol = "☁️ " | 変数 | 設定例 | 説明 | | --------- | -------- | --------------------------- | | version | `v1.0.0` | The version of your package | -| symbol | | オプション `記号` の値をミラーする | +| symbol | | オプション `symbol` の値をミラーする | | style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -2601,7 +2864,7 @@ symbol = "☁️ " # ~/.config/starship.toml [package] -format = "via [🎁 $version](208 bold) " +format = 'via [🎁 $version](208 bold) ' ``` ## Perl @@ -2618,22 +2881,22 @@ format = "via [🎁 $version](208 bold) " | オプション | デフォルト | 説明 | | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | モジュールのフォーマット文字列。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | -| `detect_extensions` | `["pl", "pm", "pod"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | どのファイル名がこのモジュールをアクティブにするか | +| `format` | `'via [$symbol($version )]($style)'` | モジュールのフォーマット文字列。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | +| `detect_extensions` | `['pl', 'pm', 'pod']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold 149"` | モジュールのスタイルです。 | +| `style` | `'bold 149'` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `perl` module. | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | --------- | ---------------------- | -| version | `v5.26.1` | The version of `perl` | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | --------- | ----------------------- | +| version | `v5.26.1` | The version of `perl` | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | ### 設定例 @@ -2641,14 +2904,14 @@ format = "via [🎁 $version](208 bold) " # ~/.config/starship.toml [perl] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## PHP `php`モジュールは、現在インストールされている[PHP](https://www.php.net/) のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 -- カレントディレクトリに`composer.json`ファイルが含まれている +- The current directory contains a `composer.json` file - カレントディレクトリに`.php-version`ファイルが含まれている - カレントディレクトリに拡張子が`.php`のファイルが含まれている @@ -2656,22 +2919,22 @@ format = "via [🦪 $version]($style) " | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"🐘 "` | PHPのバージョンを表示する前に使用される記号です。 | -| `detect_extensions` | `["php"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["composer.json", ".php-version"]` | どのファイル名がこのモジュールをアクティブにするか | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'🐘 '` | PHPのバージョンを表示する前に使用される記号です。 | +| `detect_extensions` | `['php']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['composer.json', '.php-version']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"147 bold"` | モジュールのスタイルです。 | +| `style` | `'147 bold'` | モジュールのスタイルです。 | | `disabled` | `false` | `php`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | -------- | ---------------------- | -| version | `v7.3.8` | The version of `php` | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | -------- | ----------------------- | +| version | `v7.3.8` | The version of `php` | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -2681,7 +2944,7 @@ format = "via [🦪 $version]($style) " # ~/.config/starship.toml [php] -format = "via [🔹 $version](147 bold) " +format = 'via [🔹 $version](147 bold) ' ``` ## Pulumi @@ -2703,10 +2966,10 @@ By default the Pulumi version is not shown, since it takes an order of magnitude | オプション | デフォルト | 説明 | | ---------------- | -------------------------------------------- | -------------------------------------------------------------- | -| `format` | `"via [$symbol($username@)$stack]($style) "` | モジュールのフォーマット文字列。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `" "` | A format string shown before the Pulumi stack. | -| `style` | `"bold 5"` | モジュールのスタイルです。 | +| `format` | `'via [$symbol($username@)$stack]($style) '` | モジュールのフォーマット文字列。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `' '` | A format string shown before the Pulumi stack. | +| `style` | `'bold 5'` | モジュールのスタイルです。 | | `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | | `disabled` | `false` | Disables the `pulumi` module. | @@ -2717,7 +2980,7 @@ By default the Pulumi version is not shown, since it takes an order of magnitude | version | `v0.12.24` | The version of `pulumi` | | stack | `dev` | The current Pulumi stack | | username | `alice` | The current Pulumi username | -| symbol | | オプション `記号` の値をミラーする | +| symbol | | オプション `symbol` の値をミラーする | | style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -2730,7 +2993,7 @@ By default the Pulumi version is not shown, since it takes an order of magnitude # ~/.config/starship.toml [pulumi] -format = "[🛥 ($version )$stack]($style) " +format = '[🛥 ($version )$stack]($style) ' ``` #### Without Pulumi version @@ -2738,8 +3001,8 @@ format = "[🛥 ($version )$stack]($style) " ```toml # ~/.config/starship.toml [pulumi] -symbol = "🛥 " -format = "[$symbol$stack]($style) " +symbol = '🛥 ' +format = '[$symbol$stack]($style) ' ``` ## PureScript @@ -2753,13 +3016,13 @@ format = "[$symbol$stack]($style) " | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | -| `detect_extensions` | `["purs"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["spago.dhall"]` | どのファイル名がこのモジュールをアクティブにするか | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'<=> '` | The symbol used before displaying the version of PureScript. | +| `detect_extensions` | `['purs']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['spago.dhall']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold white"` | モジュールのスタイルです。 | +| `style` | `'bold white'` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `purescript` module. | ### 変数 @@ -2767,7 +3030,7 @@ format = "[$symbol$stack]($style) " | 変数 | 設定例 | 説明 | | --------- | -------- | --------------------------- | | version | `0.13.5` | The version of `purescript` | -| symbol | | オプション `記号` の値をミラーする | +| symbol | | オプション `symbol` の値をミラーする | | style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -2778,7 +3041,7 @@ format = "[$symbol$stack]($style) " # ~/.config/starship.toml [purescript] -format = "via [$symbol$version](bold white)" +format = 'via [$symbol$version](bold white)' ``` ## Python @@ -2804,14 +3067,14 @@ The `python` module shows the currently installed version of [Python](https://ww | オプション | デフォルト | 説明 | | -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | | `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | モジュールのスタイルです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'🐍 '` | A format string representing the symbol of Python | +| `style` | `'yellow bold'` | モジュールのスタイルです。 | | `pyenv_version_name` | `false` | pyenvを使用してPythonバージョンを取得します | | `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | -| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `detect_extensions` | `["py"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | どのファイル名がこのモジュールをアクティブにするか | +| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | +| `detect_extensions` | `['py']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | | `disabled` | `false` | `python`モジュールを無効にします。 | @@ -2819,7 +3082,7 @@ The `python` module shows the currently installed version of [Python](https://ww 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. +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. ::: @@ -2827,11 +3090,11 @@ The default values and order for `python_binary` was chosen to first identify th | 変数 | 設定例 | 説明 | | ------------ | --------------- | ------------------------------------------ | -| version | `"v3.8.1"` | The version of `python` | -| symbol | `"🐍 "` | オプション `記号` の値をミラーする | -| style | `"yellow bold"` | オプション `style` の値をミラーする | -| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | -| virtualenv | `"venv"` | The current `virtualenv` name | +| version | `'v3.8.1'` | The version of `python` | +| symbol | `'🐍 '` | オプション `symbol` の値をミラーする | +| style | `'yellow bold'` | オプション `style` の値をミラーする | +| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` | +| virtualenv | `'venv'` | The current `virtualenv` name | ### 設定例 @@ -2839,7 +3102,7 @@ The default values and order for `python_binary` was chosen to first identify th # ~/.config/starship.toml [python] -symbol = "👾 " +symbol = '👾 ' pyenv_version_name = true ``` @@ -2848,7 +3111,7 @@ pyenv_version_name = true [python] # Only use the `python3` binary to get the version. -python_binary = "python3" +python_binary = 'python3' ``` ```toml @@ -2867,7 +3130,7 @@ detect_extensions = [] # # Note this will only work when the venv is inside the project and it will only # work in the directory that contains the venv dir but maybe this is ok? -python_binary = ["./venv/bin/python", "python", "python3", "python2"] +python_binary = ['./venv/bin/python', 'python', 'python3', 'python2'] ``` ## R @@ -2886,22 +3149,22 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"] | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"📐"` | A format string representing the symbol of R. | -| `style` | `"blue bold"` | モジュールのスタイルです。 | -| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `[".Rprofile"]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `[".Rproj.user"]` | どのフォルダーがこのモジュールをアクティブにするか | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'📐'` | A format string representing the symbol of R. | +| `style` | `'blue bold'` | モジュールのスタイルです。 | +| `detect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['.Rprofile']` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_folders` | `['.Rproj.user']` | どのフォルダーがこのモジュールをアクティブにするか | | `disabled` | `false` | Disables the `r` module. | ### 変数 -| 変数 | 設定例 | 説明 | -| ------- | ------------- | ---------------------- | -| version | `v4.0.5` | The version of `R` | -| symbol | | オプション `記号` の値をミラーする | -| style | `"blue bold"` | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| ------- | ------------- | ----------------------- | +| version | `v4.0.5` | The version of `R` | +| symbol | | オプション `symbol` の値をミラーする | +| style | `'blue bold'` | オプション `style` の値をミラーする | ### 設定例 @@ -2909,7 +3172,7 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"] # ~/.config/starship.toml [rlang] -format = "with [📐 $version](blue bold) " +format = 'with [📐 $version](blue bold) ' ``` ## Raku @@ -2923,13 +3186,13 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol($version-$vm_version )]($style)"` | モジュールのフォーマット文字列。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"🦋 "` | The symbol used before displaying the version of Raku | -| `detect_extensions` | `["p6", "pm6", "pod6", "raku", "rakumod"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["META6.json"]` | どのファイル名がこのモジュールをアクティブにするか | +| `format` | `'via [$symbol($version-$vm_version )]($style)'` | モジュールのフォーマット文字列。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'🦋 '` | The symbol used before displaying the version of Raku | +| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['META6.json']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold 149"` | モジュールのスタイルです。 | +| `style` | `'bold 149'` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `raku` module. | ### 変数 @@ -2938,7 +3201,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra | ---------- | ------ | ------------------------------------ | | version | `v6.d` | The version of `raku` | | vm_version | `moar` | The version of VM `raku` is built on | -| symbol | | オプション `記号` の値をミラーする | +| symbol | | オプション `symbol` の値をミラーする | | style\* | | オプション `style` の値をミラーする | ### 設定例 @@ -2947,7 +3210,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra # ~/.config/starship.toml [raku] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## Red @@ -2960,22 +3223,22 @@ format = "via [🦪 $version]($style) " | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | -| `detect_extensions` | `["red"]` | どの拡張子がこのモジュールをアクティブにするか | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'🔺 '` | A format string representing the symbol of Red. | +| `detect_extensions` | `['red']` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"red bold"` | モジュールのスタイルです。 | +| `style` | `'red bold'` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `red` module. | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | -------- | ---------------------- | -| version | `v2.5.1` | The version of `red` | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | -------- | ----------------------- | +| version | `v2.5.1` | The version of `red` | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -2985,7 +3248,7 @@ format = "via [🦪 $version]($style) " # ~/.config/starship.toml [red] -symbol = "🔴 " +symbol = '🔴 ' ``` ## Ruby @@ -2994,7 +3257,7 @@ symbol = "🔴 " - カレントディレクトリに`Gemfile`ファイルが含まれている - カレントディレクトリに `.ruby-version` ファイルが含まれている -- カレントディレクトリに`.rb`の拡張子のファイルが含まれている +- カレントディレクトリに `.rb` ファイルが含まれている - 環境変数に`RUBY_VERSION`または`RBENV_VERSION`が設定されている Starship gets the current Ruby version by running `ruby -v`. @@ -3003,23 +3266,23 @@ Starship gets the current Ruby version by running `ruby -v`. | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"💎 "` | Rubyのシンボルを表すフォーマット文字列. | -| `detect_extensions` | `["rb"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["Gemfile", ".ruby-version"]` | どのファイル名がこのモジュールをアクティブにするか | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'💎 '` | Rubyのシンボルを表すフォーマット文字列. | +| `detect_extensions` | `['rb']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['Gemfile', '.ruby-version']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | -| `style` | `"bold red"` | モジュールのスタイルです。 | +| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Which environment variables should trigger this module. | +| `style` | `'bold red'` | モジュールのスタイルです。 | | `disabled` | `false` | `ruby`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | -------- | ---------------------- | -| version | `v2.5.1` | The version of `ruby` | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | -------- | ----------------------- | +| version | `v2.5.1` | The version of `ruby` | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -3029,7 +3292,7 @@ Starship gets the current Ruby version by running `ruby -v`. # ~/.config/starship.toml [ruby] -symbol = "🔺 " +symbol = '🔺 ' ``` ## Rust @@ -3043,13 +3306,13 @@ symbol = "🔺 " | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"🦀 "` | Rustのシンボルを表すフォーマット文字列 | -| `detect_extensions` | `["rs"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["Cargo.toml"]` | どのファイル名がこのモジュールをアクティブにするか | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'🦀 '` | Rustのシンボルを表すフォーマット文字列 | +| `detect_extensions` | `['rs']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['Cargo.toml']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold red"` | モジュールのスタイルです。 | +| `style` | `'bold red'` | モジュールのスタイルです。 | | `disabled` | `false` | `rust`モジュールを無効にします。 | ### 変数 @@ -3059,7 +3322,7 @@ symbol = "🔺 " | version | `v1.43.0-nightly` | `rustc`のバージョン | | numver | `1.51.0` | The numeric component of the `rustc` version | | toolchain | `beta` | The toolchain version | -| symbol | | オプション `記号` の値をミラーする | +| symbol | | オプション `symbol` の値をミラーする | | style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -3070,7 +3333,7 @@ symbol = "🔺 " # ~/.config/starship.toml [rust] -format = "via [⚙️ $version](red bold)" +format = 'via [⚙️ $version](red bold)' ``` ## Scala @@ -3085,22 +3348,22 @@ format = "via [⚙️ $version](red bold)" | オプション | デフォルト | 説明 | | ------------------- | ---------------------------------------- | ------------------------------------------------------ | -| `format` | `"via [${symbol}(${version} )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `detect_extensions` | `["sbt", "scala"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `[".metals"]` | どのフォルダーがこのモジュールをアクティブにするか | -| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | -| `style` | `"red dimmed"` | モジュールのスタイルです。 | +| `format` | `'via [${symbol}(${version} )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `detect_extensions` | `['sbt', 'scala']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_folders` | `['.metals']` | どのフォルダーがこのモジュールをアクティブにするか | +| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. | +| `style` | `'red dimmed'` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `scala` module. | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | -------- | ---------------------- | -| version | `2.13.5` | The version of `scala` | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | -------- | ----------------------- | +| version | `2.13.5` | The version of `scala` | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -3110,7 +3373,7 @@ format = "via [⚙️ $version](red bold)" # ~/.config/starship.toml [scala] -symbol = "🌟 " +symbol = '🌟 ' ``` ## Shell @@ -3119,7 +3382,7 @@ The `shell` module shows an indicator for currently used shell. ::: tip -このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 +このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで `disabled` を `false` に設定します。 ::: @@ -3127,19 +3390,19 @@ The `shell` module shows an indicator for currently used shell. | オプション | デフォルト | 説明 | | ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `"bsh"` | A format string used to represent bash. | -| `fish_indicator` | `"fsh"` | A format string used to represent fish. | -| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. | -| `powershell_indicator` | `"psh"` | A format string used to represent powershell. | -| `ion_indicator` | `"ion"` | A format string used to represent ion. | -| `elvish_indicator` | `"esh"` | A format string used to represent elvish. | -| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. | -| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. | -| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. | -| `nu_indicator` | `"nu"` | A format string used to represent nu. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `"[$indicator]($style) "` | module のフォーマットです。 | -| `style` | `"white bold"` | モジュールのスタイルです。 | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | module のフォーマットです。 | +| `style` | `'white bold'` | モジュールのスタイルです。 | | `disabled` | `true` | Disables the `shell` module. | ### 変数 @@ -3157,26 +3420,26 @@ The `shell` module shows an indicator for currently used shell. # ~/.config/starship.toml [shell] -fish_indicator = "" -powershell_indicator = "_" -unknown_indicator = "mystery shell" -style = "cyan bold" +fish_indicator = '' +powershell_indicator = '_' +unknown_indicator = 'mystery shell' +style = 'cyan bold' disabled = false ``` ## SHLVL -The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ('shell level') environment variable, if it is set to a number and meets or exceeds the specified threshold. ### オプション | オプション | デフォルト | 説明 | | ----------- | ---------------------------- | ------------------------------------------------------------- | | `threshold` | `2` | Display threshold. | -| `format` | `"[$symbol$shlvl]($style) "` | module のフォーマットです。 | -| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. | +| `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"` | モジュールのスタイルです。 | +| `style` | `'bold yellow'` | モジュールのスタイルです。 | | `disabled` | `true` | Disables the `shlvl` module. | ### 変数 @@ -3184,7 +3447,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int | 変数 | 設定例 | 説明 | | --------- | --- | ---------------------------- | | shlvl | `3` | The current value of `SHLVL` | -| symbol | | オプション `記号` の値をミラーする | +| symbol | | オプション `symbol` の値をミラーする | | style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -3196,7 +3459,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int [shlvl] disabled = false -format = "$shlvl level(s) down" +format = '$shlvl level(s) down' threshold = 3 ``` @@ -3209,8 +3472,8 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | オプション | デフォルト | 説明 | | ---------- | -------------------------------- | ------------------------------------------------ | | `format` | `'[$symbol\[$env\]]($style) '` | module のフォーマットです。 | -| `symbol` | `""` | A format string displayed before the image name. | -| `style` | `"bold dimmed blue"` | モジュールのスタイルです。 | +| `symbol` | `''` | A format string displayed before the image name. | +| `style` | `'bold dimmed blue'` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `singularity` module. | ### 変数 @@ -3218,7 +3481,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | 変数 | 設定例 | 説明 | | --------- | ------------ | ----------------------------- | | env | `centos.img` | The current Singularity image | -| symbol | | オプション `記号` の値をミラーする | +| symbol | | オプション `symbol` の値をミラーする | | style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -3241,9 +3504,9 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | オプション | デフォルト | 説明 | | ------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | | `truncation_length` | `1` | The number of directories the environment path should be truncated to. `0`は切り捨てがないことを意味します。 [`directory`](#directory)もご覧ください。 | -| `symbol` | `"🅢 "` | 環境名の直前に使用されるシンボルです。 | -| `style` | `"bold blue"` | モジュールのスタイルです。 | -| `format` | `"via [$symbol$environment]($style) "` | module のフォーマットです。 | +| `symbol` | `'🅢 '` | 環境名の直前に使用されるシンボルです。 | +| `style` | `'bold blue'` | モジュールのスタイルです。 | +| `format` | `'via [$symbol$environment]($style) '` | module のフォーマットです。 | | `disabled` | `false` | Disables the `spack` module. | ### 変数 @@ -3251,7 +3514,7 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | 変数 | 設定例 | 説明 | | ----------- | ------------ | ----------------------------- | | environment | `astronauts` | The current spack environment | -| symbol | | オプション `記号` の値をミラーする | +| symbol | | オプション `symbol` の値をミラーする | | style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -3262,7 +3525,7 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat # ~/.config/starship.toml [spack] -format = "[$symbol$environment](dimmed blue) " +format = '[$symbol$environment](dimmed blue) ' ``` ## Status @@ -3271,7 +3534,7 @@ The `status` module displays the exit code of the previous command. If $success_ ::: tip -このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 +このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで `disabled` を `false` に設定します。 ::: @@ -3279,14 +3542,14 @@ The `status` module displays the exit code of the previous command. If $success_ | オプション | デフォルト | 説明 | | --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `format` | `"[$symbol$status]($style) "` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `success_symbol` | `""` | The symbol displayed on program success | -| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | -| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | -| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | -| `style` | `"bold red"` | モジュールのスタイルです。 | +| `format` | `'[$symbol$status]($style) '` | The format of the module | +| `symbol` | `'❌'` | The symbol displayed on program error | +| `success_symbol` | `''` | The symbol displayed on program success | +| `not_executable_symbol` | `'🚫'` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `'🔍'` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `'🧱'` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `'⚡'` | The symbol displayed on any signal | +| `style` | `'bold red'` | モジュールのスタイルです。 | | `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code | | `pipestatus` | `false` | Enable pipestatus reporting | @@ -3307,7 +3570,7 @@ The `status` module displays the exit code of the previous command. If $success_ | 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 | | pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format | -| symbol | | オプション `記号` の値をミラーする | +| symbol | | オプション `symbol` の値をミラーする | | style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -3318,9 +3581,9 @@ The `status` module displays the exit code of the previous command. If $success_ # ~/.config/starship.toml [status] -style = "bg:blue" -symbol = "🔴 " -success_symbol = "🟢 SUCCESS" +style = 'bg:blue' +symbol = '🔴 ' +success_symbol = '🟢 SUCCESS' format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false @@ -3332,7 +3595,7 @@ The `sudo` module displays if sudo credentials are currently cached. The module ::: tip -このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 +このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで `disabled` を `false` に設定します。 ::: @@ -3340,18 +3603,18 @@ The `sudo` module displays if sudo credentials are currently cached. The module | オプション | デフォルト | 説明 | | --------------- | ------------------------ | ------------------------------------------------------- | -| `format` | `"[as $symbol]($style)"` | The format of the module | -| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached | -| `style` | `"bold blue"` | モジュールのスタイルです。 | +| `format` | `'[as $symbol]($style)'` | The format of the module | +| `symbol` | `'🧙 '` | The symbol displayed when credentials are cached | +| `style` | `'bold blue'` | モジュールのスタイルです。 | | `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | | `disabled` | `true` | Disables the `sudo` module. | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | --- | ---------------------- | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | --- | ----------------------- | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -3361,8 +3624,8 @@ The `sudo` module displays if sudo credentials are currently cached. The module # ~/.config/starship.toml [sudo] -style = "bold green" -symbol = "👩‍💻 " +style = 'bold green' +symbol = '👩‍💻 ' disabled = false ``` @@ -3386,22 +3649,22 @@ disabled = false | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `detect_extensions` | `["swift"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["Package.swift"]` | どのファイル名がこのモジュールをアクティブにするか | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'🐦 '` | A format string representing the symbol of Swift | +| `detect_extensions` | `['swift']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['Package.swift']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold 202"` | モジュールのスタイルです。 | +| `style` | `'bold 202'` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `swift` module. | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | -------- | ---------------------- | -| version | `v5.2.4` | The version of `swift` | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | -------- | ----------------------- | +| version | `v5.2.4` | The version of `swift` | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -3411,7 +3674,7 @@ disabled = false # ~/.config/starship.toml [swift] -format = "via [🏎 $version](red bold)" +format = 'via [🏎 $version](red bold)' ``` ## Terraform @@ -3433,23 +3696,23 @@ Terraformのバージョンはデフォルトでは表示されません。多 | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol$workspace]($style) "` | モジュールのフォーマット文字列。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"💠"` | ワークスペースの前に表示されるフォーマット文字列。 | -| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | どの拡張子がこのモジュールをアクティブにするか | +| `format` | `'via [$symbol$workspace]($style) '` | モジュールのフォーマット文字列。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'💠'` | ワークスペースの前に表示されるフォーマット文字列。 | +| `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `[".terraform"]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold 105"` | モジュールのスタイルです。 | +| `detect_folders` | `['.terraform']` | どのフォルダーがこのモジュールをアクティブにするか | +| `style` | `'bold 105'` | モジュールのスタイルです。 | | `disabled` | `false` | `terraform` モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | ---------- | ---------------------- | -| version | `v0.12.24` | `terraform` のバージョン | -| workspace | `default` | 現在のTerraformワークスペース | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | ---------- | ----------------------- | +| version | `v0.12.24` | `terraform` のバージョン | +| workspace | `default` | 現在のTerraformワークスペース | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -3461,7 +3724,7 @@ Terraformのバージョンはデフォルトでは表示されません。多 # ~/.config/starship.toml [terraform] -format = "[🏎💨 $version$workspace]($style) " +format = '[🏎💨 $version$workspace]($style) ' ``` #### Terraform バージョン表示なし @@ -3470,7 +3733,7 @@ format = "[🏎💨 $version$workspace]($style) " # ~/.config/starship.toml [terraform] -format = "[🏎💨 $workspace]($style) " +format = '[🏎💨 $workspace]($style) ' ``` ## 時刻 @@ -3479,7 +3742,7 @@ format = "[🏎💨 $workspace]($style) " ::: tip -このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 +このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで `disabled` を `false` に設定します。 ::: @@ -3487,15 +3750,15 @@ format = "[🏎💨 $workspace]($style) " | オプション | デフォルト | 説明 | | ----------------- | ----------------------- | ----------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | モジュールのフォーマット文字列。 | +| `format` | `'at [$time]($style) '` | モジュールのフォーマット文字列。 | | `use_12hr` | `false` | 12時間のフォーマットを有効にします。 | | `time_format` | この表の下を参照してください | 時刻のフォーマットに使用される[クロノフォーマット文字列](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) です。 | -| `style` | `"bold yellow"` | モジュールのスタイルです。 | -| `utc_time_offset` | `"local"` | 使用するUTCオフセットを設定します。 Range from -24 < x < 24. フロートが30/45分のタイムゾーンオフセットに対応できるようにします。 | +| `style` | `'bold yellow'` | モジュールのスタイルです。 | +| `utc_time_offset` | `'local'` | 使用するUTCオフセットを設定します。 Range from -24 < x < 24. フロートが30/45分のタイムゾーンオフセットに対応できるようにします。 | | `disabled` | `true` | `time`モジュールを無効にします。 | -| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | +| `time_range` | `'-'` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | -If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. それ以外の場合、デフォルトは`"%T"`です。 Manually setting `time_format` will override the `use_12hr` setting. +If `use_12hr` is `true`, then `time_format` defaults to `'%r'`. Otherwise, it defaults to `'%T'`. Manually setting `time_format` will override the `use_12hr` setting. ### 変数 @@ -3514,9 +3777,9 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. それ以外の [time] disabled = false format = '🕙[\[ $time \]]($style) ' -time_format = "%T" -utc_time_offset = "-5" -time_range = "10:00:00-14:00:00" +time_format = '%T' +utc_time_offset = '-5' +time_range = '10:00:00-14:00:00' ``` ## ユーザー名 @@ -3538,9 +3801,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | オプション | デフォルト | 説明 | | ------------- | ----------------------- | ------------------------------------------- | -| `style_root` | `"bold red"` | The style used when the user is root/admin. | -| `style_user` | `"bold yellow"` | 非rootユーザーに使用されるスタイルです。 | -| `format` | `"[$user]($style) in "` | module のフォーマットです。 | +| `style_root` | `'bold red'` | The style used when the user is root/admin. | +| `style_user` | `'bold yellow'` | 非rootユーザーに使用されるスタイルです。 | +| `format` | `'[$user]($style) in '` | module のフォーマットです。 | | `show_always` | `false` | `username` モジュールを常に表示します。 | | `disabled` | `false` | `username` モジュールを無効にします。 | @@ -3548,8 +3811,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | 変数 | 設定例 | 説明 | | ------- | ------------ | ------------------------------------------------------------------------------------------- | -| `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. | +| `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. | ### 設定例 @@ -3557,9 +3820,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` # ~/.config/starship.toml [username] -style_user = "white bold" -style_root = "black bold" -format = "user: [$user]($style) " +style_user = 'white bold' +style_root = 'black bold' +format = 'user: [$user]($style) ' disabled = false show_always = true ``` @@ -3574,13 +3837,13 @@ show_always = true | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'⍱ '` | A format string representing the symbol of Vagrant. | | `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["Vagrantfile"]` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_files` | `['Vagrantfile']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"cyan bold"` | モジュールのスタイルです。 | +| `style` | `'cyan bold'` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `vagrant` module. | ### 変数 @@ -3588,7 +3851,7 @@ show_always = true | 変数 | 設定例 | 説明 | | --------- | ---------------- | ------------------------ | | version | `Vagrant 2.2.10` | The version of `Vagrant` | -| symbol | | オプション `記号` の値をミラーする | +| symbol | | オプション `symbol` の値をミラーする | | style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -3599,7 +3862,7 @@ show_always = true # ~/.config/starship.toml [vagrant] -format = "via [⍱ $version](bold white) " +format = 'via [⍱ $version](bold white) ' ``` ## V @@ -3613,29 +3876,29 @@ format = "via [⍱ $version](bold white) " | オプション | デフォルト | 説明 | | ------------------- | -------------------------------------------- | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"V "` | A format string representing the symbol of V | -| `detect_extensions` | `["v"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | どのファイル名がこのモジュールをアクティブにするか | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'V '` | A format string representing the symbol of V | +| `detect_extensions` | `['v']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"blue bold"` | モジュールのスタイルです。 | +| `style` | `'blue bold'` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `vlang` module. | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | ------ | ---------------------- | -| version | `v0.2` | The version of `v` | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | ------ | ----------------------- | +| version | `v0.2` | The version of `v` | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | ### 設定例 ```toml # ~/.config/starship.toml [vlang] -format = "via [V $version](blue bold) " +format = 'via [V $version](blue bold) ' ``` ## VCSH @@ -3646,9 +3909,9 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | オプション | デフォルト | 説明 | | ---------- | -------------------------------- | ------------------------------------------------------ | -| `symbol` | | The symbol used before displaying the repository name. | -| `style` | `"bold yellow"` | モジュールのスタイルです。 | -| `format` | `"vcsh [$symbol$repo]($style) "` | module のフォーマットです。 | +| `symbol` | `''` | The symbol used before displaying the repository name. | +| `style` | `'bold yellow'` | モジュールのスタイルです。 | +| `format` | `'vcsh [$symbol$repo]($style) '` | module のフォーマットです。 | | `disabled` | `false` | Disables the `vcsh` module. | ### 変数 @@ -3656,7 +3919,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | 変数 | 設定例 | 説明 | | --------- | ------------------------------------------- | -------------------------- | | repo | `dotfiles` if in a VCSH repo named dotfiles | The active repository name | -| symbol | | オプション `記号` の値をミラーする | +| symbol | | オプション `symbol` の値をミラーする | | style\* | `black bold dimmed` | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -3667,7 +3930,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v # ~/.config/starship.toml [vcsh] -format = "[🆅 $repo](bold blue) " +format = '[🆅 $repo](bold blue) ' ``` ## Zig @@ -3680,22 +3943,22 @@ format = "[🆅 $repo](bold blue) " | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | モジュールのスタイルです。 | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'↯ '` | The symbol used before displaying the version of Zig. | +| `style` | `'bold yellow'` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `zig` module. | -| `detect_extensions` | `["zig"]` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_extensions` | `['zig']` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | -------- | ---------------------- | -| version | `v0.6.0` | The version of `zig` | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | -------- | ----------------------- | +| version | `v0.6.0` | The version of `zig` | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -3705,7 +3968,7 @@ format = "[🆅 $repo](bold blue) " # ~/.config/starship.toml [zig] -symbol = "⚡️ " +symbol = '⚡️ ' ``` ## Custom commands @@ -3750,16 +4013,16 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | オプション | デフォルト | 説明 | | ------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `command` | `''` | The command whose output should be printed. The command will be passed on stdin to the shell. | | `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. | | `shell` | | [この表の下を参照してください](#custom-command-shell) | -| `説明` | `""` | The description of the module that is shown when running `starship explain`. | +| `説明` | `''` | The description of the module that is shown when running `starship explain`. | | `detect_files` | `[]` | The files that will be searched in the working directory for a match. | | `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. | | `detect_extensions` | `[]` | The extensions that will be searched in the working directory for a match. | -| `symbol` | `""` | The symbol used before displaying the command output. | -| `style` | `"bold green"` | モジュールのスタイルです。 | -| `format` | `"[$symbol($output )]($style)"` | module のフォーマットです。 | +| `symbol` | `''` | The symbol used before displaying the command output. | +| `style` | `'bold green'` | モジュールのスタイルです。 | +| `format` | `'[$symbol($output )]($style)'` | module のフォーマットです。 | | `disabled` | `false` | Disables this `custom` module. | | `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | | `use_stdin` | | An optional boolean value that overrides whether commands should be forwarded to the shell via the standard input or as an argument. If unset standard input is used by default, unless the shell does not support it (cmd, nushell). Setting this disables shell-specific argument handling. | @@ -3770,7 +4033,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | 変数 | 説明 | | --------- | -------------------------------------- | | output | The output of shell command in `shell` | -| symbol | オプション `記号` の値をミラーする | +| symbol | オプション `symbol` の値をミラーする | | style\* | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -3782,14 +4045,14 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt - 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. +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 -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. ```toml -shell = ["pwsh", "-Command", "-"] +shell = ['pwsh', '-Command', '-'] ``` ::: warning Make sure your custom shell configuration exits gracefully @@ -3810,19 +4073,19 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -detect_files = ["foo"] # can specify filters but wildcards are not supported -when = """ test "$HOME" = "$PWD" """ -format = " transcending [$output]($style)" +command = 'echo foo' # shows output of command +detect_files = ['foo'] # can specify filters but wildcards are not supported +when = ''' test "$HOME" = "$PWD" ''' +format = ' transcending [$output]($style)' [custom.time] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command', '-'] [custom.time-as-arg] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command'] use_stdin = false ``` diff --git a/docs/ja-JP/guide/README.md b/docs/ja-JP/guide/README.md index 48dc2be2..8ba15fba 100644 --- a/docs/ja-JP/guide/README.md +++ b/docs/ja-JP/guide/README.md @@ -219,7 +219,6 @@ curl -sS https://starship.rs/install.sh | sh | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | | Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | -| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | @@ -417,6 +416,14 @@ Starshipのさらなるカスタマイズを目指すなら以下を参考にし - **[reujab/silver](https://github.com/reujab/silver)** – アイコンと cross-shell 対応のカスタマイズ可能な powerline ライクなプロンプト。 +## ❤️ Sponsors + +Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website. + +**Supporter Tier** + +- [Dimension](https://dimension.dev/) +


Starship rocket icon diff --git a/docs/ja-JP/presets/README.md b/docs/ja-JP/presets/README.md index 5448391b..76603374 100644 --- a/docs/ja-JP/presets/README.md +++ b/docs/ja-JP/presets/README.md @@ -10,6 +10,14 @@ [![Nerd Font Symbolsプリセットのスクリーンショット](/presets/img/nerd-font-symbols.png "Nerd Font Symbolsプリセットを表示するにはクリックしてください")](./nerd-font) +## [No Nerd Fonts](./no-nerd-font.md) + +This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt. + +::: tip This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). ::: + +[Click to view No Nerd Font preset](./no-nerd-font) + ## [Bracketed Segments](./bracketed-segments.md) このプリセットは付属のモジュール全てのフォーマットを変更し、デフォルトのStarshipの表示("via", "on", etc.)から、それぞれの情報を括弧で区分けするように変更します。 @@ -28,6 +36,12 @@ [![Hide Runtime Versionsプリセットのスクリーンショット](/presets/img/no-runtime-versions.png "No Runtime Versionsプリセットを表示するにはクリックしてください")](./no-runtimes) +## [No Empty Icons](./no-empty-icons.md) + +This preset does not show icons if the toolset is not found. + +[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "No Runtime Versionsプリセットを表示するにはクリックしてください")](./no-empty-icons.md) + ## [Pure Prompt](./pure-preset.md) このプリセットは、[Pure](https://github.com/sindresorhus/pure)の外観と振る舞いをエミュレートします。 @@ -39,3 +53,9 @@ このプリセットは[M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json)にインスパイアされています。 また、starshipでパス置換がどのように機能するかを示しています。 [![Pastel Powerlineプリセットのスクリーンショット](/presets/img/pastel-powerline.png "Pure Promptプリセットを表示するにはクリックしてください")](./pastel-powerline) + +## [Tokyo Night](./tokyo-night.md) + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) diff --git a/docs/ja-JP/presets/no-empty-icons.md b/docs/ja-JP/presets/no-empty-icons.md new file mode 100644 index 00000000..dc0e27cf --- /dev/null +++ b/docs/ja-JP/presets/no-empty-icons.md @@ -0,0 +1,17 @@ +[プリセット一覧に戻る](./README.md#no-empty-icons) + +# No Empty Icons Preset + +If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. + +![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) + +### 設定 + +```sh +starship preset no-empty-icons > ~/.config/starship.toml +``` + +[クリックしてTOMLをダウンロード](/presets/toml/no-empty-icons.toml) + +<<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/ja-JP/presets/no-nerd-font.md b/docs/ja-JP/presets/no-nerd-font.md new file mode 100644 index 00000000..05886afc --- /dev/null +++ b/docs/ja-JP/presets/no-nerd-font.md @@ -0,0 +1,19 @@ +[プリセット一覧に戻る](./README.md#no-nerd-fonts) + +# No Nerd Fonts Preset + +This preset restricts the use of symbols to those from emoji and powerline sets. + +This means that even without a Nerd Font installed, you should be able to view all module symbols. + +This preset will become the default preset in a future release of starship. + +### 設定 + +```sh +starship preset no-nerd-font > ~/.config/starship.toml +``` + +[クリックしてTOMLをダウンロード](/presets/toml/no-nerd-font.toml) + +<<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/ja-JP/presets/tokyo-night.md b/docs/ja-JP/presets/tokyo-night.md new file mode 100644 index 00000000..60153e2e --- /dev/null +++ b/docs/ja-JP/presets/tokyo-night.md @@ -0,0 +1,21 @@ +[プリセット一覧に戻る](./README.md#pastel-powerline) + +# Tokyo Night Preset + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) + +### 必要なもの + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal + +### 設定 + +```sh +starship preset tokyo-night > ~/.config/starship.toml +``` + +[クリックしてTOMLをダウンロード](/presets/toml/tokyo-night.toml) + +<<< @/.vuepress/public/presets/toml/tokyo-night.toml diff --git a/docs/ko-KR/advanced-config/README.md b/docs/ko-KR/advanced-config/README.md index cacaad68..cb717320 100644 --- a/docs/ko-KR/advanced-config/README.md +++ b/docs/ko-KR/advanced-config/README.md @@ -205,7 +205,9 @@ Some shells support a right prompt which renders on the same line as the input. Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](/config/#fill). -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. + +Note: Nushell 0.71.0 or later is required ### Example @@ -280,5 +282,5 @@ If multiple colors are specified for foreground/background, the last one in the Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: - Many terminals disable support for `blink` by default -- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564). +- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). - `strikethrough` is not supported by the default macOS Terminal.app diff --git a/docs/ko-KR/config/README.md b/docs/ko-KR/config/README.md index e9f96890..63a5e67b 100644 --- a/docs/ko-KR/config/README.md +++ b/docs/ko-KR/config/README.md @@ -15,15 +15,17 @@ All configuration for starship is done in this [TOML](https://github.com/toml-la # Inserts a blank line between shell prompts add_newline = true -# Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +# 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 ``` +### Config File Location + You can change default configuration file location with `STARSHIP_CONFIG` environment variable: ```sh @@ -70,6 +72,62 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. +### Strings + +In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. + +The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. + +| Symbol | Type | Notes | +| ------ | ------------------------- | ------------------------------------------------------ | +| `'` | literal string | less escaping | +| `"` | string | more escaping | +| `'''` | multi-line literal string | less escaping | +| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | + +For example: + +```toml +# literal string +format = '☺\☻ ' + +# regular string +format = "☺\\☻ " + +# escaping Starship symbols +format = '\[\$\] ' +``` + +When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: + +```toml +# with literal string +format = ''' + +\$''' + +# with multiline basic string +format = """ + +\\$""" + +# with basic string +format = "\n\\$" +``` + +In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. + +```toml +format = """ +line1\ +line1\ +line1 +line2\ +line2\ +line2 +""" +``` + ### Format Strings Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. @@ -80,9 +138,9 @@ A variable contains a `$` symbol followed by the name of the variable. The name 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. +- `'$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 @@ -94,20 +152,20 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri 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. +- `'[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 +- `'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. @@ -117,43 +175,20 @@ A conditional format string wrapped in `(` and `)` will not render if all variab For example: -- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. -- `(some text)` will always show nothing since there are no variables wrapped in the braces. -- 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\] )`. - -#### Special characters - -The following symbols have special usage in a format string and must be escaped: `$ \ [ ] ( )`. - -Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). - -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 = ''' - -\$''' -``` +- `'(@$region)'` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. +- `'(some text)'` will always show nothing since there are no variables wrapped in the braces. +- When `$combined` is a shortcut for `\[$a$b\]`, `'($combined)'` will show nothing only if `$a` and `$b` are both `None`. This works the same as `'(\[$a$b\] )'`. ### Negative matching -Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched. +Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading '!' character. The presence of _any_ negative indicator in the directory will result in the module not being matched. Extensions are matched against both the characters after the last dot in a filename, and the characters after the first dot in a filename. For example, `foo.bar.tar.gz` will be matched against `bar.tar.gz` and `gz` in the `detect_extensions` variable. Files whose name begins with a dot are not considered to have extensions at all. To see how this works in practice, you could match TypeScript but not MPEG Transport Stream files thus: ```toml -detect_extensions = ["ts", "!video.ts", "!audio.ts"] +detect_extensions = ['ts', '!video.ts', '!audio.ts'] ``` ## Prompt @@ -165,11 +200,11 @@ This is the list of prompt-wide configuration options. | Option | Default | Description | | ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `format` | [link](#default-prompt-format) | Configure the format of the prompt. | -| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | +| `right_format` | `''` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | | `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Inserts blank line between shell prompts. | -| `palette` | `""` | Sets which color palette from `palettes` to use. | +| `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | ### Example @@ -178,10 +213,10 @@ This is the list of prompt-wide configuration options. # ~/.config/starship.toml # Use custom format -format = """ +format = ''' [┌───────────────────>](bold green) [│](bold green)$directory$rust$package -[└─>](bold green) """ +[└─>](bold green) ''' # Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 @@ -189,15 +224,15 @@ scan_timeout = 10 # Disable the blank line at the start of the prompt add_newline = false -# Set "foo" as custom color palette -palette = "foo" +# Set 'foo' as custom color palette +palette = 'foo' # Define custom colors [palettes.foo] # Overwrite existing color -blue = "21" +blue = '21' # Define new color -mustard = "#af8700" +mustard = '#af8700' ``` ### Default Prompt Format @@ -205,7 +240,7 @@ mustard = "#af8700" 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" +format = '$all' # Which is equivalent to format = """ @@ -236,7 +271,9 @@ $elixir\ $elm\ $erlang\ $golang\ +$guix_shell\ $haskell\ +$haxe\ $helm\ $java\ $julia\ @@ -245,6 +282,7 @@ $lua\ $nim\ $nodejs\ $ocaml\ +$opa\ $perl\ $php\ $pulumi\ @@ -281,6 +319,7 @@ $jobs\ $battery\ $time\ $status\ +$os\ $container\ $shell\ $character""" @@ -290,7 +329,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format = "$all$directory$character" +format = '$all$directory$character' ``` ## AWS @@ -305,15 +344,17 @@ When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. +When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. + ### Options | Option | Default | Description | | ------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | -| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | -| `profile_aliases` | | Table of profile aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | The style 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. | +| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | +| `style` | `'bold yellow'` | The style for the module. | | `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Disables the `AWS` module. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -339,11 +380,11 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL [aws] format = 'on [$symbol($profile )(\($region\) )]($style)' -style = "bold blue" -symbol = "🅰 " +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' [aws.profile_aliases] CompanyGroupFrobozzOnCallAccess = 'Frobozz' ``` @@ -354,12 +395,12 @@ CompanyGroupFrobozzOnCallAccess = 'Frobozz' # ~/.config/starship.toml [aws] -format = "on [$symbol$region]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$region]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' ``` #### Display profile @@ -368,34 +409,48 @@ us-east-1 = "va" # ~/.config/starship.toml [aws] -format = "on [$symbol$profile]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$profile]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.profile_aliases] Enterprise_Naming_Scheme-voidstars = 'void**' ``` ## Azure -The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription, as defined in the `~/.azure/azureProfile.json` file. +The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription or the username, as defined in the `~/.azure/azureProfile.json` file. ### Options | Variable | Default | Description | | ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `"on [$symbol($subscription)]($style) "` | The format for the Azure module to render. | -| `symbol` | `"ﴃ "` | The symbol used in the format. | -| `style` | `"blue bold"` | The style used in the format. | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'ﴃ '` | The symbol used in the format. | +| `style` | `'blue bold'` | The style used in the format. | | `disabled` | `true` | Disables the `azure` module. | -### Example +### Examples + +#### Display Subscription Name ```toml # ~/.config/starship.toml [azure] disabled = false -format = "on [$symbol($subscription)]($style) " +format = 'on [$symbol($subscription)]($style) ' +symbol = 'ﴃ ' +style = 'blue bold' +``` + +#### Display Username + +```toml +# ~/.config/starship.toml + +[azure] +disabled = false +format = "on [$symbol($username)]($style) " symbol = "ﴃ " style = "blue bold" ``` @@ -408,12 +463,12 @@ The `battery` module shows how charged the device's battery is and its current c | 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. | +| `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. | @@ -423,9 +478,9 @@ The `battery` module shows how charged the device's battery is and its current c # ~/.config/starship.toml [battery] -full_symbol = "🔋 " -charging_symbol = "⚡️ " -discharging_symbol = "💀 " +full_symbol = '🔋 ' +charging_symbol = '⚡️ ' +discharging_symbol = '💀 ' ``` ### Battery Display @@ -435,7 +490,7 @@ The `display` configuration option is used to define when the battery indicator ```toml [[battery.display]] threshold = 10 -style = "bold red" +style = 'bold red' ``` The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. @@ -447,21 +502,21 @@ The `display` option is an array of the following table. | Option | Default | Description | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | | `threshold` | `10` | The upper bound for the display option. | -| `style` | `"red bold"` | The style used if the display option is in use. | +| `style` | `'red bold'` | The style used if the display option is in use. | | `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. | | `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. | #### Example ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% threshold = 10 -style = "bold red" +style = 'bold red' -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% threshold = 30 -style = "bold yellow" -discharging_symbol = "💦" +style = 'bold yellow' +discharging_symbol = '💦' # when capacity is over 30%, the battery indicator will not be displayed ``` @@ -477,13 +532,13 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil | Option | Default | Description | | ------------------- | ----------------------------------------------- | ----------------------------------------------------- | -| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. | -| `version_format` | `"v${raw}"` | The version format. | -| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. | +| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. | +| `version_format` | `'v${raw}'` | The version format. | +| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | -| `style` | `"bold blue"` | The style for the module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `elixir` module. | ### Variables @@ -502,7 +557,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil # ~/.config/starship.toml [buf] -symbol = "🦬 " +symbol = '🦬 ' ``` ## Bun @@ -516,13 +571,13 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🍞 "` | A format string representing the symbol of Node.js. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["bun.lockb", "bunfig.toml"]` | Which filenames should trigger this module. | +| `detect_files` | `['bun.lockb', 'bunfig.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | The style for the module. | +| `style` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `bun` module. | ### Variables @@ -541,7 +596,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. # ~/.config/starship.toml [bun] -format = "via [🍔 $version](bold green) " +format = 'via [🍔 $version](bold green) ' ``` ## C @@ -552,14 +607,14 @@ The `c` module shows some information about your C compiler. By default the modu | Option | Default | Description | | ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version(-$name) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"C "` | The symbol used before displaying the compiler details | -| `detect_extensions` | `["c", "h"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ "cc", "--version" ], [ "gcc", "--version" ], [ "clang", "--version" ] ] | How to detect what the compiler is | -| `style` | `"bold 149"` | The style for the module. | +| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | +| `style` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `c` module. | ### Variables @@ -577,7 +632,7 @@ NB that `version` is not in the default format. The `commands` option accepts a list of commands to determine the compiler version and name. -Each command is represented as a list of the executable name, followed by its arguments, usually something like `["mycc", "--version"]`. Starship will try executing each command until it gets a result on STDOUT. +Each command is represented as a list of the executable name, followed by its arguments, usually something like `['mycc', '--version']`. Starship will try executing each command until it gets a result on STDOUT. If a C compiler is not supported by this module, you can request it by [raising an issue on GitHub](https://github.com/starship/starship/). @@ -587,7 +642,7 @@ If a C compiler is not supported by this module, you can request it by [raising # ~/.config/starship.toml [c] -format = "via [$name $version]($style)" +format = 'via [$name $version]($style)' ``` ## Character @@ -611,13 +666,13 @@ By default it only changes color. If you also want to change its shape take a lo | 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. | -| `vimcmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | -| `vimcmd_replace_one_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim `replace_one` mode. | -| `vimcmd_replace_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim replace mode. | -| `vimcmd_visual_symbol` | `"[❮](bold yellow)"` | The format string used before the text input if the shell is in vim replace mode. | +| `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. | +| `vimcmd_symbol` | `'[❮](bold green)'` | The format string used before the text input if the shell is in vim normal mode. | +| `vimcmd_replace_one_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim `replace_one` mode. | +| `vimcmd_replace_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim replace mode. | +| `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | | `disabled` | `false` | Disables the `character` module. | ### Variables @@ -634,8 +689,8 @@ By default it only changes color. If you also want to change its shape take a lo # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[✗](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[✗](bold red) ' ``` #### Without custom error shape @@ -644,8 +699,8 @@ error_symbol = "[✗](bold red) " # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[➜](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[➜](bold red) ' ``` #### With custom vim shape @@ -654,7 +709,7 @@ error_symbol = "[➜](bold red) " # ~/.config/starship.toml [character] -vicmd_symbol = "[V](bold green) " +vicmd_symbol = '[V](bold green) ' ``` ## CMake @@ -668,13 +723,13 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | Option | Default | Description | | ------------------- | -------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"△ "` | The symbol used before the version of cmake. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'△ '` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this module | -| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | +| `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | -| `style` | `"bold blue"` | The style for the module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -698,11 +753,11 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold blue"` | The style for the module. | -| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Which extensions should trigger this module. | +| `symbol` | `'⚙️ '` | The symbol used before displaying the version of COBOL. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold blue'` | The style for the module. | +| `detect_extensions` | `['cbl', 'cob', 'CBL', 'COB']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `cobol` module. | @@ -735,8 +790,8 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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. | +| `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). | @@ -758,7 +813,7 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec [cmd_duration] min_time = 500 -format = "underwent [$duration](bold yellow)" +format = 'underwent [$duration](bold yellow)' ``` ## Conda @@ -776,9 +831,9 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | 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. | +| `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. | @@ -798,7 +853,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c # ~/.config/starship.toml [conda] -format = "[$symbol$environment](dimmed green) " +format = '[$symbol$environment](dimmed green) ' ``` ## Container @@ -809,8 +864,8 @@ The `container` module displays a symbol and container name, if inside a contain | Option | Default | Description | | ---------- | ---------------------------------- | ----------------------------------------- | -| `symbol` | `"⬢"` | The symbol shown, when inside a container | -| `style` | `"bold red dimmed"` | The style for the module. | +| `symbol` | `'⬢'` | The symbol shown, when inside a container | +| `style` | `'bold red dimmed'` | The style for the module. | | `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `container` module. | @@ -844,12 +899,12 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold red"` | The style for the module. | -| `detect_extensions` | `["cr"]` | Which extensions should trigger this module. | -| `detect_files` | `["shard.yml"]` | Which filenames should trigger this module. | +| `symbol` | `'🔮 '` | The symbol used before displaying the version of crystal. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold red'` | The style for the module. | +| `detect_extensions` | `['cr']` | Which extensions should trigger this module. | +| `detect_files` | `['shard.yml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `crystal` module. | @@ -869,7 +924,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// # ~/.config/starship.toml [crystal] -format = "via [✨ $version](bold blue) " +format = 'via [✨ $version](bold blue) ' ``` ## Daml @@ -882,12 +937,12 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"Λ "` | A format string representing the symbol of Daml | -| `style` | `"bold cyan"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'Λ '` | A format string representing the symbol of Daml | +| `style` | `'bold cyan'` | The style for the module. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['daml.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `daml` module. | @@ -907,7 +962,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d # ~/.config/starship.toml [daml] -format = "via [D $version](bold bright-green) " +format = 'via [D $version](bold bright-green) ' ``` ## Dart @@ -922,13 +977,13 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | Option | Default | Description | | ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `detect_extensions` | `["dart"]` | Which extensions should trigger this module. | -| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".dart_tool"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🎯 '` | A format string representing the symbol of Dart | +| `detect_extensions` | `['dart']` | Which extensions should trigger this module. | +| `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | Which filenames should trigger this module. | +| `detect_folders` | `['.dart_tool']` | Which folders should trigger this module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -947,7 +1002,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d # ~/.config/starship.toml [dart] -format = "via [🔰 $version](bold red) " +format = 'via [🔰 $version](bold red) ' ``` ## Deno @@ -960,13 +1015,13 @@ The `deno` module shows you your currently installed version of [Deno](https://d | Option | Default | Description | | ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦕 "` | A format string representing the symbol of Deno | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦕 '` | A format string representing the symbol of Deno | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["deno.json", "deno.jsonc", "mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. | +| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"green bold"` | The style for the module. | +| `style` | `'green bold'` | The style for the module. | | `disabled` | `false` | Disables the `deno` module. | ### Variables @@ -983,7 +1038,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d # ~/.config/starship.toml [deno] -format = "via [🦕 $version](green bold) " +format = 'via [🦕 $version](green bold) ' ``` ## Directory @@ -996,20 +1051,21 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### 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: "…/" | -| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | -| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) | +| 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: '…/' | +| `before_repo_root_style` | | The style for the path segment above the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `'[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) '` | The format of a git repo when `before_repo_root_style` and `repo_root_style` is defined. | +| `home_symbol` | `'~'` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |

This module has a few advanced configuration options that control how the directory is displayed. @@ -1024,8 +1080,8 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ```toml [directory.substitutions] -"/Volumes/network/path" = "/net" -"src/com/long/java/path" = "mypath" +'/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`. @@ -1036,8 +1092,8 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | Variable | Example | Description | | --------- | --------------------- | ----------------------------------- | -| path | `"D:/Projects"` | The current directory path | -| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | +| 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 @@ -1048,11 +1104,11 @@ Let us consider the path `/path/to/home/git_repo/src/lib` | Variable | Example | Description | | ------------------ | --------------------- | --------------------------------------- | -| before_root_path | `"/path/to/home/"` | The path before git root directory path | -| repo_root | `"git_repo"` | The git root directory name | -| path | `"/src/lib"` | The remaining path | -| style | `"black bold dimmed"` | Mirrors the value of option `style` | -| repo_root_style | `"underline white"` | Style for git root directory name | +| before_root_path | `'/path/to/home/'` | The path before git root directory path | +| repo_root | `'git_repo'` | The git root directory name | +| path | `'/src/lib'` | The remaining path | +| style | `'black bold dimmed'` | Mirrors the value of option `style` | +| repo_root_style | `'underline white'` | Style for git root directory name |
@@ -1063,7 +1119,7 @@ Let us consider the path `/path/to/home/git_repo/src/lib` [directory] truncation_length = 8 -truncation_symbol = "…/" +truncation_symbol = '…/' ``` ## Docker Context @@ -1074,13 +1130,13 @@ The `docker_context` module shows the currently active [Docker context](https:// | Option | Default | Description | | ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `format` | `'via [$symbol$context]($style) '` | The format for the module. | +| `symbol` | `'🐳 '` | The symbol used before displaying the Docker context. | | `only_with_files` | `true` | Only show when there's a match | | `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | +| `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | Which filenames should trigger this module (needs `only_with_files` to be true). | | `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | -| `style` | `"blue bold"` | The style for the module. | +| `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -1099,7 +1155,7 @@ The `docker_context` module shows the currently active [Docker context](https:// # ~/.config/starship.toml [docker_context] -format = "via [🐋 $context](blue bold)" +format = 'via [🐋 $context](blue bold)' ``` ## Dotnet @@ -1127,14 +1183,14 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$var_cluster" +'dev.local.cluster.k8s' = 'dev' +'.*/openshift-cluster/.*' = 'openshift' +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' [kubernetes.user_aliases] -"dev.local.cluster.k8s" = "dev" -"root/.*" = "root" +'dev.local.cluster.k8s' = 'dev' +'root/.*' = 'root' ``` Only show the module in directories that contain a `k8s` file. @@ -2121,14 +2249,14 @@ Long and automatically generated cluster names can be identified and shortened u ```toml [kubernetes.context_aliases] # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -".*/openshift-cluster/.*" = "openshift" +'.*/openshift-cluster/.*' = 'openshift' # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$var_cluster" +'.*/(?P[\\w-]+)/.*' = '$var_cluster' # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' ``` ## Line Break @@ -2159,8 +2287,8 @@ The `localip` module shows the IPv4 address of the primary network interface. | Option | Default | Description | | ---------- | ------------------------- | ------------------------------------------------------ | | `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | The style for the module. | +| `format` | `'[$localipv4]($style) '` | The format for the module. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `true` | Disables the `localip` module. | ### Variables @@ -2179,7 +2307,7 @@ The `localip` module shows the IPv4 address of the primary network interface. [localip] ssh_only = false -format = "@[$localipv4](bold red) " +format = '@[$localipv4](bold red) ' disabled = false ``` @@ -2195,14 +2323,14 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | Option | Default | Description | | ------------------- | ------------------------------------ | -------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | -| `detect_extensions` | `["lua"]` | Which extensions should trigger this module. | -| `detect_files` | `[".lua-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["lua"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | -| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🌙 '` | A format string representing the symbol of Lua. | +| `detect_extensions` | `['lua']` | Which extensions should trigger this module. | +| `detect_files` | `['.lua-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['lua']` | Which folders should trigger this module. | +| `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 @@ -2221,7 +2349,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o # ~/.config/starship.toml [lua] -format = "via [🌕 $version](bold blue) " +format = 'via [🌕 $version](bold blue) ' ``` ## Memory Usage @@ -2241,9 +2369,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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. | +| `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 @@ -2267,8 +2395,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y [memory_usage] disabled = false threshold = -1 -symbol = " " -style = "bold dimmed green" +symbol = ' ' +style = 'bold dimmed green' ``` ## Meson @@ -2282,10 +2410,10 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. | Option | Default | Description | | ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- | | `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | -| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. | -| `format` | `"via [$symbol$project]($style) "` | The format for the module. | -| `symbol` | `"⬢ "` | The symbol used before displaying the project name. | -| `style` | `"blue bold"` | The style for the module. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | +| `format` | `'via [$symbol$project]($style) '` | The format for the module. | +| `symbol` | `'⬢ '` | The symbol used before displaying the project name. | +| `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `meson` module. | ### Variables @@ -2305,9 +2433,9 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. [meson] disabled = false -truncation_symbol = "--" -symbol = " " -style = "bold dimmed green" +truncation_symbol = '--' +symbol = ' ' +style = 'bold dimmed green' ``` ## Mercurial Branch @@ -2318,11 +2446,11 @@ The `hg_branch` module shows the active branch of the repo in your current direc | 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. | +| `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 `N` graphemes | -| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a branch name was truncated. | | `disabled` | `true` | Disables the `hg_branch` module. | ### Variables @@ -2341,9 +2469,9 @@ The `hg_branch` module shows the active branch of the repo in your current direc # ~/.config/starship.toml [hg_branch] -format = "on [🌱 $branch](bold purple)" +format = 'on [🌱 $branch](bold purple)' truncation_length = 4 -truncation_symbol = "" +truncation_symbol = '' ``` ## Nim @@ -2359,13 +2487,13 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | -| `detect_extensions` | `["nim", "nims", "nimble"]` | Which extensions should trigger this module. | -| `detect_files` | `["nim.cfg"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'👑 '` | The symbol used before displaying the version of Nim. | +| `detect_extensions` | `['nim', 'nims', 'nimble']` | Which extensions should trigger this module. | +| `detect_files` | `['nim.cfg']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | The style for the module. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `nim` module. | ### Variables @@ -2384,8 +2512,8 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang # ~/.config/starship.toml [nim] -style = "yellow" -symbol = "🎣 " +style = 'yellow' +symbol = '🎣 ' ``` ## Nix-shell @@ -2397,10 +2525,10 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | 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. | +| `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 @@ -2421,8 +2549,8 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ [nix_shell] disabled = true -impure_msg = "[impure shell](bold red)" -pure_msg = "[pure shell](bold green)" +impure_msg = '[impure shell](bold red)' +pure_msg = '[pure shell](bold green)' format = 'via [☃️ $state( \($name\))](bold blue) ' ``` @@ -2441,13 +2569,13 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | Option | Default | Description | | ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string representing the symbol of Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts", "mts", "cts"]` | Which extensions should trigger this module. | -| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | -| `style` | `"bold green"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string representing the symbol of Node.js. | +| `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Which extensions should trigger this module. | +| `detect_files` | `['package.json', '.node-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['node_modules']` | Which folders should trigger this module. | +| `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 package.json does not match the Node.js version. | @@ -2467,7 +2595,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n # ~/.config/starship.toml [nodejs] -format = "via [🤖 $version](bold green) " +format = 'via [🤖 $version](bold green) ' ``` ## OCaml @@ -2485,15 +2613,15 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | Option | Default | Description | | ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | -| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | -| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | -| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Which extensions should trigger this module. | -| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Which filenames should trigger this module. | -| `detect_folders` | `["_opam", "esy.lock"]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | The style for the module. | +| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐫 '` | The symbol used before displaying the version of OCaml. | +| `global_switch_indicator` | `''` | The format string used to represent global OPAM switch. | +| `local_switch_indicator` | `'*'` | The format string used to represent local OPAM switch. | +| `detect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | Which extensions should trigger this module. | +| `detect_files` | `['dune', 'dune-project', 'jbuild', 'jbuild-ignore', '.merlin']` | Which filenames should trigger this module. | +| `detect_folders` | `['_opam', 'esy.lock']` | Which folders should trigger this module. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `ocaml` module. | ### Variables @@ -2514,7 +2642,43 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam # ~/.config/starship.toml [ocaml] -format = "via [🐪 $version]($style) " +format = 'via [🐪 $version]($style) ' +``` + +## Open Policy Agent + +The `opa` module shows the currently installed version of the OPA tool. By default the module will be shown if the current directory contains a `.rego` file. + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | +| `detect_extensions` | `['rego']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'bold blue'` | The style for the module. | +| `disabled` | `false` | Disables the `opa` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.44.0` | The version of `opa` | +| symbol | | Mirrors the 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 + +[opa] +format = 'via [⛑️ $version](bold red) ' ``` ## OpenStack @@ -2526,8 +2690,8 @@ The `openstack` module shows the current OpenStack cloud and project. The module | Option | Default | Description | | ---------- | ----------------------------------------------- | -------------------------------------------------------------- | | `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | -| `style` | `"bold yellow"` | The style for the module. | +| `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 @@ -2548,8 +2712,105 @@ The `openstack` module shows the current OpenStack cloud and project. The module [openstack] format = 'on [$symbol$cloud(\($project\))]($style) ' -style = "bold yellow" -symbol = "☁️ " +style = 'bold yellow' +symbol = '☁️ ' +``` + +## OS + +The `os` module shows the current operating system. OS information is detected via the [os_info](https://lib.rs/crates/os_info) crate. + +::: warning + +The [os_info](https://lib.rs/crates/os_info) crate used by this module is known to be inaccurate on some systems. + +::: + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ---------- | --------------------- | ------------------------------------------------------ | +| `format` | `"[$symbol]($style)"` | The format for the module. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `true` | Disables the `os` module. | +| `symbols` | | A table that maps each operating system to its symbol. | + +`symbols` allows you to define arbitrary symbols to display for each operating system type. Operating system types not defined by your configuration use the default symbols table below. All operating systems currently supported by the module are listed below. If you would like an operating system to be added, feel free to open a [feature request](https://github.com/starship/starship/issues/new/choose). + +```toml +# This is the default symbols table. +[os.symbols] +Alpine = "🏔️ " +Amazon = "🙂 " +Android = "🤖 " +Arch = "🎗️ " +CentOS = "💠 " +Debian = "🌀 " +DragonFly = "🐉 " +Emscripten = "🔗 " +EndeavourOS = "🚀 " +Fedora = "🎩 " +FreeBSD = "😈 " +Garuda = "🦅 " +Gentoo = "🗜️ " +HardenedBSD = "🛡️ " +Illumos = "🐦 " +Linux = "🐧 " +Macos = "🍎 " +Manjaro = "🥭 " +Mariner = "🌊 " +MidnightBSD = "🌘 " +Mint = "🌿 " +NetBSD = "🚩 " +NixOS = "❄️ " +OpenBSD = "🐡 " +openSUSE = "🦎 " +OracleLinux = "🦴 " +Pop = "🍭 " +Raspbian = "🍓 " +Redhat = "🎩 " +RedHatEnterprise = "🎩 " +Redox = "🧪 " +Solus = "⛵ " +SUSE = "🦎 " +Ubuntu = "🎯 " +Unknown = "❓ " +Windows = "🪟 " +``` + +### Variables + +| Variable | Example | Description | +| --------- | ------------ | ------------------------------------------------------------------ | +| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | +| name | `Arch Linux` | The current operating system name | +| type | `Arch` | The current operating system type | +| codename | | The current operating system codename, if applicable | +| edition | | The current operating system edition, if applicable | +| version | | The current operating system version, if applicable | +| 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 + +[os] +format = "on [($name )]($style)" +style = "bold blue" +disabled = false + +[os.symbols] +Windows = " " +Arch = "Arch is the best! " ``` ## Package Version @@ -2580,10 +2841,10 @@ The `package` module is shown when the current directory is the repository for a | Option | Default | Description | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"is [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold 208"` | The style for the module. | +| `format` | `'is [$symbol$version]($style) '` | The format for the module. | +| `symbol` | `'📦 '` | The symbol used before displaying the version the package. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `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. | @@ -2603,7 +2864,7 @@ The `package` module is shown when the current directory is the repository for a # ~/.config/starship.toml [package] -format = "via [🎁 $version](208 bold) " +format = 'via [🎁 $version](208 bold) ' ``` ## Perl @@ -2620,13 +2881,13 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe | Option | Default | Description | | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | -| `detect_extensions` | `["pl", "pm", "pod"]` | Which extensions should trigger this module. | -| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | +| `detect_extensions` | `['pl', 'pm', 'pod']` | Which extensions should trigger this module. | +| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | The style for the module. | +| `style` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `perl` module. | ### Variables @@ -2643,7 +2904,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe # ~/.config/starship.toml [perl] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## PHP @@ -2658,13 +2919,13 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | -| `detect_extensions` | `["php"]` | Which extensions should trigger this module. | -| `detect_files` | `["composer.json", ".php-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐘 '` | The symbol used before displaying the version of PHP. | +| `detect_extensions` | `['php']` | Which extensions should trigger this module. | +| `detect_files` | `['composer.json', '.php-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"147 bold"` | The style for the module. | +| `style` | `'147 bold'` | The style for the module. | | `disabled` | `false` | Disables the `php` module. | ### Variables @@ -2683,7 +2944,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. # ~/.config/starship.toml [php] -format = "via [🔹 $version](147 bold) " +format = 'via [🔹 $version](147 bold) ' ``` ## Pulumi @@ -2705,10 +2966,10 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string shown before the Pulumi stack. | -| `style` | `"bold 5"` | The style for the module. | +| `format` | `'via [$symbol($username@)$stack]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string shown before the Pulumi stack. | +| `style` | `'bold 5'` | The style for the module. | | `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | | `disabled` | `false` | Disables the `pulumi` module. | @@ -2732,7 +2993,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [pulumi] -format = "[🛥 ($version )$stack]($style) " +format = '[🛥 ($version )$stack]($style) ' ``` #### Without Pulumi version @@ -2740,8 +3001,8 @@ format = "[🛥 ($version )$stack]($style) " ```toml # ~/.config/starship.toml [pulumi] -symbol = "🛥 " -format = "[$symbol$stack]($style) " +symbol = '🛥 ' +format = '[$symbol$stack]($style) ' ``` ## PureScript @@ -2755,13 +3016,13 @@ The `purescript` module shows the currently installed version of [PureScript](ht | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | -| `detect_extensions` | `["purs"]` | Which extensions should trigger this module. | -| `detect_files` | `["spago.dhall"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'<=> '` | The symbol used before displaying the version of PureScript. | +| `detect_extensions` | `['purs']` | Which extensions should trigger this module. | +| `detect_files` | `['spago.dhall']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold white"` | The style for the module. | +| `style` | `'bold white'` | The style for the module. | | `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -2780,7 +3041,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht # ~/.config/starship.toml [purescript] -format = "via [$symbol$version](bold white)" +format = 'via [$symbol$version](bold white)' ``` ## Python @@ -2806,14 +3067,14 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | | `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | The style for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐍 '` | A format string representing the symbol of 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 | -| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `detect_extensions` | `["py"]` | Which extensions should trigger this module | -| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module | +| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | +| `detect_extensions` | `['py']` | Which extensions should trigger this module | +| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | | `disabled` | `false` | Disables the `python` module. | @@ -2821,7 +3082,7 @@ By default the module will be shown if any of the following conditions are met: 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. +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. ::: @@ -2829,11 +3090,11 @@ The default values and order for `python_binary` was chosen to first identify th | 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 | +| 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 @@ -2841,7 +3102,7 @@ The default values and order for `python_binary` was chosen to first identify th # ~/.config/starship.toml [python] -symbol = "👾 " +symbol = '👾 ' pyenv_version_name = true ``` @@ -2850,7 +3111,7 @@ pyenv_version_name = true [python] # Only use the `python3` binary to get the version. -python_binary = "python3" +python_binary = 'python3' ``` ```toml @@ -2869,7 +3130,7 @@ detect_extensions = [] # # Note this will only work when the venv is inside the project and it will only # work in the directory that contains the venv dir but maybe this is ok? -python_binary = ["./venv/bin/python", "python", "python3", "python2"] +python_binary = ['./venv/bin/python', 'python', 'python3', 'python2'] ``` ## R @@ -2888,13 +3149,13 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"📐"` | A format string representing the symbol of R. | -| `style` | `"blue bold"` | The style for the module. | -| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module | -| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module | -| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'📐'` | A format string representing the symbol of R. | +| `style` | `'blue bold'` | The style for the module. | +| `detect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | Which extensions should trigger this module | +| `detect_files` | `['.Rprofile']` | Which filenames should trigger this module | +| `detect_folders` | `['.Rproj.user']` | Which folders should trigger this module | | `disabled` | `false` | Disables the `r` module. | ### Variables @@ -2903,7 +3164,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | -------- | ------------- | ------------------------------------ | | version | `v4.0.5` | The version of `R` | | symbol | | Mirrors the value of option `symbol` | -| style | `"blue bold"` | Mirrors the value of option `style` | +| style | `'blue bold'` | Mirrors the value of option `style` | ### Example @@ -2911,7 +3172,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr # ~/.config/starship.toml [rlang] -format = "with [📐 $version](blue bold) " +format = 'with [📐 $version](blue bold) ' ``` ## Raku @@ -2925,13 +3186,13 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra | Option | Default | Description | | ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version-$vm_version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦋 "` | The symbol used before displaying the version of Raku | -| `detect_extensions` | `["p6", "pm6", "pod6", "raku", "rakumod"]` | Which extensions should trigger this module. | -| `detect_files` | `["META6.json"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version-$vm_version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦋 '` | The symbol used before displaying the version of Raku | +| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Which extensions should trigger this module. | +| `detect_files` | `['META6.json']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | The style for the module. | +| `style` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `raku` module. | ### Variables @@ -2949,7 +3210,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra # ~/.config/starship.toml [raku] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## Red @@ -2962,13 +3223,13 @@ By default the `red` module shows the currently installed version of [Red](https | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | -| `detect_extensions` | `["red"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🔺 '` | A format string representing the symbol of Red. | +| `detect_extensions` | `['red']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"red bold"` | The style for the module. | +| `style` | `'red bold'` | The style for the module. | | `disabled` | `false` | Disables the `red` module. | ### Variables @@ -2987,7 +3248,7 @@ By default the `red` module shows the currently installed version of [Red](https # ~/.config/starship.toml [red] -symbol = "🔴 " +symbol = '🔴 ' ``` ## Ruby @@ -3005,14 +3266,14 @@ Starship gets the current Ruby version by running `ruby -v`. | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. | -| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💎 '` | A format string representing the symbol of Ruby. | +| `detect_extensions` | `['rb']` | Which extensions should trigger this module. | +| `detect_files` | `['Gemfile', '.ruby-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | -| `style` | `"bold red"` | The style for the module. | +| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Which environment variables should trigger this module. | +| `style` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `ruby` module. | ### Variables @@ -3031,7 +3292,7 @@ Starship gets the current Ruby version by running `ruby -v`. # ~/.config/starship.toml [ruby] -symbol = "🔺 " +symbol = '🔺 ' ``` ## Rust @@ -3045,13 +3306,13 @@ By default the `rust` module shows the currently installed version of [Rust](htt | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. | -| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦀 '` | A format string representing the symbol of Rust | +| `detect_extensions` | `['rs']` | Which extensions should trigger this module. | +| `detect_files` | `['Cargo.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | The style for the module. | +| `style` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -3072,7 +3333,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt # ~/.config/starship.toml [rust] -format = "via [⚙️ $version](red bold)" +format = 'via [⚙️ $version](red bold)' ``` ## Scala @@ -3087,13 +3348,13 @@ The `scala` module shows the currently installed version of [Scala](https://www. | Option | Default | Description | | ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | -| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | -| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | -| `style` | `"red dimmed"` | The style for the module. | +| `format` | `'via [${symbol}(${version} )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. | +| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. | +| `detect_folders` | `['.metals']` | Which folders should trigger this modules. | +| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. | +| `style` | `'red dimmed'` | The style for the module. | | `disabled` | `false` | Disables the `scala` module. | ### Variables @@ -3112,7 +3373,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. # ~/.config/starship.toml [scala] -symbol = "🌟 " +symbol = '🌟 ' ``` ## Shell @@ -3129,19 +3390,19 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `"bsh"` | A format string used to represent bash. | -| `fish_indicator` | `"fsh"` | A format string used to represent fish. | -| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. | -| `powershell_indicator` | `"psh"` | A format string used to represent powershell. | -| `ion_indicator` | `"ion"` | A format string used to represent ion. | -| `elvish_indicator` | `"esh"` | A format string used to represent elvish. | -| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. | -| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. | -| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. | -| `nu_indicator` | `"nu"` | A format string used to represent nu. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `"[$indicator]($style) "` | The format for the module. | -| `style` | `"white bold"` | The style for the module. | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `style` | `'white bold'` | The style for the module. | | `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3159,26 +3420,26 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [shell] -fish_indicator = "" -powershell_indicator = "_" -unknown_indicator = "mystery shell" -style = "cyan bold" +fish_indicator = '' +powershell_indicator = '_' +unknown_indicator = 'mystery shell' +style = 'cyan bold' disabled = false ``` ## SHLVL -The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ('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`. | +| `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. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `true` | Disables the `shlvl` module. | ### Variables @@ -3198,7 +3459,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int [shlvl] disabled = false -format = "$shlvl level(s) down" +format = '$shlvl level(s) down' threshold = 3 ``` @@ -3211,8 +3472,8 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | 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. | +| `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 @@ -3243,9 +3504,9 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | Option | Default | Description | | ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | The number of directories the environment path should be truncated to. `0` means no truncation. Also see the [`directory`](#directory) module. | -| `symbol` | `"🅢 "` | The symbol used before the environment name. | -| `style` | `"bold blue"` | The style for the module. | -| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `symbol` | `'🅢 '` | The symbol used before the environment name. | +| `style` | `'bold blue'` | The style for the module. | +| `format` | `'via [$symbol$environment]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `spack` module. | ### Variables @@ -3264,7 +3525,7 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat # ~/.config/starship.toml [spack] -format = "[$symbol$environment](dimmed blue) " +format = '[$symbol$environment](dimmed blue) ' ``` ## Status @@ -3281,14 +3542,14 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `format` | `"[$symbol$status]($style) "` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `success_symbol` | `""` | The symbol displayed on program success | -| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | -| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | -| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | -| `style` | `"bold red"` | The style for the module. | +| `format` | `'[$symbol$status]($style) '` | The format of the module | +| `symbol` | `'❌'` | The symbol displayed on program error | +| `success_symbol` | `''` | The symbol displayed on program success | +| `not_executable_symbol` | `'🚫'` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `'🔍'` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `'🧱'` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `'⚡'` | The symbol displayed on any signal | +| `style` | `'bold red'` | The style for the module. | | `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code | | `pipestatus` | `false` | Enable pipestatus reporting | @@ -3320,9 +3581,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [status] -style = "bg:blue" -symbol = "🔴 " -success_symbol = "🟢 SUCCESS" +style = 'bg:blue' +symbol = '🔴 ' +success_symbol = '🟢 SUCCESS' format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false @@ -3342,9 +3603,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | --------------- | ------------------------ | ------------------------------------------------------- | -| `format` | `"[as $symbol]($style)"` | The format of the module | -| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached | -| `style` | `"bold blue"` | The style for the module. | +| `format` | `'[as $symbol]($style)'` | The format of the module | +| `symbol` | `'🧙 '` | The symbol displayed when credentials are cached | +| `style` | `'bold blue'` | The style for the module. | | `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | | `disabled` | `true` | Disables the `sudo` module. | @@ -3363,8 +3624,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [sudo] -style = "bold green" -symbol = "👩‍💻 " +style = 'bold green' +symbol = '👩‍💻 ' disabled = false ``` @@ -3388,13 +3649,13 @@ By default the `swift` module shows the currently installed version of [Swift](h | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `detect_extensions` | `["swift"]` | Which extensions should trigger this module. | -| `detect_files` | `["Package.swift"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐦 '` | A format string representing the symbol of Swift | +| `detect_extensions` | `['swift']` | Which extensions should trigger this module. | +| `detect_files` | `['Package.swift']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 202"` | The style for the module. | +| `style` | `'bold 202'` | The style for the module. | | `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -3413,7 +3674,7 @@ By default the `swift` module shows the currently installed version of [Swift](h # ~/.config/starship.toml [swift] -format = "via [🏎 $version](red bold)" +format = 'via [🏎 $version](red bold)' ``` ## Terraform @@ -3435,13 +3696,13 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol$workspace]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💠'` | A format string shown before the terraform workspace. | +| `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | -| `style` | `"bold 105"` | The style for the module. | +| `detect_folders` | `['.terraform']` | Which folders should trigger this module. | +| `style` | `'bold 105'` | The style for the module. | | `disabled` | `false` | Disables the `terraform` module. | ### Variables @@ -3463,7 +3724,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [terraform] -format = "[🏎💨 $version$workspace]($style) " +format = '[🏎💨 $version$workspace]($style) ' ``` #### Without Terraform version @@ -3472,7 +3733,7 @@ format = "[🏎💨 $version$workspace]($style) " # ~/.config/starship.toml [terraform] -format = "[🏎💨 $workspace]($style) " +format = '[🏎💨 $workspace]($style) ' ``` ## Time @@ -3489,15 +3750,15 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | The format string for the module. | +| `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. | +| `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 | +| `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. +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 @@ -3516,9 +3777,9 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de [time] disabled = false format = '🕙[\[ $time \]]($style) ' -time_format = "%T" -utc_time_offset = "-5" -time_range = "10:00:00-14:00:00" +time_format = '%T' +utc_time_offset = '-5' +time_range = '10:00:00-14:00:00' ``` ## Username @@ -3540,9 +3801,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Option | Default | Description | | ------------- | ----------------------- | ------------------------------------------- | -| `style_root` | `"bold red"` | The style used when the user is root/admin. | -| `style_user` | `"bold yellow"` | The style used for non-root users. | -| `format` | `"[$user]($style) in "` | The format for the module. | +| `style_root` | `'bold red'` | The style used when the user is root/admin. | +| `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. | @@ -3550,8 +3811,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | 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. | +| `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 @@ -3559,9 +3820,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` # ~/.config/starship.toml [username] -style_user = "white bold" -style_root = "black bold" -format = "user: [$user]($style) " +style_user = 'white bold' +style_root = 'black bold' +format = 'user: [$user]($style) ' disabled = false show_always = true ``` @@ -3576,13 +3837,13 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'⍱ '` | A format string representing the symbol of Vagrant. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["Vagrantfile"]` | Which filenames should trigger this module. | +| `detect_files` | `['Vagrantfile']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"cyan bold"` | The style for the module. | +| `style` | `'cyan bold'` | The style for the module. | | `disabled` | `false` | Disables the `vagrant` module. | ### Variables @@ -3601,7 +3862,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// # ~/.config/starship.toml [vagrant] -format = "via [⍱ $version](bold white) " +format = 'via [⍱ $version](bold white) ' ``` ## V @@ -3615,13 +3876,13 @@ The `vlang` module shows you your currently installed version of [V](https://vla | Option | Default | Description | | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"V "` | A format string representing the symbol of V | -| `detect_extensions` | `["v"]` | Which extensions should trigger this module. | -| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'V '` | A format string representing the symbol of V | +| `detect_extensions` | `['v']` | Which extensions should trigger this module. | +| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"blue bold"` | The style for the module. | +| `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `vlang` module. | ### Variables @@ -3637,7 +3898,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla ```toml # ~/.config/starship.toml [vlang] -format = "via [V $version](blue bold) " +format = 'via [V $version](blue bold) ' ``` ## VCSH @@ -3648,9 +3909,9 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | Option | Default | Description | | ---------- | -------------------------------- | ------------------------------------------------------ | -| `symbol` | | The symbol used before displaying the repository name. | -| `style` | `"bold yellow"` | The style for the module. | -| `format` | `"vcsh [$symbol$repo]($style) "` | The format for the module. | +| `symbol` | `''` | The symbol used before displaying the repository name. | +| `style` | `'bold yellow'` | The style for the module. | +| `format` | `'vcsh [$symbol$repo]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `vcsh` module. | ### Variables @@ -3669,7 +3930,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v # ~/.config/starship.toml [vcsh] -format = "[🆅 $repo](bold blue) " +format = '[🆅 $repo](bold blue) ' ``` ## Zig @@ -3682,12 +3943,12 @@ By default the the `zig` module shows the currently installed version of [Zig](h | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"↯ "` | 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. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'↯ '` | The symbol used before displaying the version of Zig. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `zig` module. | -| `detect_extensions` | `["zig"]` | Which extensions should trigger this module. | +| `detect_extensions` | `['zig']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -3707,7 +3968,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h # ~/.config/starship.toml [zig] -symbol = "⚡️ " +symbol = '⚡️ ' ``` ## Custom commands @@ -3752,16 +4013,16 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | Option | Default | Description | | ------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `command` | `''` | The command whose output should be printed. The command will be passed on stdin to the shell. | | `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `description` | `""` | The description of the module that is shown when running `starship explain`. | +| `description` | `''` | The description of the module that is shown when running `starship explain`. | | `detect_files` | `[]` | The files that will be searched in the working directory for a match. | | `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. | | `detect_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. | +| `symbol` | `''` | The symbol used before displaying the command output. | +| `style` | `'bold green'` | The style for the module. | +| `format` | `'[$symbol($output )]($style)'` | The format for the module. | | `disabled` | `false` | Disables this `custom` module. | | `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | | `use_stdin` | | An optional boolean value that overrides whether commands should be forwarded to the shell via the standard input or as an argument. If unset standard input is used by default, unless the shell does not support it (cmd, nushell). Setting this disables shell-specific argument handling. | @@ -3784,14 +4045,14 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt - 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. +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 -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. ```toml -shell = ["pwsh", "-Command", "-"] +shell = ['pwsh', '-Command', '-'] ``` ::: warning Make sure your custom shell configuration exits gracefully @@ -3812,19 +4073,19 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -detect_files = ["foo"] # can specify filters but wildcards are not supported -when = """ test "$HOME" = "$PWD" """ -format = " transcending [$output]($style)" +command = 'echo foo' # shows output of command +detect_files = ['foo'] # can specify filters but wildcards are not supported +when = ''' test "$HOME" = "$PWD" ''' +format = ' transcending [$output]($style)' [custom.time] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command', '-'] [custom.time-as-arg] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command'] use_stdin = false ``` diff --git a/docs/ko-KR/guide/README.md b/docs/ko-KR/guide/README.md index ef41eca1..74fff57d 100644 --- a/docs/ko-KR/guide/README.md +++ b/docs/ko-KR/guide/README.md @@ -219,7 +219,6 @@ Alternatively, install Starship using any of the following package managers: | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | | Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | -| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | @@ -417,6 +416,14 @@ Starship 을 만드는 데에 영감이 되었던 이전 작업들도 살펴보 - **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons. +## ❤️ Sponsors + +Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website. + +**Supporter Tier** + +- [Dimension](https://dimension.dev/) +


Starship 로켓 아이콘 diff --git a/docs/ko-KR/presets/README.md b/docs/ko-KR/presets/README.md index 26c2314b..cb3dcf1b 100644 --- a/docs/ko-KR/presets/README.md +++ b/docs/ko-KR/presets/README.md @@ -10,6 +10,14 @@ This preset changes the symbols for each module to use Nerd Font symbols. [![Screenshot of Nerd Font Symbols preset](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font) +## [No Nerd Fonts](./no-nerd-font.md) + +This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt. + +::: tip This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). ::: + +[Click to view No Nerd Font preset](./no-nerd-font) + ## [Bracketed Segments](./bracketed-segments.md) This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.). @@ -28,6 +36,12 @@ This preset hides the version of language runtimes. If you work in containers or [![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes) +## [No Empty Icons](./no-empty-icons.md) + +This preset does not show icons if the toolset is not found. + +[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Click to view No Runtime Versions preset")](./no-empty-icons.md) + ## [Pure Prompt](./pure-preset.md) This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). @@ -39,3 +53,9 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship. [![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png "Click to view Pure Prompt preset")](./pastel-powerline) + +## [Tokyo Night](./tokyo-night.md) + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) diff --git a/docs/ko-KR/presets/no-empty-icons.md b/docs/ko-KR/presets/no-empty-icons.md new file mode 100644 index 00000000..7be6867d --- /dev/null +++ b/docs/ko-KR/presets/no-empty-icons.md @@ -0,0 +1,17 @@ +[Return to Presets](./README.md#no-empty-icons) + +# No Empty Icons Preset + +If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. + +![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) + +### Configuration + +```sh +starship preset no-empty-icons > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-empty-icons.toml) + +<<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/ko-KR/presets/no-nerd-font.md b/docs/ko-KR/presets/no-nerd-font.md new file mode 100644 index 00000000..b154a6c0 --- /dev/null +++ b/docs/ko-KR/presets/no-nerd-font.md @@ -0,0 +1,19 @@ +[Return to Presets](./README.md#no-nerd-fonts) + +# No Nerd Fonts Preset + +This preset restricts the use of symbols to those from emoji and powerline sets. + +This means that even without a Nerd Font installed, you should be able to view all module symbols. + +This preset will become the default preset in a future release of starship. + +### Configuration + +```sh +starship preset no-nerd-font > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-nerd-font.toml) + +<<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/ko-KR/presets/tokyo-night.md b/docs/ko-KR/presets/tokyo-night.md new file mode 100644 index 00000000..9d769463 --- /dev/null +++ b/docs/ko-KR/presets/tokyo-night.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#pastel-powerline) + +# Tokyo Night Preset + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) + +### 준비 사항 + +- 터미널에 [Nerd Font](https://www.nerdfonts.com/)가 설치되어 있고 사용 가능해야 합니다 + +### Configuration + +```sh +starship preset tokyo-night > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/tokyo-night.toml) + +<<< @/.vuepress/public/presets/toml/tokyo-night.toml diff --git a/docs/nl-NL/advanced-config/README.md b/docs/nl-NL/advanced-config/README.md index 3e45a887..9a8b0fff 100644 --- a/docs/nl-NL/advanced-config/README.md +++ b/docs/nl-NL/advanced-config/README.md @@ -205,7 +205,9 @@ Some shells support a right prompt which renders on the same line as the input. Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](/config/#fill). -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. + +Note: Nushell 0.71.0 or later is required ### Example @@ -280,5 +282,5 @@ If multiple colors are specified for foreground/background, the last one in the Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: - Many terminals disable support for `blink` by default -- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564). +- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). - `strikethrough` is not supported by the default macOS Terminal.app diff --git a/docs/nl-NL/config/README.md b/docs/nl-NL/config/README.md index e9f96890..63a5e67b 100644 --- a/docs/nl-NL/config/README.md +++ b/docs/nl-NL/config/README.md @@ -15,15 +15,17 @@ All configuration for starship is done in this [TOML](https://github.com/toml-la # Inserts a blank line between shell prompts add_newline = true -# Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +# 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 ``` +### Config File Location + You can change default configuration file location with `STARSHIP_CONFIG` environment variable: ```sh @@ -70,6 +72,62 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. +### Strings + +In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. + +The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. + +| Symbol | Type | Notes | +| ------ | ------------------------- | ------------------------------------------------------ | +| `'` | literal string | less escaping | +| `"` | string | more escaping | +| `'''` | multi-line literal string | less escaping | +| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | + +For example: + +```toml +# literal string +format = '☺\☻ ' + +# regular string +format = "☺\\☻ " + +# escaping Starship symbols +format = '\[\$\] ' +``` + +When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: + +```toml +# with literal string +format = ''' + +\$''' + +# with multiline basic string +format = """ + +\\$""" + +# with basic string +format = "\n\\$" +``` + +In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. + +```toml +format = """ +line1\ +line1\ +line1 +line2\ +line2\ +line2 +""" +``` + ### Format Strings Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. @@ -80,9 +138,9 @@ A variable contains a `$` symbol followed by the name of the variable. The name 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. +- `'$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 @@ -94,20 +152,20 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri 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. +- `'[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 +- `'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. @@ -117,43 +175,20 @@ A conditional format string wrapped in `(` and `)` will not render if all variab For example: -- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. -- `(some text)` will always show nothing since there are no variables wrapped in the braces. -- 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\] )`. - -#### Special characters - -The following symbols have special usage in a format string and must be escaped: `$ \ [ ] ( )`. - -Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). - -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 = ''' - -\$''' -``` +- `'(@$region)'` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. +- `'(some text)'` will always show nothing since there are no variables wrapped in the braces. +- When `$combined` is a shortcut for `\[$a$b\]`, `'($combined)'` will show nothing only if `$a` and `$b` are both `None`. This works the same as `'(\[$a$b\] )'`. ### Negative matching -Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched. +Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading '!' character. The presence of _any_ negative indicator in the directory will result in the module not being matched. Extensions are matched against both the characters after the last dot in a filename, and the characters after the first dot in a filename. For example, `foo.bar.tar.gz` will be matched against `bar.tar.gz` and `gz` in the `detect_extensions` variable. Files whose name begins with a dot are not considered to have extensions at all. To see how this works in practice, you could match TypeScript but not MPEG Transport Stream files thus: ```toml -detect_extensions = ["ts", "!video.ts", "!audio.ts"] +detect_extensions = ['ts', '!video.ts', '!audio.ts'] ``` ## Prompt @@ -165,11 +200,11 @@ This is the list of prompt-wide configuration options. | Option | Default | Description | | ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `format` | [link](#default-prompt-format) | Configure the format of the prompt. | -| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | +| `right_format` | `''` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | | `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Inserts blank line between shell prompts. | -| `palette` | `""` | Sets which color palette from `palettes` to use. | +| `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | ### Example @@ -178,10 +213,10 @@ This is the list of prompt-wide configuration options. # ~/.config/starship.toml # Use custom format -format = """ +format = ''' [┌───────────────────>](bold green) [│](bold green)$directory$rust$package -[└─>](bold green) """ +[└─>](bold green) ''' # Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 @@ -189,15 +224,15 @@ scan_timeout = 10 # Disable the blank line at the start of the prompt add_newline = false -# Set "foo" as custom color palette -palette = "foo" +# Set 'foo' as custom color palette +palette = 'foo' # Define custom colors [palettes.foo] # Overwrite existing color -blue = "21" +blue = '21' # Define new color -mustard = "#af8700" +mustard = '#af8700' ``` ### Default Prompt Format @@ -205,7 +240,7 @@ mustard = "#af8700" 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" +format = '$all' # Which is equivalent to format = """ @@ -236,7 +271,9 @@ $elixir\ $elm\ $erlang\ $golang\ +$guix_shell\ $haskell\ +$haxe\ $helm\ $java\ $julia\ @@ -245,6 +282,7 @@ $lua\ $nim\ $nodejs\ $ocaml\ +$opa\ $perl\ $php\ $pulumi\ @@ -281,6 +319,7 @@ $jobs\ $battery\ $time\ $status\ +$os\ $container\ $shell\ $character""" @@ -290,7 +329,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format = "$all$directory$character" +format = '$all$directory$character' ``` ## AWS @@ -305,15 +344,17 @@ When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. +When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. + ### Options | Option | Default | Description | | ------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | -| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | -| `profile_aliases` | | Table of profile aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | The style 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. | +| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | +| `style` | `'bold yellow'` | The style for the module. | | `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Disables the `AWS` module. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -339,11 +380,11 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL [aws] format = 'on [$symbol($profile )(\($region\) )]($style)' -style = "bold blue" -symbol = "🅰 " +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' [aws.profile_aliases] CompanyGroupFrobozzOnCallAccess = 'Frobozz' ``` @@ -354,12 +395,12 @@ CompanyGroupFrobozzOnCallAccess = 'Frobozz' # ~/.config/starship.toml [aws] -format = "on [$symbol$region]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$region]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' ``` #### Display profile @@ -368,34 +409,48 @@ us-east-1 = "va" # ~/.config/starship.toml [aws] -format = "on [$symbol$profile]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$profile]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.profile_aliases] Enterprise_Naming_Scheme-voidstars = 'void**' ``` ## Azure -The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription, as defined in the `~/.azure/azureProfile.json` file. +The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription or the username, as defined in the `~/.azure/azureProfile.json` file. ### Options | Variable | Default | Description | | ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `"on [$symbol($subscription)]($style) "` | The format for the Azure module to render. | -| `symbol` | `"ﴃ "` | The symbol used in the format. | -| `style` | `"blue bold"` | The style used in the format. | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'ﴃ '` | The symbol used in the format. | +| `style` | `'blue bold'` | The style used in the format. | | `disabled` | `true` | Disables the `azure` module. | -### Example +### Examples + +#### Display Subscription Name ```toml # ~/.config/starship.toml [azure] disabled = false -format = "on [$symbol($subscription)]($style) " +format = 'on [$symbol($subscription)]($style) ' +symbol = 'ﴃ ' +style = 'blue bold' +``` + +#### Display Username + +```toml +# ~/.config/starship.toml + +[azure] +disabled = false +format = "on [$symbol($username)]($style) " symbol = "ﴃ " style = "blue bold" ``` @@ -408,12 +463,12 @@ The `battery` module shows how charged the device's battery is and its current c | 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. | +| `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. | @@ -423,9 +478,9 @@ The `battery` module shows how charged the device's battery is and its current c # ~/.config/starship.toml [battery] -full_symbol = "🔋 " -charging_symbol = "⚡️ " -discharging_symbol = "💀 " +full_symbol = '🔋 ' +charging_symbol = '⚡️ ' +discharging_symbol = '💀 ' ``` ### Battery Display @@ -435,7 +490,7 @@ The `display` configuration option is used to define when the battery indicator ```toml [[battery.display]] threshold = 10 -style = "bold red" +style = 'bold red' ``` The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. @@ -447,21 +502,21 @@ The `display` option is an array of the following table. | Option | Default | Description | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | | `threshold` | `10` | The upper bound for the display option. | -| `style` | `"red bold"` | The style used if the display option is in use. | +| `style` | `'red bold'` | The style used if the display option is in use. | | `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. | | `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. | #### Example ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% threshold = 10 -style = "bold red" +style = 'bold red' -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% threshold = 30 -style = "bold yellow" -discharging_symbol = "💦" +style = 'bold yellow' +discharging_symbol = '💦' # when capacity is over 30%, the battery indicator will not be displayed ``` @@ -477,13 +532,13 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil | Option | Default | Description | | ------------------- | ----------------------------------------------- | ----------------------------------------------------- | -| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. | -| `version_format` | `"v${raw}"` | The version format. | -| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. | +| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. | +| `version_format` | `'v${raw}'` | The version format. | +| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | -| `style` | `"bold blue"` | The style for the module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `elixir` module. | ### Variables @@ -502,7 +557,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil # ~/.config/starship.toml [buf] -symbol = "🦬 " +symbol = '🦬 ' ``` ## Bun @@ -516,13 +571,13 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🍞 "` | A format string representing the symbol of Node.js. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["bun.lockb", "bunfig.toml"]` | Which filenames should trigger this module. | +| `detect_files` | `['bun.lockb', 'bunfig.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | The style for the module. | +| `style` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `bun` module. | ### Variables @@ -541,7 +596,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. # ~/.config/starship.toml [bun] -format = "via [🍔 $version](bold green) " +format = 'via [🍔 $version](bold green) ' ``` ## C @@ -552,14 +607,14 @@ The `c` module shows some information about your C compiler. By default the modu | Option | Default | Description | | ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version(-$name) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"C "` | The symbol used before displaying the compiler details | -| `detect_extensions` | `["c", "h"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ "cc", "--version" ], [ "gcc", "--version" ], [ "clang", "--version" ] ] | How to detect what the compiler is | -| `style` | `"bold 149"` | The style for the module. | +| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | +| `style` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `c` module. | ### Variables @@ -577,7 +632,7 @@ NB that `version` is not in the default format. The `commands` option accepts a list of commands to determine the compiler version and name. -Each command is represented as a list of the executable name, followed by its arguments, usually something like `["mycc", "--version"]`. Starship will try executing each command until it gets a result on STDOUT. +Each command is represented as a list of the executable name, followed by its arguments, usually something like `['mycc', '--version']`. Starship will try executing each command until it gets a result on STDOUT. If a C compiler is not supported by this module, you can request it by [raising an issue on GitHub](https://github.com/starship/starship/). @@ -587,7 +642,7 @@ If a C compiler is not supported by this module, you can request it by [raising # ~/.config/starship.toml [c] -format = "via [$name $version]($style)" +format = 'via [$name $version]($style)' ``` ## Character @@ -611,13 +666,13 @@ By default it only changes color. If you also want to change its shape take a lo | 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. | -| `vimcmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | -| `vimcmd_replace_one_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim `replace_one` mode. | -| `vimcmd_replace_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim replace mode. | -| `vimcmd_visual_symbol` | `"[❮](bold yellow)"` | The format string used before the text input if the shell is in vim replace mode. | +| `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. | +| `vimcmd_symbol` | `'[❮](bold green)'` | The format string used before the text input if the shell is in vim normal mode. | +| `vimcmd_replace_one_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim `replace_one` mode. | +| `vimcmd_replace_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim replace mode. | +| `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | | `disabled` | `false` | Disables the `character` module. | ### Variables @@ -634,8 +689,8 @@ By default it only changes color. If you also want to change its shape take a lo # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[✗](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[✗](bold red) ' ``` #### Without custom error shape @@ -644,8 +699,8 @@ error_symbol = "[✗](bold red) " # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[➜](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[➜](bold red) ' ``` #### With custom vim shape @@ -654,7 +709,7 @@ error_symbol = "[➜](bold red) " # ~/.config/starship.toml [character] -vicmd_symbol = "[V](bold green) " +vicmd_symbol = '[V](bold green) ' ``` ## CMake @@ -668,13 +723,13 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | Option | Default | Description | | ------------------- | -------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"△ "` | The symbol used before the version of cmake. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'△ '` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this module | -| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | +| `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | -| `style` | `"bold blue"` | The style for the module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -698,11 +753,11 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold blue"` | The style for the module. | -| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Which extensions should trigger this module. | +| `symbol` | `'⚙️ '` | The symbol used before displaying the version of COBOL. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold blue'` | The style for the module. | +| `detect_extensions` | `['cbl', 'cob', 'CBL', 'COB']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `cobol` module. | @@ -735,8 +790,8 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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. | +| `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). | @@ -758,7 +813,7 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec [cmd_duration] min_time = 500 -format = "underwent [$duration](bold yellow)" +format = 'underwent [$duration](bold yellow)' ``` ## Conda @@ -776,9 +831,9 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | 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. | +| `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. | @@ -798,7 +853,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c # ~/.config/starship.toml [conda] -format = "[$symbol$environment](dimmed green) " +format = '[$symbol$environment](dimmed green) ' ``` ## Container @@ -809,8 +864,8 @@ The `container` module displays a symbol and container name, if inside a contain | Option | Default | Description | | ---------- | ---------------------------------- | ----------------------------------------- | -| `symbol` | `"⬢"` | The symbol shown, when inside a container | -| `style` | `"bold red dimmed"` | The style for the module. | +| `symbol` | `'⬢'` | The symbol shown, when inside a container | +| `style` | `'bold red dimmed'` | The style for the module. | | `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `container` module. | @@ -844,12 +899,12 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold red"` | The style for the module. | -| `detect_extensions` | `["cr"]` | Which extensions should trigger this module. | -| `detect_files` | `["shard.yml"]` | Which filenames should trigger this module. | +| `symbol` | `'🔮 '` | The symbol used before displaying the version of crystal. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold red'` | The style for the module. | +| `detect_extensions` | `['cr']` | Which extensions should trigger this module. | +| `detect_files` | `['shard.yml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `crystal` module. | @@ -869,7 +924,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// # ~/.config/starship.toml [crystal] -format = "via [✨ $version](bold blue) " +format = 'via [✨ $version](bold blue) ' ``` ## Daml @@ -882,12 +937,12 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"Λ "` | A format string representing the symbol of Daml | -| `style` | `"bold cyan"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'Λ '` | A format string representing the symbol of Daml | +| `style` | `'bold cyan'` | The style for the module. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['daml.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `daml` module. | @@ -907,7 +962,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d # ~/.config/starship.toml [daml] -format = "via [D $version](bold bright-green) " +format = 'via [D $version](bold bright-green) ' ``` ## Dart @@ -922,13 +977,13 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | Option | Default | Description | | ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `detect_extensions` | `["dart"]` | Which extensions should trigger this module. | -| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".dart_tool"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🎯 '` | A format string representing the symbol of Dart | +| `detect_extensions` | `['dart']` | Which extensions should trigger this module. | +| `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | Which filenames should trigger this module. | +| `detect_folders` | `['.dart_tool']` | Which folders should trigger this module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -947,7 +1002,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d # ~/.config/starship.toml [dart] -format = "via [🔰 $version](bold red) " +format = 'via [🔰 $version](bold red) ' ``` ## Deno @@ -960,13 +1015,13 @@ The `deno` module shows you your currently installed version of [Deno](https://d | Option | Default | Description | | ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦕 "` | A format string representing the symbol of Deno | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦕 '` | A format string representing the symbol of Deno | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["deno.json", "deno.jsonc", "mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. | +| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"green bold"` | The style for the module. | +| `style` | `'green bold'` | The style for the module. | | `disabled` | `false` | Disables the `deno` module. | ### Variables @@ -983,7 +1038,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d # ~/.config/starship.toml [deno] -format = "via [🦕 $version](green bold) " +format = 'via [🦕 $version](green bold) ' ``` ## Directory @@ -996,20 +1051,21 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### 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: "…/" | -| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | -| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) | +| 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: '…/' | +| `before_repo_root_style` | | The style for the path segment above the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `'[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) '` | The format of a git repo when `before_repo_root_style` and `repo_root_style` is defined. | +| `home_symbol` | `'~'` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |

This module has a few advanced configuration options that control how the directory is displayed. @@ -1024,8 +1080,8 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ```toml [directory.substitutions] -"/Volumes/network/path" = "/net" -"src/com/long/java/path" = "mypath" +'/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`. @@ -1036,8 +1092,8 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | Variable | Example | Description | | --------- | --------------------- | ----------------------------------- | -| path | `"D:/Projects"` | The current directory path | -| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | +| 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 @@ -1048,11 +1104,11 @@ Let us consider the path `/path/to/home/git_repo/src/lib` | Variable | Example | Description | | ------------------ | --------------------- | --------------------------------------- | -| before_root_path | `"/path/to/home/"` | The path before git root directory path | -| repo_root | `"git_repo"` | The git root directory name | -| path | `"/src/lib"` | The remaining path | -| style | `"black bold dimmed"` | Mirrors the value of option `style` | -| repo_root_style | `"underline white"` | Style for git root directory name | +| before_root_path | `'/path/to/home/'` | The path before git root directory path | +| repo_root | `'git_repo'` | The git root directory name | +| path | `'/src/lib'` | The remaining path | +| style | `'black bold dimmed'` | Mirrors the value of option `style` | +| repo_root_style | `'underline white'` | Style for git root directory name |
@@ -1063,7 +1119,7 @@ Let us consider the path `/path/to/home/git_repo/src/lib` [directory] truncation_length = 8 -truncation_symbol = "…/" +truncation_symbol = '…/' ``` ## Docker Context @@ -1074,13 +1130,13 @@ The `docker_context` module shows the currently active [Docker context](https:// | Option | Default | Description | | ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `format` | `'via [$symbol$context]($style) '` | The format for the module. | +| `symbol` | `'🐳 '` | The symbol used before displaying the Docker context. | | `only_with_files` | `true` | Only show when there's a match | | `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | +| `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | Which filenames should trigger this module (needs `only_with_files` to be true). | | `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | -| `style` | `"blue bold"` | The style for the module. | +| `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -1099,7 +1155,7 @@ The `docker_context` module shows the currently active [Docker context](https:// # ~/.config/starship.toml [docker_context] -format = "via [🐋 $context](blue bold)" +format = 'via [🐋 $context](blue bold)' ``` ## Dotnet @@ -1127,14 +1183,14 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$var_cluster" +'dev.local.cluster.k8s' = 'dev' +'.*/openshift-cluster/.*' = 'openshift' +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' [kubernetes.user_aliases] -"dev.local.cluster.k8s" = "dev" -"root/.*" = "root" +'dev.local.cluster.k8s' = 'dev' +'root/.*' = 'root' ``` Only show the module in directories that contain a `k8s` file. @@ -2121,14 +2249,14 @@ Long and automatically generated cluster names can be identified and shortened u ```toml [kubernetes.context_aliases] # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -".*/openshift-cluster/.*" = "openshift" +'.*/openshift-cluster/.*' = 'openshift' # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$var_cluster" +'.*/(?P[\\w-]+)/.*' = '$var_cluster' # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' ``` ## Line Break @@ -2159,8 +2287,8 @@ The `localip` module shows the IPv4 address of the primary network interface. | Option | Default | Description | | ---------- | ------------------------- | ------------------------------------------------------ | | `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | The style for the module. | +| `format` | `'[$localipv4]($style) '` | The format for the module. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `true` | Disables the `localip` module. | ### Variables @@ -2179,7 +2307,7 @@ The `localip` module shows the IPv4 address of the primary network interface. [localip] ssh_only = false -format = "@[$localipv4](bold red) " +format = '@[$localipv4](bold red) ' disabled = false ``` @@ -2195,14 +2323,14 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | Option | Default | Description | | ------------------- | ------------------------------------ | -------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | -| `detect_extensions` | `["lua"]` | Which extensions should trigger this module. | -| `detect_files` | `[".lua-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["lua"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | -| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🌙 '` | A format string representing the symbol of Lua. | +| `detect_extensions` | `['lua']` | Which extensions should trigger this module. | +| `detect_files` | `['.lua-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['lua']` | Which folders should trigger this module. | +| `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 @@ -2221,7 +2349,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o # ~/.config/starship.toml [lua] -format = "via [🌕 $version](bold blue) " +format = 'via [🌕 $version](bold blue) ' ``` ## Memory Usage @@ -2241,9 +2369,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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. | +| `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 @@ -2267,8 +2395,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y [memory_usage] disabled = false threshold = -1 -symbol = " " -style = "bold dimmed green" +symbol = ' ' +style = 'bold dimmed green' ``` ## Meson @@ -2282,10 +2410,10 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. | Option | Default | Description | | ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- | | `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | -| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. | -| `format` | `"via [$symbol$project]($style) "` | The format for the module. | -| `symbol` | `"⬢ "` | The symbol used before displaying the project name. | -| `style` | `"blue bold"` | The style for the module. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | +| `format` | `'via [$symbol$project]($style) '` | The format for the module. | +| `symbol` | `'⬢ '` | The symbol used before displaying the project name. | +| `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `meson` module. | ### Variables @@ -2305,9 +2433,9 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. [meson] disabled = false -truncation_symbol = "--" -symbol = " " -style = "bold dimmed green" +truncation_symbol = '--' +symbol = ' ' +style = 'bold dimmed green' ``` ## Mercurial Branch @@ -2318,11 +2446,11 @@ The `hg_branch` module shows the active branch of the repo in your current direc | 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. | +| `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 `N` graphemes | -| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a branch name was truncated. | | `disabled` | `true` | Disables the `hg_branch` module. | ### Variables @@ -2341,9 +2469,9 @@ The `hg_branch` module shows the active branch of the repo in your current direc # ~/.config/starship.toml [hg_branch] -format = "on [🌱 $branch](bold purple)" +format = 'on [🌱 $branch](bold purple)' truncation_length = 4 -truncation_symbol = "" +truncation_symbol = '' ``` ## Nim @@ -2359,13 +2487,13 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | -| `detect_extensions` | `["nim", "nims", "nimble"]` | Which extensions should trigger this module. | -| `detect_files` | `["nim.cfg"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'👑 '` | The symbol used before displaying the version of Nim. | +| `detect_extensions` | `['nim', 'nims', 'nimble']` | Which extensions should trigger this module. | +| `detect_files` | `['nim.cfg']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | The style for the module. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `nim` module. | ### Variables @@ -2384,8 +2512,8 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang # ~/.config/starship.toml [nim] -style = "yellow" -symbol = "🎣 " +style = 'yellow' +symbol = '🎣 ' ``` ## Nix-shell @@ -2397,10 +2525,10 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | 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. | +| `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 @@ -2421,8 +2549,8 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ [nix_shell] disabled = true -impure_msg = "[impure shell](bold red)" -pure_msg = "[pure shell](bold green)" +impure_msg = '[impure shell](bold red)' +pure_msg = '[pure shell](bold green)' format = 'via [☃️ $state( \($name\))](bold blue) ' ``` @@ -2441,13 +2569,13 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | Option | Default | Description | | ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string representing the symbol of Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts", "mts", "cts"]` | Which extensions should trigger this module. | -| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | -| `style` | `"bold green"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string representing the symbol of Node.js. | +| `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Which extensions should trigger this module. | +| `detect_files` | `['package.json', '.node-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['node_modules']` | Which folders should trigger this module. | +| `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 package.json does not match the Node.js version. | @@ -2467,7 +2595,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n # ~/.config/starship.toml [nodejs] -format = "via [🤖 $version](bold green) " +format = 'via [🤖 $version](bold green) ' ``` ## OCaml @@ -2485,15 +2613,15 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | Option | Default | Description | | ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | -| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | -| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | -| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Which extensions should trigger this module. | -| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Which filenames should trigger this module. | -| `detect_folders` | `["_opam", "esy.lock"]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | The style for the module. | +| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐫 '` | The symbol used before displaying the version of OCaml. | +| `global_switch_indicator` | `''` | The format string used to represent global OPAM switch. | +| `local_switch_indicator` | `'*'` | The format string used to represent local OPAM switch. | +| `detect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | Which extensions should trigger this module. | +| `detect_files` | `['dune', 'dune-project', 'jbuild', 'jbuild-ignore', '.merlin']` | Which filenames should trigger this module. | +| `detect_folders` | `['_opam', 'esy.lock']` | Which folders should trigger this module. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `ocaml` module. | ### Variables @@ -2514,7 +2642,43 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam # ~/.config/starship.toml [ocaml] -format = "via [🐪 $version]($style) " +format = 'via [🐪 $version]($style) ' +``` + +## Open Policy Agent + +The `opa` module shows the currently installed version of the OPA tool. By default the module will be shown if the current directory contains a `.rego` file. + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | +| `detect_extensions` | `['rego']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'bold blue'` | The style for the module. | +| `disabled` | `false` | Disables the `opa` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.44.0` | The version of `opa` | +| symbol | | Mirrors the 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 + +[opa] +format = 'via [⛑️ $version](bold red) ' ``` ## OpenStack @@ -2526,8 +2690,8 @@ The `openstack` module shows the current OpenStack cloud and project. The module | Option | Default | Description | | ---------- | ----------------------------------------------- | -------------------------------------------------------------- | | `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | -| `style` | `"bold yellow"` | The style for the module. | +| `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 @@ -2548,8 +2712,105 @@ The `openstack` module shows the current OpenStack cloud and project. The module [openstack] format = 'on [$symbol$cloud(\($project\))]($style) ' -style = "bold yellow" -symbol = "☁️ " +style = 'bold yellow' +symbol = '☁️ ' +``` + +## OS + +The `os` module shows the current operating system. OS information is detected via the [os_info](https://lib.rs/crates/os_info) crate. + +::: warning + +The [os_info](https://lib.rs/crates/os_info) crate used by this module is known to be inaccurate on some systems. + +::: + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ---------- | --------------------- | ------------------------------------------------------ | +| `format` | `"[$symbol]($style)"` | The format for the module. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `true` | Disables the `os` module. | +| `symbols` | | A table that maps each operating system to its symbol. | + +`symbols` allows you to define arbitrary symbols to display for each operating system type. Operating system types not defined by your configuration use the default symbols table below. All operating systems currently supported by the module are listed below. If you would like an operating system to be added, feel free to open a [feature request](https://github.com/starship/starship/issues/new/choose). + +```toml +# This is the default symbols table. +[os.symbols] +Alpine = "🏔️ " +Amazon = "🙂 " +Android = "🤖 " +Arch = "🎗️ " +CentOS = "💠 " +Debian = "🌀 " +DragonFly = "🐉 " +Emscripten = "🔗 " +EndeavourOS = "🚀 " +Fedora = "🎩 " +FreeBSD = "😈 " +Garuda = "🦅 " +Gentoo = "🗜️ " +HardenedBSD = "🛡️ " +Illumos = "🐦 " +Linux = "🐧 " +Macos = "🍎 " +Manjaro = "🥭 " +Mariner = "🌊 " +MidnightBSD = "🌘 " +Mint = "🌿 " +NetBSD = "🚩 " +NixOS = "❄️ " +OpenBSD = "🐡 " +openSUSE = "🦎 " +OracleLinux = "🦴 " +Pop = "🍭 " +Raspbian = "🍓 " +Redhat = "🎩 " +RedHatEnterprise = "🎩 " +Redox = "🧪 " +Solus = "⛵ " +SUSE = "🦎 " +Ubuntu = "🎯 " +Unknown = "❓ " +Windows = "🪟 " +``` + +### Variables + +| Variable | Example | Description | +| --------- | ------------ | ------------------------------------------------------------------ | +| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | +| name | `Arch Linux` | The current operating system name | +| type | `Arch` | The current operating system type | +| codename | | The current operating system codename, if applicable | +| edition | | The current operating system edition, if applicable | +| version | | The current operating system version, if applicable | +| 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 + +[os] +format = "on [($name )]($style)" +style = "bold blue" +disabled = false + +[os.symbols] +Windows = " " +Arch = "Arch is the best! " ``` ## Package Version @@ -2580,10 +2841,10 @@ The `package` module is shown when the current directory is the repository for a | Option | Default | Description | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"is [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold 208"` | The style for the module. | +| `format` | `'is [$symbol$version]($style) '` | The format for the module. | +| `symbol` | `'📦 '` | The symbol used before displaying the version the package. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `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. | @@ -2603,7 +2864,7 @@ The `package` module is shown when the current directory is the repository for a # ~/.config/starship.toml [package] -format = "via [🎁 $version](208 bold) " +format = 'via [🎁 $version](208 bold) ' ``` ## Perl @@ -2620,13 +2881,13 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe | Option | Default | Description | | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | -| `detect_extensions` | `["pl", "pm", "pod"]` | Which extensions should trigger this module. | -| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | +| `detect_extensions` | `['pl', 'pm', 'pod']` | Which extensions should trigger this module. | +| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | The style for the module. | +| `style` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `perl` module. | ### Variables @@ -2643,7 +2904,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe # ~/.config/starship.toml [perl] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## PHP @@ -2658,13 +2919,13 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | -| `detect_extensions` | `["php"]` | Which extensions should trigger this module. | -| `detect_files` | `["composer.json", ".php-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐘 '` | The symbol used before displaying the version of PHP. | +| `detect_extensions` | `['php']` | Which extensions should trigger this module. | +| `detect_files` | `['composer.json', '.php-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"147 bold"` | The style for the module. | +| `style` | `'147 bold'` | The style for the module. | | `disabled` | `false` | Disables the `php` module. | ### Variables @@ -2683,7 +2944,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. # ~/.config/starship.toml [php] -format = "via [🔹 $version](147 bold) " +format = 'via [🔹 $version](147 bold) ' ``` ## Pulumi @@ -2705,10 +2966,10 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string shown before the Pulumi stack. | -| `style` | `"bold 5"` | The style for the module. | +| `format` | `'via [$symbol($username@)$stack]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string shown before the Pulumi stack. | +| `style` | `'bold 5'` | The style for the module. | | `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | | `disabled` | `false` | Disables the `pulumi` module. | @@ -2732,7 +2993,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [pulumi] -format = "[🛥 ($version )$stack]($style) " +format = '[🛥 ($version )$stack]($style) ' ``` #### Without Pulumi version @@ -2740,8 +3001,8 @@ format = "[🛥 ($version )$stack]($style) " ```toml # ~/.config/starship.toml [pulumi] -symbol = "🛥 " -format = "[$symbol$stack]($style) " +symbol = '🛥 ' +format = '[$symbol$stack]($style) ' ``` ## PureScript @@ -2755,13 +3016,13 @@ The `purescript` module shows the currently installed version of [PureScript](ht | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | -| `detect_extensions` | `["purs"]` | Which extensions should trigger this module. | -| `detect_files` | `["spago.dhall"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'<=> '` | The symbol used before displaying the version of PureScript. | +| `detect_extensions` | `['purs']` | Which extensions should trigger this module. | +| `detect_files` | `['spago.dhall']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold white"` | The style for the module. | +| `style` | `'bold white'` | The style for the module. | | `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -2780,7 +3041,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht # ~/.config/starship.toml [purescript] -format = "via [$symbol$version](bold white)" +format = 'via [$symbol$version](bold white)' ``` ## Python @@ -2806,14 +3067,14 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | | `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | The style for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐍 '` | A format string representing the symbol of 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 | -| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `detect_extensions` | `["py"]` | Which extensions should trigger this module | -| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module | +| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | +| `detect_extensions` | `['py']` | Which extensions should trigger this module | +| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | | `disabled` | `false` | Disables the `python` module. | @@ -2821,7 +3082,7 @@ By default the module will be shown if any of the following conditions are met: 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. +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. ::: @@ -2829,11 +3090,11 @@ The default values and order for `python_binary` was chosen to first identify th | 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 | +| 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 @@ -2841,7 +3102,7 @@ The default values and order for `python_binary` was chosen to first identify th # ~/.config/starship.toml [python] -symbol = "👾 " +symbol = '👾 ' pyenv_version_name = true ``` @@ -2850,7 +3111,7 @@ pyenv_version_name = true [python] # Only use the `python3` binary to get the version. -python_binary = "python3" +python_binary = 'python3' ``` ```toml @@ -2869,7 +3130,7 @@ detect_extensions = [] # # Note this will only work when the venv is inside the project and it will only # work in the directory that contains the venv dir but maybe this is ok? -python_binary = ["./venv/bin/python", "python", "python3", "python2"] +python_binary = ['./venv/bin/python', 'python', 'python3', 'python2'] ``` ## R @@ -2888,13 +3149,13 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"📐"` | A format string representing the symbol of R. | -| `style` | `"blue bold"` | The style for the module. | -| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module | -| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module | -| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'📐'` | A format string representing the symbol of R. | +| `style` | `'blue bold'` | The style for the module. | +| `detect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | Which extensions should trigger this module | +| `detect_files` | `['.Rprofile']` | Which filenames should trigger this module | +| `detect_folders` | `['.Rproj.user']` | Which folders should trigger this module | | `disabled` | `false` | Disables the `r` module. | ### Variables @@ -2903,7 +3164,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | -------- | ------------- | ------------------------------------ | | version | `v4.0.5` | The version of `R` | | symbol | | Mirrors the value of option `symbol` | -| style | `"blue bold"` | Mirrors the value of option `style` | +| style | `'blue bold'` | Mirrors the value of option `style` | ### Example @@ -2911,7 +3172,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr # ~/.config/starship.toml [rlang] -format = "with [📐 $version](blue bold) " +format = 'with [📐 $version](blue bold) ' ``` ## Raku @@ -2925,13 +3186,13 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra | Option | Default | Description | | ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version-$vm_version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦋 "` | The symbol used before displaying the version of Raku | -| `detect_extensions` | `["p6", "pm6", "pod6", "raku", "rakumod"]` | Which extensions should trigger this module. | -| `detect_files` | `["META6.json"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version-$vm_version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦋 '` | The symbol used before displaying the version of Raku | +| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Which extensions should trigger this module. | +| `detect_files` | `['META6.json']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | The style for the module. | +| `style` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `raku` module. | ### Variables @@ -2949,7 +3210,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra # ~/.config/starship.toml [raku] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## Red @@ -2962,13 +3223,13 @@ By default the `red` module shows the currently installed version of [Red](https | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | -| `detect_extensions` | `["red"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🔺 '` | A format string representing the symbol of Red. | +| `detect_extensions` | `['red']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"red bold"` | The style for the module. | +| `style` | `'red bold'` | The style for the module. | | `disabled` | `false` | Disables the `red` module. | ### Variables @@ -2987,7 +3248,7 @@ By default the `red` module shows the currently installed version of [Red](https # ~/.config/starship.toml [red] -symbol = "🔴 " +symbol = '🔴 ' ``` ## Ruby @@ -3005,14 +3266,14 @@ Starship gets the current Ruby version by running `ruby -v`. | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. | -| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💎 '` | A format string representing the symbol of Ruby. | +| `detect_extensions` | `['rb']` | Which extensions should trigger this module. | +| `detect_files` | `['Gemfile', '.ruby-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | -| `style` | `"bold red"` | The style for the module. | +| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Which environment variables should trigger this module. | +| `style` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `ruby` module. | ### Variables @@ -3031,7 +3292,7 @@ Starship gets the current Ruby version by running `ruby -v`. # ~/.config/starship.toml [ruby] -symbol = "🔺 " +symbol = '🔺 ' ``` ## Rust @@ -3045,13 +3306,13 @@ By default the `rust` module shows the currently installed version of [Rust](htt | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. | -| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦀 '` | A format string representing the symbol of Rust | +| `detect_extensions` | `['rs']` | Which extensions should trigger this module. | +| `detect_files` | `['Cargo.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | The style for the module. | +| `style` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -3072,7 +3333,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt # ~/.config/starship.toml [rust] -format = "via [⚙️ $version](red bold)" +format = 'via [⚙️ $version](red bold)' ``` ## Scala @@ -3087,13 +3348,13 @@ The `scala` module shows the currently installed version of [Scala](https://www. | Option | Default | Description | | ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | -| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | -| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | -| `style` | `"red dimmed"` | The style for the module. | +| `format` | `'via [${symbol}(${version} )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. | +| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. | +| `detect_folders` | `['.metals']` | Which folders should trigger this modules. | +| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. | +| `style` | `'red dimmed'` | The style for the module. | | `disabled` | `false` | Disables the `scala` module. | ### Variables @@ -3112,7 +3373,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. # ~/.config/starship.toml [scala] -symbol = "🌟 " +symbol = '🌟 ' ``` ## Shell @@ -3129,19 +3390,19 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `"bsh"` | A format string used to represent bash. | -| `fish_indicator` | `"fsh"` | A format string used to represent fish. | -| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. | -| `powershell_indicator` | `"psh"` | A format string used to represent powershell. | -| `ion_indicator` | `"ion"` | A format string used to represent ion. | -| `elvish_indicator` | `"esh"` | A format string used to represent elvish. | -| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. | -| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. | -| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. | -| `nu_indicator` | `"nu"` | A format string used to represent nu. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `"[$indicator]($style) "` | The format for the module. | -| `style` | `"white bold"` | The style for the module. | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `style` | `'white bold'` | The style for the module. | | `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3159,26 +3420,26 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [shell] -fish_indicator = "" -powershell_indicator = "_" -unknown_indicator = "mystery shell" -style = "cyan bold" +fish_indicator = '' +powershell_indicator = '_' +unknown_indicator = 'mystery shell' +style = 'cyan bold' disabled = false ``` ## SHLVL -The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ('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`. | +| `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. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `true` | Disables the `shlvl` module. | ### Variables @@ -3198,7 +3459,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int [shlvl] disabled = false -format = "$shlvl level(s) down" +format = '$shlvl level(s) down' threshold = 3 ``` @@ -3211,8 +3472,8 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | 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. | +| `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 @@ -3243,9 +3504,9 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | Option | Default | Description | | ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | The number of directories the environment path should be truncated to. `0` means no truncation. Also see the [`directory`](#directory) module. | -| `symbol` | `"🅢 "` | The symbol used before the environment name. | -| `style` | `"bold blue"` | The style for the module. | -| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `symbol` | `'🅢 '` | The symbol used before the environment name. | +| `style` | `'bold blue'` | The style for the module. | +| `format` | `'via [$symbol$environment]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `spack` module. | ### Variables @@ -3264,7 +3525,7 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat # ~/.config/starship.toml [spack] -format = "[$symbol$environment](dimmed blue) " +format = '[$symbol$environment](dimmed blue) ' ``` ## Status @@ -3281,14 +3542,14 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `format` | `"[$symbol$status]($style) "` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `success_symbol` | `""` | The symbol displayed on program success | -| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | -| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | -| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | -| `style` | `"bold red"` | The style for the module. | +| `format` | `'[$symbol$status]($style) '` | The format of the module | +| `symbol` | `'❌'` | The symbol displayed on program error | +| `success_symbol` | `''` | The symbol displayed on program success | +| `not_executable_symbol` | `'🚫'` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `'🔍'` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `'🧱'` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `'⚡'` | The symbol displayed on any signal | +| `style` | `'bold red'` | The style for the module. | | `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code | | `pipestatus` | `false` | Enable pipestatus reporting | @@ -3320,9 +3581,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [status] -style = "bg:blue" -symbol = "🔴 " -success_symbol = "🟢 SUCCESS" +style = 'bg:blue' +symbol = '🔴 ' +success_symbol = '🟢 SUCCESS' format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false @@ -3342,9 +3603,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | --------------- | ------------------------ | ------------------------------------------------------- | -| `format` | `"[as $symbol]($style)"` | The format of the module | -| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached | -| `style` | `"bold blue"` | The style for the module. | +| `format` | `'[as $symbol]($style)'` | The format of the module | +| `symbol` | `'🧙 '` | The symbol displayed when credentials are cached | +| `style` | `'bold blue'` | The style for the module. | | `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | | `disabled` | `true` | Disables the `sudo` module. | @@ -3363,8 +3624,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [sudo] -style = "bold green" -symbol = "👩‍💻 " +style = 'bold green' +symbol = '👩‍💻 ' disabled = false ``` @@ -3388,13 +3649,13 @@ By default the `swift` module shows the currently installed version of [Swift](h | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `detect_extensions` | `["swift"]` | Which extensions should trigger this module. | -| `detect_files` | `["Package.swift"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐦 '` | A format string representing the symbol of Swift | +| `detect_extensions` | `['swift']` | Which extensions should trigger this module. | +| `detect_files` | `['Package.swift']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 202"` | The style for the module. | +| `style` | `'bold 202'` | The style for the module. | | `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -3413,7 +3674,7 @@ By default the `swift` module shows the currently installed version of [Swift](h # ~/.config/starship.toml [swift] -format = "via [🏎 $version](red bold)" +format = 'via [🏎 $version](red bold)' ``` ## Terraform @@ -3435,13 +3696,13 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol$workspace]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💠'` | A format string shown before the terraform workspace. | +| `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | -| `style` | `"bold 105"` | The style for the module. | +| `detect_folders` | `['.terraform']` | Which folders should trigger this module. | +| `style` | `'bold 105'` | The style for the module. | | `disabled` | `false` | Disables the `terraform` module. | ### Variables @@ -3463,7 +3724,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [terraform] -format = "[🏎💨 $version$workspace]($style) " +format = '[🏎💨 $version$workspace]($style) ' ``` #### Without Terraform version @@ -3472,7 +3733,7 @@ format = "[🏎💨 $version$workspace]($style) " # ~/.config/starship.toml [terraform] -format = "[🏎💨 $workspace]($style) " +format = '[🏎💨 $workspace]($style) ' ``` ## Time @@ -3489,15 +3750,15 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | The format string for the module. | +| `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. | +| `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 | +| `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. +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 @@ -3516,9 +3777,9 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de [time] disabled = false format = '🕙[\[ $time \]]($style) ' -time_format = "%T" -utc_time_offset = "-5" -time_range = "10:00:00-14:00:00" +time_format = '%T' +utc_time_offset = '-5' +time_range = '10:00:00-14:00:00' ``` ## Username @@ -3540,9 +3801,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Option | Default | Description | | ------------- | ----------------------- | ------------------------------------------- | -| `style_root` | `"bold red"` | The style used when the user is root/admin. | -| `style_user` | `"bold yellow"` | The style used for non-root users. | -| `format` | `"[$user]($style) in "` | The format for the module. | +| `style_root` | `'bold red'` | The style used when the user is root/admin. | +| `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. | @@ -3550,8 +3811,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | 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. | +| `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 @@ -3559,9 +3820,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` # ~/.config/starship.toml [username] -style_user = "white bold" -style_root = "black bold" -format = "user: [$user]($style) " +style_user = 'white bold' +style_root = 'black bold' +format = 'user: [$user]($style) ' disabled = false show_always = true ``` @@ -3576,13 +3837,13 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'⍱ '` | A format string representing the symbol of Vagrant. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["Vagrantfile"]` | Which filenames should trigger this module. | +| `detect_files` | `['Vagrantfile']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"cyan bold"` | The style for the module. | +| `style` | `'cyan bold'` | The style for the module. | | `disabled` | `false` | Disables the `vagrant` module. | ### Variables @@ -3601,7 +3862,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// # ~/.config/starship.toml [vagrant] -format = "via [⍱ $version](bold white) " +format = 'via [⍱ $version](bold white) ' ``` ## V @@ -3615,13 +3876,13 @@ The `vlang` module shows you your currently installed version of [V](https://vla | Option | Default | Description | | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"V "` | A format string representing the symbol of V | -| `detect_extensions` | `["v"]` | Which extensions should trigger this module. | -| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'V '` | A format string representing the symbol of V | +| `detect_extensions` | `['v']` | Which extensions should trigger this module. | +| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"blue bold"` | The style for the module. | +| `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `vlang` module. | ### Variables @@ -3637,7 +3898,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla ```toml # ~/.config/starship.toml [vlang] -format = "via [V $version](blue bold) " +format = 'via [V $version](blue bold) ' ``` ## VCSH @@ -3648,9 +3909,9 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | Option | Default | Description | | ---------- | -------------------------------- | ------------------------------------------------------ | -| `symbol` | | The symbol used before displaying the repository name. | -| `style` | `"bold yellow"` | The style for the module. | -| `format` | `"vcsh [$symbol$repo]($style) "` | The format for the module. | +| `symbol` | `''` | The symbol used before displaying the repository name. | +| `style` | `'bold yellow'` | The style for the module. | +| `format` | `'vcsh [$symbol$repo]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `vcsh` module. | ### Variables @@ -3669,7 +3930,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v # ~/.config/starship.toml [vcsh] -format = "[🆅 $repo](bold blue) " +format = '[🆅 $repo](bold blue) ' ``` ## Zig @@ -3682,12 +3943,12 @@ By default the the `zig` module shows the currently installed version of [Zig](h | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"↯ "` | 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. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'↯ '` | The symbol used before displaying the version of Zig. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `zig` module. | -| `detect_extensions` | `["zig"]` | Which extensions should trigger this module. | +| `detect_extensions` | `['zig']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -3707,7 +3968,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h # ~/.config/starship.toml [zig] -symbol = "⚡️ " +symbol = '⚡️ ' ``` ## Custom commands @@ -3752,16 +4013,16 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | Option | Default | Description | | ------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `command` | `''` | The command whose output should be printed. The command will be passed on stdin to the shell. | | `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `description` | `""` | The description of the module that is shown when running `starship explain`. | +| `description` | `''` | The description of the module that is shown when running `starship explain`. | | `detect_files` | `[]` | The files that will be searched in the working directory for a match. | | `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. | | `detect_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. | +| `symbol` | `''` | The symbol used before displaying the command output. | +| `style` | `'bold green'` | The style for the module. | +| `format` | `'[$symbol($output )]($style)'` | The format for the module. | | `disabled` | `false` | Disables this `custom` module. | | `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | | `use_stdin` | | An optional boolean value that overrides whether commands should be forwarded to the shell via the standard input or as an argument. If unset standard input is used by default, unless the shell does not support it (cmd, nushell). Setting this disables shell-specific argument handling. | @@ -3784,14 +4045,14 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt - 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. +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 -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. ```toml -shell = ["pwsh", "-Command", "-"] +shell = ['pwsh', '-Command', '-'] ``` ::: warning Make sure your custom shell configuration exits gracefully @@ -3812,19 +4073,19 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -detect_files = ["foo"] # can specify filters but wildcards are not supported -when = """ test "$HOME" = "$PWD" """ -format = " transcending [$output]($style)" +command = 'echo foo' # shows output of command +detect_files = ['foo'] # can specify filters but wildcards are not supported +when = ''' test "$HOME" = "$PWD" ''' +format = ' transcending [$output]($style)' [custom.time] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command', '-'] [custom.time-as-arg] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command'] use_stdin = false ``` diff --git a/docs/nl-NL/guide/README.md b/docs/nl-NL/guide/README.md index 95f37e0c..35f7ce2d 100644 --- a/docs/nl-NL/guide/README.md +++ b/docs/nl-NL/guide/README.md @@ -217,7 +217,6 @@ Alternatively, install Starship using any of the following package managers: | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | | Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | -| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | @@ -415,6 +414,14 @@ Please check out these previous works that helped inspire the creation of starsh - **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons. +## ❤️ Sponsors + +Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website. + +**Supporter Tier** + +- [Dimension](https://dimension.dev/) +


Starship rocket icon diff --git a/docs/nl-NL/presets/README.md b/docs/nl-NL/presets/README.md index 26c2314b..cb3dcf1b 100644 --- a/docs/nl-NL/presets/README.md +++ b/docs/nl-NL/presets/README.md @@ -10,6 +10,14 @@ This preset changes the symbols for each module to use Nerd Font symbols. [![Screenshot of Nerd Font Symbols preset](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font) +## [No Nerd Fonts](./no-nerd-font.md) + +This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt. + +::: tip This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). ::: + +[Click to view No Nerd Font preset](./no-nerd-font) + ## [Bracketed Segments](./bracketed-segments.md) This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.). @@ -28,6 +36,12 @@ This preset hides the version of language runtimes. If you work in containers or [![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes) +## [No Empty Icons](./no-empty-icons.md) + +This preset does not show icons if the toolset is not found. + +[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Click to view No Runtime Versions preset")](./no-empty-icons.md) + ## [Pure Prompt](./pure-preset.md) This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). @@ -39,3 +53,9 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship. [![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png "Click to view Pure Prompt preset")](./pastel-powerline) + +## [Tokyo Night](./tokyo-night.md) + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) diff --git a/docs/nl-NL/presets/no-empty-icons.md b/docs/nl-NL/presets/no-empty-icons.md new file mode 100644 index 00000000..7be6867d --- /dev/null +++ b/docs/nl-NL/presets/no-empty-icons.md @@ -0,0 +1,17 @@ +[Return to Presets](./README.md#no-empty-icons) + +# No Empty Icons Preset + +If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. + +![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) + +### Configuration + +```sh +starship preset no-empty-icons > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-empty-icons.toml) + +<<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/nl-NL/presets/no-nerd-font.md b/docs/nl-NL/presets/no-nerd-font.md new file mode 100644 index 00000000..b154a6c0 --- /dev/null +++ b/docs/nl-NL/presets/no-nerd-font.md @@ -0,0 +1,19 @@ +[Return to Presets](./README.md#no-nerd-fonts) + +# No Nerd Fonts Preset + +This preset restricts the use of symbols to those from emoji and powerline sets. + +This means that even without a Nerd Font installed, you should be able to view all module symbols. + +This preset will become the default preset in a future release of starship. + +### Configuration + +```sh +starship preset no-nerd-font > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-nerd-font.toml) + +<<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/nl-NL/presets/tokyo-night.md b/docs/nl-NL/presets/tokyo-night.md new file mode 100644 index 00000000..8b4afa44 --- /dev/null +++ b/docs/nl-NL/presets/tokyo-night.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#pastel-powerline) + +# Tokyo Night Preset + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) + +### Benodigdheden + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal + +### Configuration + +```sh +starship preset tokyo-night > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/tokyo-night.toml) + +<<< @/.vuepress/public/presets/toml/tokyo-night.toml diff --git a/docs/pl-PL/advanced-config/README.md b/docs/pl-PL/advanced-config/README.md index 89bd6263..f64ab621 100644 --- a/docs/pl-PL/advanced-config/README.md +++ b/docs/pl-PL/advanced-config/README.md @@ -205,7 +205,9 @@ Some shells support a right prompt which renders on the same line as the input. Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](/config/#fill). -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. + +Note: Nushell 0.71.0 or later is required ### Example @@ -280,5 +282,5 @@ If multiple colors are specified for foreground/background, the last one in the Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: - Many terminals disable support for `blink` by default -- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564). +- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). - `strikethrough` is not supported by the default macOS Terminal.app diff --git a/docs/pl-PL/config/README.md b/docs/pl-PL/config/README.md index 1a480cab..ad5c92f2 100644 --- a/docs/pl-PL/config/README.md +++ b/docs/pl-PL/config/README.md @@ -15,15 +15,17 @@ Cała konfiguracja starship jest wykonywana w tym pliku [TOML](https://github.co # Inserts a blank line between shell prompts add_newline = true -# Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +# 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 ``` +### Config File Location + Możesz zmienić domyślną lokalizację pliku konfiguracyjnego za pomocą zmiennej środowiskowej `STARSHIP_CONFIG`: ```sh @@ -70,6 +72,62 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') W ramach konwencji większość modułów posiada przedrostek w domyślnym kolorze terminala (n.p. `via` w "nodejs") oraz pojedynczy odstęp za treścią modułu. +### Strings + +In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. + +The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. + +| Symbol | Type | Notes | +| ------ | ------------------------- | ------------------------------------------------------ | +| `'` | literal string | less escaping | +| `"` | string | more escaping | +| `'''` | multi-line literal string | less escaping | +| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | + +Na przykład: + +```toml +# literal string +format = '☺\☻ ' + +# regular string +format = "☺\\☻ " + +# escaping Starship symbols +format = '\[\$\] ' +``` + +When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: + +```toml +# with literal string +format = ''' + +\$''' + +# with multiline basic string +format = """ + +\\$""" + +# with basic string +format = "\n\\$" +``` + +In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. + +```toml +format = """ +line1\ +line1\ +line1 +line2\ +line2\ +line2 +""" +``` + ### Formatowanie Moduły wypisują swoje zmienne przy użyciu ciągów formatujących. Większość modułów posiada wpis o nazwie `format`, który konfiguruje format wyświetlania modułu. W ciągach formatujących można używać tekstu, zmiennych oraz grup tekstowych. @@ -80,9 +138,9 @@ Zmienna zawiera symbol `$`, po którym następuje nazwa zmiennej. The name of a Na przykład: -- `$version` to ciąg formatujący ze zmienną o nazwie `version`. -- `$git_branch$git_commit` zawiera dwie zmienne: `git_branch` i `git_commit`. -- `$git_branch $git_commit` zawiera te dwie zmienne rozdzielone spacją. +- `'$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. #### Grupy tekstowe @@ -94,20 +152,20 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri Na przykład: -- `[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. +- `'[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 +- `'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. @@ -117,43 +175,20 @@ A conditional format string wrapped in `(` and `)` will not render if all variab Na przykład: -- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. -- `(some text)` will always show nothing since there are no variables wrapped in the braces. -- 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\] )`. - -#### Special characters - -The following symbols have special usage in a format string and must be escaped: `$ \ [ ] ( )`. - -Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). - -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 = ''' - -\$''' -``` +- `'(@$region)'` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. +- `'(some text)'` will always show nothing since there are no variables wrapped in the braces. +- When `$combined` is a shortcut for `\[$a$b\]`, `'($combined)'` will show nothing only if `$a` and `$b` are both `None`. This works the same as `'(\[$a$b\] )'`. ### Negative matching -Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched. +Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading '!' character. The presence of _any_ negative indicator in the directory will result in the module not being matched. Extensions are matched against both the characters after the last dot in a filename, and the characters after the first dot in a filename. For example, `foo.bar.tar.gz` will be matched against `bar.tar.gz` and `gz` in the `detect_extensions` variable. Files whose name begins with a dot are not considered to have extensions at all. To see how this works in practice, you could match TypeScript but not MPEG Transport Stream files thus: ```toml -detect_extensions = ["ts", "!video.ts", "!audio.ts"] +detect_extensions = ['ts', '!video.ts', '!audio.ts'] ``` ## Prompt @@ -165,11 +200,11 @@ This is the list of prompt-wide configuration options. | Option | Default | Description | | ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `format` | [link](#default-prompt-format) | Configure the format of the prompt. | -| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | +| `right_format` | `''` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | | `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Inserts blank line between shell prompts. | -| `palette` | `""` | Sets which color palette from `palettes` to use. | +| `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | ### Example @@ -178,10 +213,10 @@ This is the list of prompt-wide configuration options. # ~/.config/starship.toml # Use custom format -format = """ +format = ''' [┌───────────────────>](bold green) [│](bold green)$directory$rust$package -[└─>](bold green) """ +[└─>](bold green) ''' # Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 @@ -189,15 +224,15 @@ scan_timeout = 10 # Disable the blank line at the start of the prompt add_newline = false -# Set "foo" as custom color palette -palette = "foo" +# Set 'foo' as custom color palette +palette = 'foo' # Define custom colors [palettes.foo] # Overwrite existing color -blue = "21" +blue = '21' # Define new color -mustard = "#af8700" +mustard = '#af8700' ``` ### Default Prompt Format @@ -205,7 +240,7 @@ mustard = "#af8700" 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" +format = '$all' # Which is equivalent to format = """ @@ -236,7 +271,9 @@ $elixir\ $elm\ $erlang\ $golang\ +$guix_shell\ $haskell\ +$haxe\ $helm\ $java\ $julia\ @@ -245,6 +282,7 @@ $lua\ $nim\ $nodejs\ $ocaml\ +$opa\ $perl\ $php\ $pulumi\ @@ -281,6 +319,7 @@ $jobs\ $battery\ $time\ $status\ +$os\ $container\ $shell\ $character""" @@ -290,7 +329,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format = "$all$directory$character" +format = '$all$directory$character' ``` ## AWS @@ -305,15 +344,17 @@ When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. +When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. + ### Options | Option | Default | Description | | ------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | -| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | -| `profile_aliases` | | Table of profile aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | The style 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. | +| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | +| `style` | `'bold yellow'` | The style for the module. | | `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Disables the `AWS` module. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -339,11 +380,11 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL [aws] format = 'on [$symbol($profile )(\($region\) )]($style)' -style = "bold blue" -symbol = "🅰 " +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' [aws.profile_aliases] CompanyGroupFrobozzOnCallAccess = 'Frobozz' ``` @@ -354,12 +395,12 @@ CompanyGroupFrobozzOnCallAccess = 'Frobozz' # ~/.config/starship.toml [aws] -format = "on [$symbol$region]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$region]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' ``` #### Display profile @@ -368,34 +409,48 @@ us-east-1 = "va" # ~/.config/starship.toml [aws] -format = "on [$symbol$profile]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$profile]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.profile_aliases] Enterprise_Naming_Scheme-voidstars = 'void**' ``` ## Azure -The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription, as defined in the `~/.azure/azureProfile.json` file. +The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription or the username, as defined in the `~/.azure/azureProfile.json` file. ### Options | Zmienne | Default | Description | | ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `"on [$symbol($subscription)]($style) "` | The format for the Azure module to render. | -| `symbol` | `"ﴃ "` | The symbol used in the format. | -| `style` | `"blue bold"` | The style used in the format. | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'ﴃ '` | The symbol used in the format. | +| `style` | `'blue bold'` | The style used in the format. | | `disabled` | `true` | Disables the `azure` module. | -### Example +### Examples + +#### Display Subscription Name ```toml # ~/.config/starship.toml [azure] disabled = false -format = "on [$symbol($subscription)]($style) " +format = 'on [$symbol($subscription)]($style) ' +symbol = 'ﴃ ' +style = 'blue bold' +``` + +#### Display Username + +```toml +# ~/.config/starship.toml + +[azure] +disabled = false +format = "on [$symbol($username)]($style) " symbol = "ﴃ " style = "blue bold" ``` @@ -408,12 +463,12 @@ The `battery` module shows how charged the device's battery is and its current c | 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. | +| `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. | @@ -423,9 +478,9 @@ The `battery` module shows how charged the device's battery is and its current c # ~/.config/starship.toml [battery] -full_symbol = "🔋 " -charging_symbol = "⚡️ " -discharging_symbol = "💀 " +full_symbol = '🔋 ' +charging_symbol = '⚡️ ' +discharging_symbol = '💀 ' ``` ### Battery Display @@ -435,7 +490,7 @@ The `display` configuration option is used to define when the battery indicator ```toml [[battery.display]] threshold = 10 -style = "bold red" +style = 'bold red' ``` The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. @@ -447,21 +502,21 @@ The `display` option is an array of the following table. | Option | Default | Description | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | | `threshold` | `10` | The upper bound for the display option. | -| `style` | `"red bold"` | The style used if the display option is in use. | +| `style` | `'red bold'` | The style used if the display option is in use. | | `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. | | `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. | #### Example ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% threshold = 10 -style = "bold red" +style = 'bold red' -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% threshold = 30 -style = "bold yellow" -discharging_symbol = "💦" +style = 'bold yellow' +discharging_symbol = '💦' # when capacity is over 30%, the battery indicator will not be displayed ``` @@ -477,13 +532,13 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil | Option | Default | Description | | ------------------- | ----------------------------------------------- | ----------------------------------------------------- | -| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. | -| `version_format` | `"v${raw}"` | The version format. | -| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. | +| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. | +| `version_format` | `'v${raw}'` | The version format. | +| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | -| `style` | `"bold blue"` | The style for the module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `elixir` module. | ### Variables @@ -502,7 +557,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil # ~/.config/starship.toml [buf] -symbol = "🦬 " +symbol = '🦬 ' ``` ## Bun @@ -516,13 +571,13 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🍞 "` | A format string representing the symbol of Node.js. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["bun.lockb", "bunfig.toml"]` | Which filenames should trigger this module. | +| `detect_files` | `['bun.lockb', 'bunfig.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | The style for the module. | +| `style` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `bun` module. | ### Variables @@ -541,7 +596,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. # ~/.config/starship.toml [bun] -format = "via [🍔 $version](bold green) " +format = 'via [🍔 $version](bold green) ' ``` ## C @@ -552,14 +607,14 @@ The `c` module shows some information about your C compiler. By default the modu | Option | Default | Description | | ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version(-$name) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"C "` | The symbol used before displaying the compiler details | -| `detect_extensions` | `["c", "h"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ "cc", "--version" ], [ "gcc", "--version" ], [ "clang", "--version" ] ] | How to detect what the compiler is | -| `style` | `"bold 149"` | The style for the module. | +| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | +| `style` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `c` module. | ### Variables @@ -577,7 +632,7 @@ NB that `version` is not in the default format. The `commands` option accepts a list of commands to determine the compiler version and name. -Each command is represented as a list of the executable name, followed by its arguments, usually something like `["mycc", "--version"]`. Starship will try executing each command until it gets a result on STDOUT. +Each command is represented as a list of the executable name, followed by its arguments, usually something like `['mycc', '--version']`. Starship will try executing each command until it gets a result on STDOUT. If a C compiler is not supported by this module, you can request it by [raising an issue on GitHub](https://github.com/starship/starship/). @@ -587,7 +642,7 @@ If a C compiler is not supported by this module, you can request it by [raising # ~/.config/starship.toml [c] -format = "via [$name $version]($style)" +format = 'via [$name $version]($style)' ``` ## Character @@ -611,13 +666,13 @@ By default it only changes color. If you also want to change its shape take a lo | 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. | -| `vimcmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | -| `vimcmd_replace_one_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim `replace_one` mode. | -| `vimcmd_replace_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim replace mode. | -| `vimcmd_visual_symbol` | `"[❮](bold yellow)"` | The format string used before the text input if the shell is in vim replace mode. | +| `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. | +| `vimcmd_symbol` | `'[❮](bold green)'` | The format string used before the text input if the shell is in vim normal mode. | +| `vimcmd_replace_one_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim `replace_one` mode. | +| `vimcmd_replace_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim replace mode. | +| `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | | `disabled` | `false` | Disables the `character` module. | ### Variables @@ -634,8 +689,8 @@ By default it only changes color. If you also want to change its shape take a lo # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[✗](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[✗](bold red) ' ``` #### Without custom error shape @@ -644,8 +699,8 @@ error_symbol = "[✗](bold red) " # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[➜](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[➜](bold red) ' ``` #### With custom vim shape @@ -654,7 +709,7 @@ error_symbol = "[➜](bold red) " # ~/.config/starship.toml [character] -vicmd_symbol = "[V](bold green) " +vicmd_symbol = '[V](bold green) ' ``` ## CMake @@ -668,13 +723,13 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | Option | Default | Description | | ------------------- | -------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"△ "` | The symbol used before the version of cmake. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'△ '` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this module | -| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | +| `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | -| `style` | `"bold blue"` | The style for the module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -698,11 +753,11 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold blue"` | The style for the module. | -| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Which extensions should trigger this module. | +| `symbol` | `'⚙️ '` | The symbol used before displaying the version of COBOL. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold blue'` | The style for the module. | +| `detect_extensions` | `['cbl', 'cob', 'CBL', 'COB']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `cobol` module. | @@ -735,8 +790,8 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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. | +| `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). | @@ -758,7 +813,7 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec [cmd_duration] min_time = 500 -format = "underwent [$duration](bold yellow)" +format = 'underwent [$duration](bold yellow)' ``` ## Conda @@ -776,9 +831,9 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | 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. | +| `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. | @@ -798,7 +853,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c # ~/.config/starship.toml [conda] -format = "[$symbol$environment](dimmed green) " +format = '[$symbol$environment](dimmed green) ' ``` ## Container @@ -809,8 +864,8 @@ The `container` module displays a symbol and container name, if inside a contain | Option | Default | Description | | ---------- | ---------------------------------- | ----------------------------------------- | -| `symbol` | `"⬢"` | The symbol shown, when inside a container | -| `style` | `"bold red dimmed"` | The style for the module. | +| `symbol` | `'⬢'` | The symbol shown, when inside a container | +| `style` | `'bold red dimmed'` | The style for the module. | | `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `container` module. | @@ -844,12 +899,12 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold red"` | The style for the module. | -| `detect_extensions` | `["cr"]` | Which extensions should trigger this module. | -| `detect_files` | `["shard.yml"]` | Which filenames should trigger this module. | +| `symbol` | `'🔮 '` | The symbol used before displaying the version of crystal. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold red'` | The style for the module. | +| `detect_extensions` | `['cr']` | Which extensions should trigger this module. | +| `detect_files` | `['shard.yml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `crystal` module. | @@ -869,7 +924,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// # ~/.config/starship.toml [crystal] -format = "via [✨ $version](bold blue) " +format = 'via [✨ $version](bold blue) ' ``` ## Daml @@ -882,12 +937,12 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"Λ "` | A format string representing the symbol of Daml | -| `style` | `"bold cyan"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'Λ '` | A format string representing the symbol of Daml | +| `style` | `'bold cyan'` | The style for the module. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['daml.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `daml` module. | @@ -907,7 +962,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d # ~/.config/starship.toml [daml] -format = "via [D $version](bold bright-green) " +format = 'via [D $version](bold bright-green) ' ``` ## Dart @@ -922,13 +977,13 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | Option | Default | Description | | ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `detect_extensions` | `["dart"]` | Which extensions should trigger this module. | -| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".dart_tool"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🎯 '` | A format string representing the symbol of Dart | +| `detect_extensions` | `['dart']` | Which extensions should trigger this module. | +| `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | Which filenames should trigger this module. | +| `detect_folders` | `['.dart_tool']` | Which folders should trigger this module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -947,7 +1002,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d # ~/.config/starship.toml [dart] -format = "via [🔰 $version](bold red) " +format = 'via [🔰 $version](bold red) ' ``` ## Deno @@ -960,13 +1015,13 @@ The `deno` module shows you your currently installed version of [Deno](https://d | Option | Default | Description | | ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦕 "` | A format string representing the symbol of Deno | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦕 '` | A format string representing the symbol of Deno | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["deno.json", "deno.jsonc", "mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. | +| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"green bold"` | The style for the module. | +| `style` | `'green bold'` | The style for the module. | | `disabled` | `false` | Disables the `deno` module. | ### Variables @@ -983,7 +1038,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d # ~/.config/starship.toml [deno] -format = "via [🦕 $version](green bold) " +format = 'via [🦕 $version](green bold) ' ``` ## Directory @@ -996,20 +1051,21 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### 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: "…/" | -| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | -| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) | +| 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: '…/' | +| `before_repo_root_style` | | The style for the path segment above the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `'[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) '` | The format of a git repo when `before_repo_root_style` and `repo_root_style` is defined. | +| `home_symbol` | `'~'` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |

This module has a few advanced configuration options that control how the directory is displayed. @@ -1024,8 +1080,8 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ```toml [directory.substitutions] -"/Volumes/network/path" = "/net" -"src/com/long/java/path" = "mypath" +'/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`. @@ -1036,8 +1092,8 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | Zmienne | Example | Description | | --------- | --------------------- | ----------------------------------- | -| path | `"D:/Projects"` | The current directory path | -| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | +| 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 @@ -1048,11 +1104,11 @@ Let us consider the path `/path/to/home/git_repo/src/lib` | Zmienne | Example | Description | | ------------------ | --------------------- | --------------------------------------- | -| before_root_path | `"/path/to/home/"` | The path before git root directory path | -| repo_root | `"git_repo"` | The git root directory name | -| path | `"/src/lib"` | The remaining path | -| style | `"black bold dimmed"` | Mirrors the value of option `style` | -| repo_root_style | `"underline white"` | Style for git root directory name | +| before_root_path | `'/path/to/home/'` | The path before git root directory path | +| repo_root | `'git_repo'` | The git root directory name | +| path | `'/src/lib'` | The remaining path | +| style | `'black bold dimmed'` | Mirrors the value of option `style` | +| repo_root_style | `'underline white'` | Style for git root directory name |
@@ -1063,7 +1119,7 @@ Let us consider the path `/path/to/home/git_repo/src/lib` [directory] truncation_length = 8 -truncation_symbol = "…/" +truncation_symbol = '…/' ``` ## Docker Context @@ -1074,13 +1130,13 @@ The `docker_context` module shows the currently active [Docker context](https:// | Option | Default | Description | | ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `format` | `'via [$symbol$context]($style) '` | The format for the module. | +| `symbol` | `'🐳 '` | The symbol used before displaying the Docker context. | | `only_with_files` | `true` | Only show when there's a match | | `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | +| `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | Which filenames should trigger this module (needs `only_with_files` to be true). | | `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | -| `style` | `"blue bold"` | The style for the module. | +| `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -1099,7 +1155,7 @@ The `docker_context` module shows the currently active [Docker context](https:// # ~/.config/starship.toml [docker_context] -format = "via [🐋 $context](blue bold)" +format = 'via [🐋 $context](blue bold)' ``` ## Dotnet @@ -1127,14 +1183,14 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$var_cluster" +'dev.local.cluster.k8s' = 'dev' +'.*/openshift-cluster/.*' = 'openshift' +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' [kubernetes.user_aliases] -"dev.local.cluster.k8s" = "dev" -"root/.*" = "root" +'dev.local.cluster.k8s' = 'dev' +'root/.*' = 'root' ``` Only show the module in directories that contain a `k8s` file. @@ -2121,14 +2249,14 @@ Long and automatically generated cluster names can be identified and shortened u ```toml [kubernetes.context_aliases] # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -".*/openshift-cluster/.*" = "openshift" +'.*/openshift-cluster/.*' = 'openshift' # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$var_cluster" +'.*/(?P[\\w-]+)/.*' = '$var_cluster' # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' ``` ## Line Break @@ -2159,8 +2287,8 @@ The `localip` module shows the IPv4 address of the primary network interface. | Option | Default | Description | | ---------- | ------------------------- | ------------------------------------------------------ | | `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | The style for the module. | +| `format` | `'[$localipv4]($style) '` | The format for the module. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `true` | Disables the `localip` module. | ### Variables @@ -2179,7 +2307,7 @@ The `localip` module shows the IPv4 address of the primary network interface. [localip] ssh_only = false -format = "@[$localipv4](bold red) " +format = '@[$localipv4](bold red) ' disabled = false ``` @@ -2195,14 +2323,14 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | Option | Default | Description | | ------------------- | ------------------------------------ | -------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | -| `detect_extensions` | `["lua"]` | Which extensions should trigger this module. | -| `detect_files` | `[".lua-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["lua"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | -| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🌙 '` | A format string representing the symbol of Lua. | +| `detect_extensions` | `['lua']` | Which extensions should trigger this module. | +| `detect_files` | `['.lua-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['lua']` | Which folders should trigger this module. | +| `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 @@ -2221,7 +2349,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o # ~/.config/starship.toml [lua] -format = "via [🌕 $version](bold blue) " +format = 'via [🌕 $version](bold blue) ' ``` ## Memory Usage @@ -2241,9 +2369,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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. | +| `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 @@ -2267,8 +2395,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y [memory_usage] disabled = false threshold = -1 -symbol = " " -style = "bold dimmed green" +symbol = ' ' +style = 'bold dimmed green' ``` ## Meson @@ -2282,10 +2410,10 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. | Option | Default | Description | | ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- | | `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | -| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. | -| `format` | `"via [$symbol$project]($style) "` | The format for the module. | -| `symbol` | `"⬢ "` | The symbol used before displaying the project name. | -| `style` | `"blue bold"` | The style for the module. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | +| `format` | `'via [$symbol$project]($style) '` | The format for the module. | +| `symbol` | `'⬢ '` | The symbol used before displaying the project name. | +| `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `meson` module. | ### Variables @@ -2305,9 +2433,9 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. [meson] disabled = false -truncation_symbol = "--" -symbol = " " -style = "bold dimmed green" +truncation_symbol = '--' +symbol = ' ' +style = 'bold dimmed green' ``` ## Mercurial Branch @@ -2318,11 +2446,11 @@ The `hg_branch` module shows the active branch of the repo in your current direc | 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. | +| `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 `N` graphemes | -| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a branch name was truncated. | | `disabled` | `true` | Disables the `hg_branch` module. | ### Variables @@ -2341,9 +2469,9 @@ The `hg_branch` module shows the active branch of the repo in your current direc # ~/.config/starship.toml [hg_branch] -format = "on [🌱 $branch](bold purple)" +format = 'on [🌱 $branch](bold purple)' truncation_length = 4 -truncation_symbol = "" +truncation_symbol = '' ``` ## Nim @@ -2359,13 +2487,13 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | -| `detect_extensions` | `["nim", "nims", "nimble"]` | Which extensions should trigger this module. | -| `detect_files` | `["nim.cfg"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'👑 '` | The symbol used before displaying the version of Nim. | +| `detect_extensions` | `['nim', 'nims', 'nimble']` | Which extensions should trigger this module. | +| `detect_files` | `['nim.cfg']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | The style for the module. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `nim` module. | ### Variables @@ -2384,8 +2512,8 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang # ~/.config/starship.toml [nim] -style = "yellow" -symbol = "🎣 " +style = 'yellow' +symbol = '🎣 ' ``` ## Nix-shell @@ -2397,10 +2525,10 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | 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. | +| `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 @@ -2421,8 +2549,8 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ [nix_shell] disabled = true -impure_msg = "[impure shell](bold red)" -pure_msg = "[pure shell](bold green)" +impure_msg = '[impure shell](bold red)' +pure_msg = '[pure shell](bold green)' format = 'via [☃️ $state( \($name\))](bold blue) ' ``` @@ -2441,13 +2569,13 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | Option | Default | Description | | ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string representing the symbol of Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts", "mts", "cts"]` | Which extensions should trigger this module. | -| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | -| `style` | `"bold green"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string representing the symbol of Node.js. | +| `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Which extensions should trigger this module. | +| `detect_files` | `['package.json', '.node-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['node_modules']` | Which folders should trigger this module. | +| `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 package.json does not match the Node.js version. | @@ -2467,7 +2595,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n # ~/.config/starship.toml [nodejs] -format = "via [🤖 $version](bold green) " +format = 'via [🤖 $version](bold green) ' ``` ## OCaml @@ -2485,15 +2613,15 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | Option | Default | Description | | ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | -| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | -| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | -| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Which extensions should trigger this module. | -| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Which filenames should trigger this module. | -| `detect_folders` | `["_opam", "esy.lock"]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | The style for the module. | +| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐫 '` | The symbol used before displaying the version of OCaml. | +| `global_switch_indicator` | `''` | The format string used to represent global OPAM switch. | +| `local_switch_indicator` | `'*'` | The format string used to represent local OPAM switch. | +| `detect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | Which extensions should trigger this module. | +| `detect_files` | `['dune', 'dune-project', 'jbuild', 'jbuild-ignore', '.merlin']` | Which filenames should trigger this module. | +| `detect_folders` | `['_opam', 'esy.lock']` | Which folders should trigger this module. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `ocaml` module. | ### Variables @@ -2514,7 +2642,43 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam # ~/.config/starship.toml [ocaml] -format = "via [🐪 $version]($style) " +format = 'via [🐪 $version]($style) ' +``` + +## Open Policy Agent + +The `opa` module shows the currently installed version of the OPA tool. By default the module will be shown if the current directory contains a `.rego` file. + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | +| `detect_extensions` | `['rego']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'bold blue'` | The style for the module. | +| `disabled` | `false` | Disables the `opa` module. | + +### Variables + +| Zmienne | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.44.0` | The version of `opa` | +| symbol | | Mirrors the 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 + +[opa] +format = 'via [⛑️ $version](bold red) ' ``` ## OpenStack @@ -2526,8 +2690,8 @@ The `openstack` module shows the current OpenStack cloud and project. The module | Option | Default | Description | | ---------- | ----------------------------------------------- | -------------------------------------------------------------- | | `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | -| `style` | `"bold yellow"` | The style for the module. | +| `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 @@ -2548,8 +2712,105 @@ The `openstack` module shows the current OpenStack cloud and project. The module [openstack] format = 'on [$symbol$cloud(\($project\))]($style) ' -style = "bold yellow" -symbol = "☁️ " +style = 'bold yellow' +symbol = '☁️ ' +``` + +## OS + +The `os` module shows the current operating system. OS information is detected via the [os_info](https://lib.rs/crates/os_info) crate. + +::: uwaga + +The [os_info](https://lib.rs/crates/os_info) crate used by this module is known to be inaccurate on some systems. + +::: + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ---------- | --------------------- | ------------------------------------------------------ | +| `format` | `"[$symbol]($style)"` | The format for the module. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `true` | Disables the `os` module. | +| `symbols` | | A table that maps each operating system to its symbol. | + +`symbols` allows you to define arbitrary symbols to display for each operating system type. Operating system types not defined by your configuration use the default symbols table below. All operating systems currently supported by the module are listed below. If you would like an operating system to be added, feel free to open a [feature request](https://github.com/starship/starship/issues/new/choose). + +```toml +# This is the default symbols table. +[os.symbols] +Alpine = "🏔️ " +Amazon = "🙂 " +Android = "🤖 " +Arch = "🎗️ " +CentOS = "💠 " +Debian = "🌀 " +DragonFly = "🐉 " +Emscripten = "🔗 " +EndeavourOS = "🚀 " +Fedora = "🎩 " +FreeBSD = "😈 " +Garuda = "🦅 " +Gentoo = "🗜️ " +HardenedBSD = "🛡️ " +Illumos = "🐦 " +Linux = "🐧 " +Macos = "🍎 " +Manjaro = "🥭 " +Mariner = "🌊 " +MidnightBSD = "🌘 " +Mint = "🌿 " +NetBSD = "🚩 " +NixOS = "❄️ " +OpenBSD = "🐡 " +openSUSE = "🦎 " +OracleLinux = "🦴 " +Pop = "🍭 " +Raspbian = "🍓 " +Redhat = "🎩 " +RedHatEnterprise = "🎩 " +Redox = "🧪 " +Solus = "⛵ " +SUSE = "🦎 " +Ubuntu = "🎯 " +Unknown = "❓ " +Windows = "🪟 " +``` + +### Variables + +| Zmienne | Example | Description | +| --------- | ------------ | ------------------------------------------------------------------ | +| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | +| name | `Arch Linux` | The current operating system name | +| type | `Arch` | The current operating system type | +| codename | | The current operating system codename, if applicable | +| edition | | The current operating system edition, if applicable | +| version | | The current operating system version, if applicable | +| 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 + +[os] +format = "on [($name )]($style)" +style = "bold blue" +disabled = false + +[os.symbols] +Windows = " " +Arch = "Arch is the best! " ``` ## Package Version @@ -2580,10 +2841,10 @@ The `package` module is shown when the current directory is the repository for a | Option | Default | Description | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"is [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold 208"` | The style for the module. | +| `format` | `'is [$symbol$version]($style) '` | The format for the module. | +| `symbol` | `'📦 '` | The symbol used before displaying the version the package. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `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. | @@ -2603,7 +2864,7 @@ The `package` module is shown when the current directory is the repository for a # ~/.config/starship.toml [package] -format = "via [🎁 $version](208 bold) " +format = 'via [🎁 $version](208 bold) ' ``` ## Perl @@ -2620,13 +2881,13 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe | Option | Default | Description | | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | -| `detect_extensions` | `["pl", "pm", "pod"]` | Which extensions should trigger this module. | -| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | +| `detect_extensions` | `['pl', 'pm', 'pod']` | Which extensions should trigger this module. | +| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | The style for the module. | +| `style` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `perl` module. | ### Variables @@ -2643,7 +2904,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe # ~/.config/starship.toml [perl] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## PHP @@ -2658,13 +2919,13 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | -| `detect_extensions` | `["php"]` | Which extensions should trigger this module. | -| `detect_files` | `["composer.json", ".php-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐘 '` | The symbol used before displaying the version of PHP. | +| `detect_extensions` | `['php']` | Which extensions should trigger this module. | +| `detect_files` | `['composer.json', '.php-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"147 bold"` | The style for the module. | +| `style` | `'147 bold'` | The style for the module. | | `disabled` | `false` | Disables the `php` module. | ### Variables @@ -2683,7 +2944,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. # ~/.config/starship.toml [php] -format = "via [🔹 $version](147 bold) " +format = 'via [🔹 $version](147 bold) ' ``` ## Pulumi @@ -2705,10 +2966,10 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string shown before the Pulumi stack. | -| `style` | `"bold 5"` | The style for the module. | +| `format` | `'via [$symbol($username@)$stack]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string shown before the Pulumi stack. | +| `style` | `'bold 5'` | The style for the module. | | `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | | `disabled` | `false` | Disables the `pulumi` module. | @@ -2732,7 +2993,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [pulumi] -format = "[🛥 ($version )$stack]($style) " +format = '[🛥 ($version )$stack]($style) ' ``` #### Without Pulumi version @@ -2740,8 +3001,8 @@ format = "[🛥 ($version )$stack]($style) " ```toml # ~/.config/starship.toml [pulumi] -symbol = "🛥 " -format = "[$symbol$stack]($style) " +symbol = '🛥 ' +format = '[$symbol$stack]($style) ' ``` ## PureScript @@ -2755,13 +3016,13 @@ The `purescript` module shows the currently installed version of [PureScript](ht | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | -| `detect_extensions` | `["purs"]` | Which extensions should trigger this module. | -| `detect_files` | `["spago.dhall"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'<=> '` | The symbol used before displaying the version of PureScript. | +| `detect_extensions` | `['purs']` | Which extensions should trigger this module. | +| `detect_files` | `['spago.dhall']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold white"` | The style for the module. | +| `style` | `'bold white'` | The style for the module. | | `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -2780,7 +3041,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht # ~/.config/starship.toml [purescript] -format = "via [$symbol$version](bold white)" +format = 'via [$symbol$version](bold white)' ``` ## Python @@ -2806,14 +3067,14 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | | `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | The style for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐍 '` | A format string representing the symbol of 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 | -| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `detect_extensions` | `["py"]` | Which extensions should trigger this module | -| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module | +| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | +| `detect_extensions` | `['py']` | Which extensions should trigger this module | +| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | | `disabled` | `false` | Disables the `python` module. | @@ -2821,7 +3082,7 @@ By default the module will be shown if any of the following conditions are met: 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. +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. ::: @@ -2829,11 +3090,11 @@ The default values and order for `python_binary` was chosen to first identify th | Zmienne | 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 | +| 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 @@ -2841,7 +3102,7 @@ The default values and order for `python_binary` was chosen to first identify th # ~/.config/starship.toml [python] -symbol = "👾 " +symbol = '👾 ' pyenv_version_name = true ``` @@ -2850,7 +3111,7 @@ pyenv_version_name = true [python] # Only use the `python3` binary to get the version. -python_binary = "python3" +python_binary = 'python3' ``` ```toml @@ -2869,7 +3130,7 @@ detect_extensions = [] # # Note this will only work when the venv is inside the project and it will only # work in the directory that contains the venv dir but maybe this is ok? -python_binary = ["./venv/bin/python", "python", "python3", "python2"] +python_binary = ['./venv/bin/python', 'python', 'python3', 'python2'] ``` ## R @@ -2888,13 +3149,13 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"📐"` | A format string representing the symbol of R. | -| `style` | `"blue bold"` | The style for the module. | -| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module | -| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module | -| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'📐'` | A format string representing the symbol of R. | +| `style` | `'blue bold'` | The style for the module. | +| `detect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | Which extensions should trigger this module | +| `detect_files` | `['.Rprofile']` | Which filenames should trigger this module | +| `detect_folders` | `['.Rproj.user']` | Which folders should trigger this module | | `disabled` | `false` | Disables the `r` module. | ### Variables @@ -2903,7 +3164,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | ------- | ------------- | ------------------------------------ | | version | `v4.0.5` | The version of `R` | | symbol | | Mirrors the value of option `symbol` | -| style | `"blue bold"` | Mirrors the value of option `style` | +| style | `'blue bold'` | Mirrors the value of option `style` | ### Example @@ -2911,7 +3172,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr # ~/.config/starship.toml [rlang] -format = "with [📐 $version](blue bold) " +format = 'with [📐 $version](blue bold) ' ``` ## Raku @@ -2925,13 +3186,13 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra | Option | Default | Description | | ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version-$vm_version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦋 "` | The symbol used before displaying the version of Raku | -| `detect_extensions` | `["p6", "pm6", "pod6", "raku", "rakumod"]` | Which extensions should trigger this module. | -| `detect_files` | `["META6.json"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version-$vm_version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦋 '` | The symbol used before displaying the version of Raku | +| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Which extensions should trigger this module. | +| `detect_files` | `['META6.json']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | The style for the module. | +| `style` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `raku` module. | ### Variables @@ -2949,7 +3210,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra # ~/.config/starship.toml [raku] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## Red @@ -2962,13 +3223,13 @@ By default the `red` module shows the currently installed version of [Red](https | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | -| `detect_extensions` | `["red"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🔺 '` | A format string representing the symbol of Red. | +| `detect_extensions` | `['red']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"red bold"` | The style for the module. | +| `style` | `'red bold'` | The style for the module. | | `disabled` | `false` | Disables the `red` module. | ### Variables @@ -2987,7 +3248,7 @@ By default the `red` module shows the currently installed version of [Red](https # ~/.config/starship.toml [red] -symbol = "🔴 " +symbol = '🔴 ' ``` ## Ruby @@ -3005,14 +3266,14 @@ Starship gets the current Ruby version by running `ruby -v`. | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. | -| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💎 '` | A format string representing the symbol of Ruby. | +| `detect_extensions` | `['rb']` | Which extensions should trigger this module. | +| `detect_files` | `['Gemfile', '.ruby-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | -| `style` | `"bold red"` | The style for the module. | +| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Which environment variables should trigger this module. | +| `style` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `ruby` module. | ### Variables @@ -3031,7 +3292,7 @@ Starship gets the current Ruby version by running `ruby -v`. # ~/.config/starship.toml [ruby] -symbol = "🔺 " +symbol = '🔺 ' ``` ## Rust @@ -3045,13 +3306,13 @@ By default the `rust` module shows the currently installed version of [Rust](htt | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. | -| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦀 '` | A format string representing the symbol of Rust | +| `detect_extensions` | `['rs']` | Which extensions should trigger this module. | +| `detect_files` | `['Cargo.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | The style for the module. | +| `style` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -3072,7 +3333,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt # ~/.config/starship.toml [rust] -format = "via [⚙️ $version](red bold)" +format = 'via [⚙️ $version](red bold)' ``` ## Scala @@ -3087,13 +3348,13 @@ The `scala` module shows the currently installed version of [Scala](https://www. | Option | Default | Description | | ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | -| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | -| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | -| `style` | `"red dimmed"` | The style for the module. | +| `format` | `'via [${symbol}(${version} )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. | +| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. | +| `detect_folders` | `['.metals']` | Which folders should trigger this modules. | +| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. | +| `style` | `'red dimmed'` | The style for the module. | | `disabled` | `false` | Disables the `scala` module. | ### Variables @@ -3112,7 +3373,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. # ~/.config/starship.toml [scala] -symbol = "🌟 " +symbol = '🌟 ' ``` ## Shell @@ -3129,19 +3390,19 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `"bsh"` | A format string used to represent bash. | -| `fish_indicator` | `"fsh"` | A format string used to represent fish. | -| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. | -| `powershell_indicator` | `"psh"` | A format string used to represent powershell. | -| `ion_indicator` | `"ion"` | A format string used to represent ion. | -| `elvish_indicator` | `"esh"` | A format string used to represent elvish. | -| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. | -| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. | -| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. | -| `nu_indicator` | `"nu"` | A format string used to represent nu. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `"[$indicator]($style) "` | The format for the module. | -| `style` | `"white bold"` | The style for the module. | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `style` | `'white bold'` | The style for the module. | | `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3159,26 +3420,26 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [shell] -fish_indicator = "" -powershell_indicator = "_" -unknown_indicator = "mystery shell" -style = "cyan bold" +fish_indicator = '' +powershell_indicator = '_' +unknown_indicator = 'mystery shell' +style = 'cyan bold' disabled = false ``` ## SHLVL -The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ('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`. | +| `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. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `true` | Disables the `shlvl` module. | ### Variables @@ -3198,7 +3459,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int [shlvl] disabled = false -format = "$shlvl level(s) down" +format = '$shlvl level(s) down' threshold = 3 ``` @@ -3211,8 +3472,8 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | 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. | +| `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 @@ -3243,9 +3504,9 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | Option | Default | Description | | ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | The number of directories the environment path should be truncated to. `0` means no truncation. Also see the [`directory`](#directory) module. | -| `symbol` | `"🅢 "` | The symbol used before the environment name. | -| `style` | `"bold blue"` | The style for the module. | -| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `symbol` | `'🅢 '` | The symbol used before the environment name. | +| `style` | `'bold blue'` | The style for the module. | +| `format` | `'via [$symbol$environment]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `spack` module. | ### Variables @@ -3264,7 +3525,7 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat # ~/.config/starship.toml [spack] -format = "[$symbol$environment](dimmed blue) " +format = '[$symbol$environment](dimmed blue) ' ``` ## Status @@ -3281,14 +3542,14 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `format` | `"[$symbol$status]($style) "` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `success_symbol` | `""` | The symbol displayed on program success | -| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | -| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | -| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | -| `style` | `"bold red"` | The style for the module. | +| `format` | `'[$symbol$status]($style) '` | The format of the module | +| `symbol` | `'❌'` | The symbol displayed on program error | +| `success_symbol` | `''` | The symbol displayed on program success | +| `not_executable_symbol` | `'🚫'` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `'🔍'` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `'🧱'` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `'⚡'` | The symbol displayed on any signal | +| `style` | `'bold red'` | The style for the module. | | `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code | | `pipestatus` | `false` | Enable pipestatus reporting | @@ -3320,9 +3581,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [status] -style = "bg:blue" -symbol = "🔴 " -success_symbol = "🟢 SUCCESS" +style = 'bg:blue' +symbol = '🔴 ' +success_symbol = '🟢 SUCCESS' format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false @@ -3342,9 +3603,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | --------------- | ------------------------ | ------------------------------------------------------- | -| `format` | `"[as $symbol]($style)"` | The format of the module | -| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached | -| `style` | `"bold blue"` | The style for the module. | +| `format` | `'[as $symbol]($style)'` | The format of the module | +| `symbol` | `'🧙 '` | The symbol displayed when credentials are cached | +| `style` | `'bold blue'` | The style for the module. | | `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | | `disabled` | `true` | Disables the `sudo` module. | @@ -3363,8 +3624,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [sudo] -style = "bold green" -symbol = "👩‍💻 " +style = 'bold green' +symbol = '👩‍💻 ' disabled = false ``` @@ -3388,13 +3649,13 @@ By default the `swift` module shows the currently installed version of [Swift](h | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `detect_extensions` | `["swift"]` | Which extensions should trigger this module. | -| `detect_files` | `["Package.swift"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐦 '` | A format string representing the symbol of Swift | +| `detect_extensions` | `['swift']` | Which extensions should trigger this module. | +| `detect_files` | `['Package.swift']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 202"` | The style for the module. | +| `style` | `'bold 202'` | The style for the module. | | `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -3413,7 +3674,7 @@ By default the `swift` module shows the currently installed version of [Swift](h # ~/.config/starship.toml [swift] -format = "via [🏎 $version](red bold)" +format = 'via [🏎 $version](red bold)' ``` ## Terraform @@ -3435,13 +3696,13 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol$workspace]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💠'` | A format string shown before the terraform workspace. | +| `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | -| `style` | `"bold 105"` | The style for the module. | +| `detect_folders` | `['.terraform']` | Which folders should trigger this module. | +| `style` | `'bold 105'` | The style for the module. | | `disabled` | `false` | Disables the `terraform` module. | ### Variables @@ -3463,7 +3724,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [terraform] -format = "[🏎💨 $version$workspace]($style) " +format = '[🏎💨 $version$workspace]($style) ' ``` #### Without Terraform version @@ -3472,7 +3733,7 @@ format = "[🏎💨 $version$workspace]($style) " # ~/.config/starship.toml [terraform] -format = "[🏎💨 $workspace]($style) " +format = '[🏎💨 $workspace]($style) ' ``` ## Time @@ -3489,15 +3750,15 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | The format string for the module. | +| `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. | +| `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 | +| `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. +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 @@ -3516,9 +3777,9 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de [time] disabled = false format = '🕙[\[ $time \]]($style) ' -time_format = "%T" -utc_time_offset = "-5" -time_range = "10:00:00-14:00:00" +time_format = '%T' +utc_time_offset = '-5' +time_range = '10:00:00-14:00:00' ``` ## Username @@ -3540,9 +3801,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Option | Default | Description | | ------------- | ----------------------- | ------------------------------------------- | -| `style_root` | `"bold red"` | The style used when the user is root/admin. | -| `style_user` | `"bold yellow"` | The style used for non-root users. | -| `format` | `"[$user]($style) in "` | The format for the module. | +| `style_root` | `'bold red'` | The style used when the user is root/admin. | +| `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. | @@ -3550,8 +3811,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Zmienne | 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. | +| `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 @@ -3559,9 +3820,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` # ~/.config/starship.toml [username] -style_user = "white bold" -style_root = "black bold" -format = "user: [$user]($style) " +style_user = 'white bold' +style_root = 'black bold' +format = 'user: [$user]($style) ' disabled = false show_always = true ``` @@ -3576,13 +3837,13 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'⍱ '` | A format string representing the symbol of Vagrant. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["Vagrantfile"]` | Which filenames should trigger this module. | +| `detect_files` | `['Vagrantfile']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"cyan bold"` | The style for the module. | +| `style` | `'cyan bold'` | The style for the module. | | `disabled` | `false` | Disables the `vagrant` module. | ### Variables @@ -3601,7 +3862,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// # ~/.config/starship.toml [vagrant] -format = "via [⍱ $version](bold white) " +format = 'via [⍱ $version](bold white) ' ``` ## V @@ -3615,13 +3876,13 @@ The `vlang` module shows you your currently installed version of [V](https://vla | Option | Default | Description | | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"V "` | A format string representing the symbol of V | -| `detect_extensions` | `["v"]` | Which extensions should trigger this module. | -| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'V '` | A format string representing the symbol of V | +| `detect_extensions` | `['v']` | Which extensions should trigger this module. | +| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"blue bold"` | The style for the module. | +| `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `vlang` module. | ### Variables @@ -3637,7 +3898,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla ```toml # ~/.config/starship.toml [vlang] -format = "via [V $version](blue bold) " +format = 'via [V $version](blue bold) ' ``` ## VCSH @@ -3648,9 +3909,9 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | Option | Default | Description | | ---------- | -------------------------------- | ------------------------------------------------------ | -| `symbol` | | The symbol used before displaying the repository name. | -| `style` | `"bold yellow"` | The style for the module. | -| `format` | `"vcsh [$symbol$repo]($style) "` | The format for the module. | +| `symbol` | `''` | The symbol used before displaying the repository name. | +| `style` | `'bold yellow'` | The style for the module. | +| `format` | `'vcsh [$symbol$repo]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `vcsh` module. | ### Variables @@ -3669,7 +3930,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v # ~/.config/starship.toml [vcsh] -format = "[🆅 $repo](bold blue) " +format = '[🆅 $repo](bold blue) ' ``` ## Zig @@ -3682,12 +3943,12 @@ By default the the `zig` module shows the currently installed version of [Zig](h | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"↯ "` | 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. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'↯ '` | The symbol used before displaying the version of Zig. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `zig` module. | -| `detect_extensions` | `["zig"]` | Which extensions should trigger this module. | +| `detect_extensions` | `['zig']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -3707,7 +3968,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h # ~/.config/starship.toml [zig] -symbol = "⚡️ " +symbol = '⚡️ ' ``` ## Custom commands @@ -3752,16 +4013,16 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | Option | Default | Description | | ------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `command` | `''` | The command whose output should be printed. The command will be passed on stdin to the shell. | | `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `description` | `""` | The description of the module that is shown when running `starship explain`. | +| `description` | `''` | The description of the module that is shown when running `starship explain`. | | `detect_files` | `[]` | The files that will be searched in the working directory for a match. | | `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. | | `detect_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. | +| `symbol` | `''` | The symbol used before displaying the command output. | +| `style` | `'bold green'` | The style for the module. | +| `format` | `'[$symbol($output )]($style)'` | The format for the module. | | `disabled` | `false` | Disables this `custom` module. | | `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | | `use_stdin` | | An optional boolean value that overrides whether commands should be forwarded to the shell via the standard input or as an argument. If unset standard input is used by default, unless the shell does not support it (cmd, nushell). Setting this disables shell-specific argument handling. | @@ -3784,14 +4045,14 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt - 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. +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 -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. ```toml -shell = ["pwsh", "-Command", "-"] +shell = ['pwsh', '-Command', '-'] ``` ::: warning Make sure your custom shell configuration exits gracefully @@ -3812,19 +4073,19 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -detect_files = ["foo"] # can specify filters but wildcards are not supported -when = """ test "$HOME" = "$PWD" """ -format = " transcending [$output]($style)" +command = 'echo foo' # shows output of command +detect_files = ['foo'] # can specify filters but wildcards are not supported +when = ''' test "$HOME" = "$PWD" ''' +format = ' transcending [$output]($style)' [custom.time] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command', '-'] [custom.time-as-arg] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command'] use_stdin = false ``` diff --git a/docs/pl-PL/guide/README.md b/docs/pl-PL/guide/README.md index eaf9156c..de464da5 100644 --- a/docs/pl-PL/guide/README.md +++ b/docs/pl-PL/guide/README.md @@ -219,7 +219,6 @@ Alternatively, install Starship using any of the following package managers: | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | | Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | -| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | @@ -417,6 +416,14 @@ Zapoznaj się z wcześniejszymi projektami które zainspirowały nas do stworzen - **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons. +## ❤️ Sponsors + +Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website. + +**Supporter Tier** + +- [Dimension](https://dimension.dev/) +


Starship rocket icon diff --git a/docs/pl-PL/presets/README.md b/docs/pl-PL/presets/README.md index c601524b..660dbff3 100644 --- a/docs/pl-PL/presets/README.md +++ b/docs/pl-PL/presets/README.md @@ -10,6 +10,14 @@ This preset changes the symbols for each module to use Nerd Font symbols. [![Screenshot of Nerd Font Symbols preset](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font) +## [No Nerd Fonts](./no-nerd-font.md) + +This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt. + +::: tip This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). ::: + +[Click to view No Nerd Font preset](./no-nerd-font) + ## [Moduły w nawiasach kwadratowych](./bracketed-segments.md) Ta konfiguracja zmienia format wyświetlania wbudowanych modułów - zamiast domyślnych wyrazów ("via", "on", itp.) są wypisywane w nawiasach kwadratowych. @@ -28,6 +36,12 @@ This preset hides the version of language runtimes. If you work in containers or [![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes) +## [No Empty Icons](./no-empty-icons.md) + +This preset does not show icons if the toolset is not found. + +[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Click to view No Runtime Versions preset")](./no-empty-icons.md) + ## [Pure Prompt](./pure-preset.md) This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). @@ -39,3 +53,9 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship. [![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png "Click to view Pure Prompt preset")](./pastel-powerline) + +## [Tokyo Night](./tokyo-night.md) + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) diff --git a/docs/pl-PL/presets/no-empty-icons.md b/docs/pl-PL/presets/no-empty-icons.md new file mode 100644 index 00000000..edd62610 --- /dev/null +++ b/docs/pl-PL/presets/no-empty-icons.md @@ -0,0 +1,17 @@ +[Return to Presets](./README.md#no-empty-icons) + +# No Empty Icons Preset + +If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. + +![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) + +### Konfiguracja + +```sh +starship preset no-empty-icons > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-empty-icons.toml) + +<<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/pl-PL/presets/no-nerd-font.md b/docs/pl-PL/presets/no-nerd-font.md new file mode 100644 index 00000000..74f77c45 --- /dev/null +++ b/docs/pl-PL/presets/no-nerd-font.md @@ -0,0 +1,19 @@ +[Return to Presets](./README.md#no-nerd-fonts) + +# No Nerd Fonts Preset + +This preset restricts the use of symbols to those from emoji and powerline sets. + +This means that even without a Nerd Font installed, you should be able to view all module symbols. + +This preset will become the default preset in a future release of starship. + +### Konfiguracja + +```sh +starship preset no-nerd-font > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-nerd-font.toml) + +<<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/pl-PL/presets/tokyo-night.md b/docs/pl-PL/presets/tokyo-night.md new file mode 100644 index 00000000..2246f127 --- /dev/null +++ b/docs/pl-PL/presets/tokyo-night.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#pastel-powerline) + +# Tokyo Night Preset + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) + +### Wymagania wstępne + +- Czcionka typu [Nerd Font](https://www.nerdfonts.com/) zainstalowana i włączona w twoim terminalu + +### Konfiguracja + +```sh +starship preset tokyo-night > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/tokyo-night.toml) + +<<< @/.vuepress/public/presets/toml/tokyo-night.toml diff --git a/docs/pt-BR/README.md b/docs/pt-BR/README.md index ac838e54..dbcf79bf 100644 --- a/docs/pt-BR/README.md +++ b/docs/pt-BR/README.md @@ -55,7 +55,7 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam ```sh brew install starship ``` - With [Winget](https://github.com/microsoft/winget-cli): + Com o [Winget](https://github.com/microsoft/winget-cli): ```powershell winget install starship @@ -121,7 +121,7 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam ::: atenção - Only elvish v0.18 or higher is supported. + Apenas elvish v0.18 ou superior é suportado. ::: @@ -149,11 +149,11 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam ::: atenção - This will change in the future. Somente Nushell v0.61+ é suportado. + Isto irá mudar no futuro. Somente Nushell v0.61+ é suportado. ::: - Add the following to to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell): + Adicione o seguinte ao final do seu arquivo env do Nushell (encontre-o executando `$nu.env-path` no Nushell): ```sh mkdir ~/.cache/starship starship init nu | save ~/.cache/starship/init.nu diff --git a/docs/pt-BR/advanced-config/README.md b/docs/pt-BR/advanced-config/README.md index fb891a6f..f6f3437e 100644 --- a/docs/pt-BR/advanced-config/README.md +++ b/docs/pt-BR/advanced-config/README.md @@ -8,7 +8,7 @@ As configurações nesta seção estão sujeitas a alterações em futuras vers ::: -## TransientPrompt in PowerShell +## TransientPrompt no PowerShell It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`. @@ -205,7 +205,9 @@ Alguns shells suportam um prompt direito que é renderizado na mesma linha que a Nota: O prompt direito é uma única linha após o local de entrada. Para alinhar módulos à direita acima da linha de entrada em um prompt de várias linhas, consulte o [módulo `fill`](/config/#fill). -`right_format` é atualmente compatível com os seguintes shells: elvish, fish, zsh, xonsh, cmd. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. + +Note: Nushell 0.71.0 or later is required ### Exemplo @@ -280,5 +282,5 @@ Se várias cores forem especificadas para primeiro plano/plano de fundo, a últi Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: - Many terminals disable support for `blink` by default -- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564). +- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). - `strikethrough` is not supported by the default macOS Terminal.app diff --git a/docs/pt-BR/config/README.md b/docs/pt-BR/config/README.md index b8af885f..7792fa5b 100644 --- a/docs/pt-BR/config/README.md +++ b/docs/pt-BR/config/README.md @@ -9,21 +9,23 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Todas as configurações do starship são feitas neste arquivo [TOML](https://github.com/toml-lang/toml): ```toml -# Obtém os preenchimentos automáticos do editor com base em um esquema de configuração +# Get editor completions based on the config schema "$schema" = 'https://starship.rs/config-schema.json' -# Insere uma quebra de linha entre os prompts do shell +# Inserts a blank line between shell prompts add_newline = true -# Substitui o símbolo "❯" no prompt por "➜" -[character] # O nome do módulo que estamos configurando é "character" -success_symbol = "[➜](bold green)" # O segmento "success_symbol" está sendo definido como "➜" com a cor verde em negrito +# 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' -# Desativa o módulo do pacote, ocultando-o completamente do prompt +# Disable the package module, hiding it from the prompt completely [package] disabled = true ``` +### Config File Location + Você pode alterar o caminho padrão do arquivo de configuração com a variável de ambiente `STARSHIP_CONFIG`: ```sh @@ -70,106 +72,139 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') Por convenção, a maioria dos módulos tem um prefixo de cor (e.x. `via` no "nodejs") e um espaço vazio para sufixo. -### Formatação de Strings +### Strings -Formatar uma string é a forma de como o módulo ira imprimir suas variáveis. A maioria dos módulos tem uma entrada chamada `format` que configura o formato que o módulo é exibido. Você pode usar textos, variáveis e grupo de textos em uma formatação de string. +In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. -#### Variável +The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. -Uma variável contem um simbolo `$` seguido pelo nome da variável. O nome de uma variável pode apenas conter letras, números e `_`. +| Symbol | Type | Notes | +| ------ | ------------------------- | ------------------------------------------------------ | +| `'` | literal string | less escaping | +| `"` | string | more escaping | +| `'''` | multi-line literal string | less escaping | +| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | Por exemplo: -- `$version` é uma formatação de string com uma variável chamada `version`. -- `$git_branch$git_commit` é uma formatação de string com duas variáveis chamadas `git_branch` e `git_commit`. -- `$git_branch $git_commit` Tem as duas variáveis separadas por espaço. - -#### Grupo de Texto - -Um grupo de texto é composto por duas partes diferentes. - -A primeira parte, é contida em um `[]`, é uma [formatação de string](#format-strings). Você pode adicionar textos, variáveis ou até mesmos grupo de textos aninhados. - -Na segunda parte, é composta por um `()`, é uma [estilização de string](#style-strings). Isto pode ser usado para estilizar a primeira parte. - -Por exemplo: - -- `[on](red bold)` vai imprimir uma string `on` com texto em negrito e com a cor vermelha. -- `[⌘ $version](bold green)` vai imprimir o simbolo `⌘` seguido pela variável `version`, com o texto em negrito e na cor verde. -- `[a [b](red) c](green)` vai imprimir `a b c` com `b` vermelho, e `a` e `c` verde. - -#### Estilo dos textos - -A maioria dos módulos do starship permite que você configure o estilo de exibição dos textos. Isso é feito através de um parâmetro (geralmente chamado `style`) que é uma string especificando a configuração. Aqui estão alguns exemplos de strings de estilo e o que elas fazem. Para detalhes sobre a sintaxe completa, consulte o [guia de configurações avançadas](/advanced-config/). - -- `"fg:green bg:blue"` deixa o texto verde com o fundo azul -- `"bg:blue fg:bright-green"` deixa o texto verde brilhante com o fundo azul -- `"bold fg:27"` deixa o texto em negrito com a cor 27 [da tabela ANSI](https://i.stack.imgur.com/KTSQa.png) -- `"underline bg:#bf5700"` deixa o texto sublinhado com o fundo laranja escuro -- `"bold italic fg:purple"` deixa o texto em negrito e itálico com a cor roxa -- `""` desabilita explicitamente todos os estilos - -Note que a aparência do estilo será controlado pelo seu terminal. Por exemplo, alguns terminais deixarão as cores mais brilhantes ao invés de deixar o texto em negrito, ou alguns temas podem usar as mesmas cores para cores brilhantes e normais. Além disso, para textos em itálico, o terminal precisa ter suporte. - -#### Formatação de String Condicional - -Uma formatação condicional de string é envolto por `(` e `)` não vai ser exibido caso a variável dentro esteja vazia. - -Por exemplo: - -- `(@$region)` não vai exibir nada caso a variável `region` seja `None` ou vazia, caso contrario vai exibir `@` seguido pelo valor da variável region. -- `(texto qualquer)` não vai exibir nada sempre, pois não existe variável entre os parenteses. -- Quando usar `$all` é um atalho para `\[$a$b\]`, `($all)` vai exibir nada somente quando `$a` e `$b` são `None`. Isto funciona da mesma forma que `(\[$a$b\] )`. - -#### Caracteres Especiais - -O símbolos a seguir tem um uso na formatação de string e deve ser escapados `$ \ [ ] ( )`. - -Note que TOML tem [string básicas e strings literais](https://toml.io/en/v1.0.0#string). É recomendado usar um string literal(cercado por aspas simples) em seu config. Se você quiser usar uma string básica(cercado por aspas duplas), você precisa adicionar o backslash (ex: use `\\`). - -Por exemplo, quando você quer imprimir um simbolo `$` em uma nova linha, as configurações de `format` a seguir são equivalentes: - ```toml -# com string básica -format = "\n\\$" +# literal string +format = '☺\☻ ' -# com múltiplas linhas de string básica +# regular string +format = "☺\\☻ " + +# escaping Starship symbols +format = '\[\$\] ' +``` + +When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: + +```toml +# with literal string +format = ''' + +\$''' + +# with multiline basic string format = """ \\$""" -# com string literal -format = ''' - -\$''' +# with basic string +format = "\n\\$" ``` +In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. + +```toml +format = """ +line1\ +line1\ +line1 +line2\ +line2\ +line2 +""" +``` + +### Formatação de Strings + +As strings de formato são o formato com o qual um módulo imprime todas as suas variáveis. A maioria dos módulos tem uma entrada chamada `format` que configura o formato de exibição do módulo. Você pode usar textos, variáveis e grupos de texto em uma string de formato. + +#### Variável + +Uma variável contém um símbolo `$` seguido pelo nome da variável. O nome de uma variável pode conter apenas letras, números e `_`. + +Por exemplo: + +- `'$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. + +#### Grupo de Texto + +Um grupo de texto é composto de duas partes diferentes. + +A primeira parte, que está entre um `[]`, é uma [string de formato](#format-strings). Você pode adicionar textos, variáveis ou até mesmo grupos de texto aninhados nele. + +Na segunda parte, que está dentro de um `()`, está uma [string de estilo](#style-strings). Isso pode ser usado para estilizar a primeira parte. + +Por exemplo: + +- `'[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. + +#### Estilo dos textos + +A maioria dos módulos no starship permite que você configure seus estilos de exibição. Isso é feito com uma entrada (normalmente chamada de `estilo`) que é uma string especificando a configuração. Aqui estão alguns exemplos de strings de estilo junto com o que elas fazem. Para obter detalhes sobre a sintaxe completa, consulte o [guia de configuração avançada](/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 + +Observe que a aparência do estilo será controlada pelo emulador de terminal. Por exemplo, alguns emuladores de terminal irão clarear as cores em vez de colocar o texto em negrito, e alguns temas de cores usam os mesmos valores para as cores normais e brilhantes. Além disso, para obter texto em itálico, seu terminal deve suportar itálico. + +#### Formatação de String Condicional + +Uma string de formato condicional envolta de `(` e `)` não será renderizada se todas as variáveis internas estiverem vazias. + +Por exemplo: + +- `'(@$region)'` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. +- `'(some text)'` will always show nothing since there are no variables wrapped in the braces. +- When `$combined` is a shortcut for `\[$a$b\]`, `'($combined)'` will show nothing only if `$a` and `$b` are both `None`. This works the same as `'(\[$a$b\] )'`. + ### Negative matching -Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched. +Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading '!' character. The presence of _any_ negative indicator in the directory will result in the module not being matched. Extensions are matched against both the characters after the last dot in a filename, and the characters after the first dot in a filename. For example, `foo.bar.tar.gz` will be matched against `bar.tar.gz` and `gz` in the `detect_extensions` variable. Files whose name begins with a dot are not considered to have extensions at all. To see how this works in practice, you could match TypeScript but not MPEG Transport Stream files thus: ```toml -detect_extensions = ["ts", "!video.ts", "!audio.ts"] +detect_extensions = ['ts', '!video.ts', '!audio.ts'] ``` ## Prompt de Comando -Está é a lista de opções de configuração de prompt. +Esta é a lista de opções de configuração em todo o prompt. ### Opções | Opções | Padrão | Descrição | | ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `format` | [link](#default-prompt-format) | Configura o formato do prompt. | -| `right_format` | `""` | Veja [Ativa o prompt direito](/advanced-config/#enable-right-prompt) | +| `right_format` | `''` | Veja [Ativa o prompt direito](/advanced-config/#enable-right-prompt) | | `scan_timeout` | `30` | Tempo limite para escanear arquivos (em milissegundos). | | `command_timeout` | `500` | Tempo limite de execução de comandos pelo starship (em milissegundos). | | `add_newline` | `true` | Insere linha vazia entre os prompts do shell. | -| `palette` | `""` | Sets which color palette from `palettes` to use. | +| `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | ### Exemplo @@ -177,35 +212,35 @@ Está é a lista de opções de configuração de prompt. ```toml # ~/.config/starship.toml -# Usa um format customizado -format = """ +# Use custom format +format = ''' [┌───────────────────>](bold green) [│](bold green)$directory$rust$package -[└─>](bold green) """ +[└─>](bold green) ''' -#Espera 10 milissegundos para que o starship check os arquivos do diretório atual. +# Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 # Disable the blank line at the start of the prompt add_newline = false -# Set "foo" as custom color palette -palette = "foo" +# Set 'foo' as custom color palette +palette = 'foo' # Define custom colors [palettes.foo] # Overwrite existing color -blue = "21" +blue = '21' # Define new color -mustard = "#af8700" +mustard = '#af8700' ``` ### Format de Prompt Padrão -O `formato` padrão é usado para definir o formato do prompt, se um valor vazio ou não `formatado` for informado. Os valores padrão são os seguintes: +O padrão `format` é usado para definir o formato do prompt, se estiver vazio ou nenhum `format` for fornecido. O padrão é como mostrado: ```toml -format = "$all" +format = '$all' # Which is equivalent to format = """ @@ -236,7 +271,9 @@ $elixir\ $elm\ $erlang\ $golang\ +$guix_shell\ $haskell\ +$haxe\ $helm\ $java\ $julia\ @@ -245,6 +282,7 @@ $lua\ $nim\ $nodejs\ $ocaml\ +$opa\ $perl\ $php\ $pulumi\ @@ -281,16 +319,17 @@ $jobs\ $battery\ $time\ $status\ +$os\ $container\ $shell\ $character""" ``` -Se você quer estender o formato padrão, você pode usar `$all`; Os módulos adicionado explicitamente não serão duplicados. Ex. +Se você quiser apenas estender o formato padrão, você pode usar `$all`; os módulos que você adicionar explicitamente ao formato não serão duplicados. Ex. ```toml -# Move o diretório para a segunda linha -format = "$all$directory$character" +# Move the directory to the second line +format = '$all$directory$character' ``` ## AWS @@ -299,21 +338,23 @@ The `aws` module shows the current AWS region and profile and an expiration time The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. -Quando usar [aws-vault](https://github.com/99designs/aws-vault) o perfil é lido da variável `AWS_VAULT` e o tempo de expiração de credenciais é lida da variável de env `AWS_SESSION_EXPIRATION`. +Quando usar [aws-vault](https://github.com/99designs/aws-vault), o perfil é lido da variável de ambiente `AWS_VAULT` e o tempo de expiração de credenciais é lido da variável de ambiente `AWS_SESSION_EXPIRATION`. Quando usar [awsu](https://github.com/kreuzwerker/awsu) o perfil é lido da varável de env `AWSU_PROFILE`. Quando usar [AWSume](https://awsu.me) o perfil é lido da variável `AWSUME_PROFILE` e o tempo de expiração de credenciais é lida da variável de env `AWSUME_EXPIRATION`. +When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. + ### Opções | Opções | Padrão | Descrição | | ------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | O formato do módulo. | -| `symbol` | `"☁️ "` | O símbolo usado antes de exibir o perfil atual da AWS. | -| `region_aliases` | | Tabela de aleases de regiões a serem exibidas, além do nome da AWS. | -| `profile_aliases` | | Tabela de apelidos de perfil a serem exibidos além do nome da AWS. | -| `style` | `"bold yellow"` | O estilo do módulo. | +| `symbol` | `'☁️ '` | O símbolo usado antes de exibir o perfil atual da AWS. | +| `region_aliases` | `{}` | Tabela de aleases de regiões a serem exibidas, além do nome da AWS. | +| `profile_aliases` | `{}` | Tabela de apelidos de perfil a serem exibidos além do nome da AWS. | +| `style` | `'bold yellow'` | O estilo do módulo. | | `expiration_symbol` | `X` | O simbolo exibido quando as credenciais temporárias estão expiradas. | | `disabled` | `false` | Desabilita o módulo `AWS`. | | `force_display` | `false` | Se `true` exibe as informações mesmo que `credentials`, `credential_process` ou `sso_start_url` não tenham sido configurados. | @@ -339,13 +380,13 @@ Quando usar [AWSume](https://awsu.me) o perfil é lido da variável `AWSUME_PROF [aws] format = 'on [$symbol($profile )(\($region\) )]($style)' -style = "bold blue" -symbol = "🅰 " +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' [aws.profile_aliases] -ChamadaDeAcessoDoGrupoDaEmpresaFrobozz = 'Frobozz' +CompanyGroupFrobozzOnCallAccess = 'Frobozz' ``` #### Exibir região @@ -354,12 +395,12 @@ ChamadaDeAcessoDoGrupoDaEmpresaFrobozz = 'Frobozz' # ~/.config/starship.toml [aws] -format = "on [$symbol$region]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$region]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' ``` #### Exibir perfil @@ -368,34 +409,48 @@ us-east-1 = "va" # ~/.config/starship.toml [aws] -format = "on [$symbol$profile]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$profile]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.profile_aliases] -Esquema_De_Nomenclatura_Empresarial-voidstars = 'void**' +Enterprise_Naming_Scheme-voidstars = 'void**' ``` ## Azure -O módulo `azure` exibe a assinatura Azure atual. Isto é baseado na exibição do nome da assinatura padrão, como definido no arquivo em `~/.azure/azureProfile.json`. +O módulo `azure` exibe a assinatura Azure atual. This is based on showing the name of the default subscription or the username, as defined in the `~/.azure/azureProfile.json` file. ### Opções | Variável | Padrão | Descrição | | ---------- | ---------------------------------------- | ---------------------------------------------- | -| `format` | `"on [$symbol($subscription)]($style) "` | O formato que o módulo Azure será renderizado. | -| `symbol` | `"ﴃ "` | O símbolo usado no formato. | -| `style` | `"blue bold"` | O estilo usado no formato. | +| `format` | `'on [$symbol($subscription)]($style) '` | O formato que o módulo Azure será renderizado. | +| `symbol` | `'ﴃ '` | O símbolo usado no formato. | +| `style` | `'blue bold'` | O estilo usado no formato. | | `disabled` | `true` | Desabilita o módulo `azure`. | -### Exemplo +### Exemplos + +#### Display Subscription Name ```toml # ~/.config/starship.toml [azure] disabled = false -format = "on [$symbol($subscription)]($style) " +format = 'on [$symbol($subscription)]($style) ' +symbol = 'ﴃ ' +style = 'blue bold' +``` + +#### Display Username + +```toml +# ~/.config/starship.toml + +[azure] +disabled = false +format = "em [$symbol($username)]($style) " symbol = "ﴃ " style = "blue bold" ``` @@ -408,12 +463,12 @@ O módulo `battery` exibe o quanto a bateria do dispositivo está carregada e o | Opções | Padrão | Descrição | | -------------------- | --------------------------------- | ------------------------------------------------------------ | -| `full_symbol` | `" "` | O simbolo exibido quando a bateria estiver cheia. | -| `charging_symbol` | `" "` | O simbolo exibido quando a bateria está carregando. | -| `discharging_symbol` | `" "` | O simbolo exibido quando a bateria está descarregando. | -| `unknown_symbol` | `" "` | O simbolo exibido quando o estado da bateria é desconhecido. | -| `empty_symbol` | `" "` | O simbolo exibido quando o estado da bateria é vazio. | -| `format` | `"[$symbol$percentage]($style) "` | O formato do módulo. | +| `full_symbol` | `' '` | O simbolo exibido quando a bateria estiver cheia. | +| `charging_symbol` | `' '` | O simbolo exibido quando a bateria está carregando. | +| `discharging_symbol` | `' '` | O simbolo exibido quando a bateria está descarregando. | +| `unknown_symbol` | `' '` | O simbolo exibido quando o estado da bateria é desconhecido. | +| `empty_symbol` | `' '` | O simbolo exibido quando o estado da bateria é vazio. | +| `format` | `'[$symbol$percentage]($style) '` | O formato do módulo. | | `display` | [link](#battery-display) | Limite de exibição e estilo para o módulo. | | `disabled` | `false` | Desabilita o módulo `battery`. | @@ -423,19 +478,19 @@ O módulo `battery` exibe o quanto a bateria do dispositivo está carregada e o # ~/.config/starship.toml [battery] -full_symbol = "🔋 " -charging_symbol = "⚡️ " -discharging_symbol = "💀 " +full_symbol = '🔋 ' +charging_symbol = '⚡️ ' +discharging_symbol = '💀 ' ``` ### Indicador de bateria -A configuração `display` é usada para definir quando o indicador de bateria deve ser exibido (threshold), qual deve ser o simbolo(symbol) e como você gostaria de exibir (style). Se nenhum `display` for fornecido. Os valores padrão são os seguintes: +A configuração `display` é usada para definir quando o indicador de bateria deve ser exibido (threshold), qual deve ser o simbolo(symbol) e como você gostaria de exibir (style). Se nenhum `display` for fornecido. O padrão é como mostrado: ```toml [[battery.display]] threshold = 10 -style = "bold red" +style = 'bold red' ``` O valor padrão das opções `charging_symbol` e `discharging_symbol`é respectivamente o valor das opções `battery`'s `charging_symbol` e `discharging_symbol`. @@ -447,23 +502,23 @@ A opção `display` é um array da seguinte tabela. | Opções | Padrão | Descrição | | -------------------- | ------------ | -------------------------------------------------------------------------------------------------- | | `threshold` | `10` | O limite superior para exibição. | -| `style` | `"red bold"` | O estilo usado para exibir quando estiver em uso. | +| `style` | `'red bold'` | O estilo usado para exibir quando estiver em uso. | | `charging_symbol` | | Simbolo opcional, mostrado quando a opção estiver em uso, o simbolo padrão é `charging_symbol`. | | `discharging_symbol` | | Simbolo opcional, mostrado quando a opção estiver em uso, o simbolo padrão é `discharging_symbol`. | #### Exemplo ```toml -[[battery.display]] # estilo negrito com vermelho e discharging_symbol quando a capacidade está entre 0% e 10% +[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% threshold = 10 -style = "bold red" +style = 'bold red' -[[battery.display]] # estilo negrito com amarelo e símbolo 💦 quando a capacidade está entre 10% e 30% +[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% threshold = 30 -style = "bold yellow" -discharging_symbol = "💦" +style = 'bold yellow' +discharging_symbol = '💦' -# quando a capacidade for superior a 30%, o indicador da bateria não será exibido +# when capacity is over 30%, the battery indicator will not be displayed ``` ## Buf @@ -477,13 +532,13 @@ O módulo `buf` mostra a versão instalada do [Buf](https://buf.build). Por padr | Opções | Padrão | Descrição | | ------------------- | ----------------------------------------------- | ------------------------------------------------- | -| `format` | `"with [$symbol($version )]($style)"` | O formato do módulo `buf`. | -| `version_format` | `"v${raw}"` | O formato da versão. | -| `symbol` | `"🦬 "` | O símbolo usado antes de exibir a versão do Buf. | +| `format` | `'with [$symbol($version )]($style)'` | O formato do módulo `buf`. | +| `version_format` | `'v${raw}'` | A versão formatada. | +| `symbol` | `'🦬 '` | O símbolo usado antes de exibir a versão do Buf. | | `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `style` | `"bold blue"` | O estilo do módulo. | +| `style` | `'bold blue'` | O estilo do módulo. | | `disabled` | `false` | Desabilita o módulo `elixir`. | ### Variáveis @@ -502,7 +557,7 @@ O módulo `buf` mostra a versão instalada do [Buf](https://buf.build). Por padr # ~/.config/starship.toml [buf] -symbol = "🦬 " +symbol = '🦬 ' ``` ## Bun @@ -514,16 +569,16 @@ The `bun` module shows the currently installed version of the [bun](https://bun. ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🍞 "` | Uma string que representa o simbolo do Node.js. | -| `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `["bun.lockb", "bunfig.toml"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `style` | `"bold red"` | O estilo do módulo. | -| `disabled` | `false` | Disables the `bun` module. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. | +| `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['bun.lockb', 'bunfig.toml']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `style` | `'bold red'` | O estilo do módulo. | +| `disabled` | `false` | Disables the `bun` module. | ### Variáveis @@ -541,7 +596,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. # ~/.config/starship.toml [bun] -format = "via [🍔 $version](bold green) " +format = 'via [🍔 $version](bold green) ' ``` ## C @@ -550,17 +605,17 @@ O módulo `c` mostra algumas informações sobre o seu compilador de C. Por padr ### Opções -| Opções | Padrão | Descrição | -| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version(-$name) )]($style)"` | A string de formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"C "` | O símbolo utilizado antes de exibir os detalhes do compilador | -| `detect_extensions` | `["c", "h"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `commands` | [ [ "cc", "--version" ], [ "gcc", "--version" ], [ "clang", "--version" ] ] | Como detectar qual é o compilador | -| `style` | `"bold 149"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `c`. | +| Opções | Padrão | Descrição | +| ------------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | A string de formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | O símbolo utilizado antes de exibir os detalhes do compilador | +| `detect_extensions` | `['c', 'h']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | Como detectar qual é o compilador | +| `style` | `'bold 149'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `c`. | ### Variáveis @@ -577,7 +632,7 @@ Note que `version` não está no formato padrão. A opção `commands` aceita uma lista de comandos para determinar a versão e o nome do compilador. -Cada comando é representado como uma lista do nome do executável, seguido de seus argumentos, geralmente algo como `["mycc", "--version"]`. Starship tentará executar cada comando até que obtenha um resultado no STDOUT. +Each command is represented as a list of the executable name, followed by its arguments, usually something like `['mycc', '--version']`. Starship tentará executar cada comando até que obtenha um resultado no STDOUT. Se um compilador C não é suportado por este módulo, você pode solicitá-lo [criando uma issue no GitHub](https://github.com/starship/starship/). @@ -587,7 +642,7 @@ Se um compilador C não é suportado por este módulo, você pode solicitá-lo [ # ~/.config/starship.toml [c] -format = "via [$name $version]($style)" +format = 'via [$name $version]($style)' ``` ## Caractere @@ -611,13 +666,13 @@ Por padrão ele apenas muda de cor. Se você deseja alterar o formato de uma olh | Opções | Padrão | Descrição | | --------------------------- | -------------------- | ------------------------------------------------------------------------------------------- | -| `format` | `"$symbol"` | O formato da string usado antes da entrada dos textos. | -| `success_symbol` | `"[❯](bold green)"` | O formato da string usado antes da entrada de texto se o comando anterior for bem-sucedido. | -| `error_symbol` | `"[❯](bold red)"` | O formato de string usado antes da entrada de texto se o comando anterior tiver falhado. | -| `vimcmd_symbol` | `"[❮](bold green)"` | O fromato de string usado antes da entrada de texto se o shell esta no vim normal mode. | -| `vimcmd_replace_one_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim `replace_one` mode. | -| `vimcmd_replace_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim replace mode. | -| `vimcmd_visual_symbol` | `"[❮](bold yellow)"` | The format string used before the text input if the shell is in vim replace mode. | +| `format` | `'$symbol '` | O formato da string usado antes da entrada dos textos. | +| `success_symbol` | `'[❯](bold green)'` | O formato da string usado antes da entrada de texto se o comando anterior for bem-sucedido. | +| `error_symbol` | `'[❯](bold red)'` | O formato de string usado antes da entrada de texto se o comando anterior tiver falhado. | +| `vimcmd_symbol` | `'[❮](bold green)'` | O fromato de string usado antes da entrada de texto se o shell esta no vim normal mode. | +| `vimcmd_replace_one_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim `replace_one` mode. | +| `vimcmd_replace_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim replace mode. | +| `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | | `disabled` | `false` | Desabilita o módulo `character`. | ### Variáveis @@ -634,8 +689,8 @@ Por padrão ele apenas muda de cor. Se você deseja alterar o formato de uma olh # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[✗](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[✗](bold red) ' ``` #### Sem formas customizadas de erro @@ -644,8 +699,8 @@ error_symbol = "[✗](bold red) " # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[➜](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[➜](bold red) ' ``` #### Com formas customizadas no vim @@ -654,7 +709,7 @@ error_symbol = "[➜](bold red) " # ~/.config/starship.toml [character] -vicmd_symbol = "[V](bold green) " +vicmd_symbol = '[V](bold green) ' ``` ## CMake @@ -666,16 +721,16 @@ O módulo `cmake` exibe a versão instalada do [CMake](https://cmake.org/). Por ### Opções -| Opções | Padrão | Descrição | -| ------------------- | -------------------------------------- | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"△ "` | O simbolo usado antes da versão do cmake. | -| `detect_extensions` | `[]` | Quais extensões devem acionar este módulo | -| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | [] | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo | -| `style` | `"bold blue"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `cmake`. | +| Opções | Padrão | Descrição | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'△ '` | O simbolo usado antes da versão do cmake. | +| `detect_extensions` | `[]` | Quais extensões devem acionar este módulo | +| `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | [] | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo | +| `style` | `'bold blue'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `cmake`. | ### Variáveis @@ -696,16 +751,16 @@ O módulo `cobol` exibe a versão instalada atual do COBOL. Por padrão, o módu ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| `symbol` | `"⚙️ "` | O simbolo usado antes de exibir a versão do COBOL. | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold blue"` | O estilo do módulo. | -| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `disabled` | `false` | Desabilita o módulo `cobol`. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | +| `symbol` | `'⚙️ '` | O simbolo usado antes de exibir a versão do COBOL. | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold blue'` | O estilo do módulo. | +| `detect_extensions` | `['cbl', 'cob', 'CBL', 'COB']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `disabled` | `false` | Desabilita o módulo `cobol`. | ### Variáveis @@ -735,8 +790,8 @@ Usuários do bash que precisam de funções pre-executadas podem usar [rcaloras' | ---------------------- | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `min_time` | `2_000` | Duração mais curta para exibir o tempo (em milissegundos). | | `show_milliseconds` | `false` | Exibir milissegundos ou invés de segundos para duração. | -| `format` | `"took [$duration]($style) "` | O formato do módulo. | -| `style` | `"bold yellow"` | O estilo do módulo. | +| `format` | `'took [$duration]($style) '` | O formato do módulo. | +| `style` | `'bold yellow'` | O estilo do módulo. | | `disabled` | `false` | Desabilita o módulo `cmd_duration`. | | `show_notifications` | `false` | Exibi notificações no desktop quando o comando for concluído. | | `min_time_to_notify` | `45_000` | Tempo minimo para notificação (em milissegundos). | @@ -758,7 +813,7 @@ Usuários do bash que precisam de funções pre-executadas podem usar [rcaloras' [cmd_duration] min_time = 500 -format = "underwent [$duration](bold yellow)" +format = 'underwent [$duration](bold yellow)' ``` ## Conda @@ -776,9 +831,9 @@ Isso não suprime o modificador de prompt do conda, você pode executar `conda c | Opções | Padrão | Descrição | | ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | O número de diretórios do envirionment path deve ser truncado, se o environment foi criado via `conda create -p [path]`. `0` quer dizer sem truncação. Também consulte o módulo [`directory`](#directory). | -| `symbol` | `"🅒 "` | O simbolo usado antes do nome do environment. | -| `style` | `"bold green"` | O estilo do módulo. | -| `format` | `"via [$symbol$environment]($style) "` | O formato do módulo. | +| `symbol` | `'🅒 '` | O simbolo usado antes do nome do environment. | +| `style` | `'bold green'` | O estilo do módulo. | +| `format` | `'via [$symbol$environment]($style) '` | O formato do módulo. | | `ignore_base` | `true` | Ignora o environment `base` quando ativado. | | `disabled` | `false` | Desabilita o módulo `conda`. | @@ -798,7 +853,7 @@ Isso não suprime o modificador de prompt do conda, você pode executar `conda c # ~/.config/starship.toml [conda] -format = "[$symbol$environment](dimmed green) " +format = '[$symbol$environment](dimmed green) ' ``` ## Container @@ -809,8 +864,8 @@ O módulo `container` exibe um símbolo e nome do contêiner, se dentro de um co | Opções | Padrão | Descrição | | ---------- | ---------------------------------- | ------------------------------------------------- | -| `symbol` | `"⬢"` | O símbolo mostrado, quando dentro de um contêiner | -| `style` | `"bold red dimmed"` | O estilo do módulo. | +| `symbol` | `'⬢'` | O símbolo mostrado, quando dentro de um contêiner | +| `style` | `'bold red dimmed'` | O estilo do módulo. | | `format` | `'[$symbol \[$name\]]($style) '` | O formato do módulo. | | `disabled` | `false` | Desabilita o módulo `container`. | @@ -842,16 +897,16 @@ O módulo `crystal` exibe a versão instalada atual do [Crystal](https://crystal ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| `symbol` | `"🔮 "` | O simbolo usado antes de exibir a versão do crystal. | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold red"` | O estilo do módulo. | -| `detect_extensions` | `["cr"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `["shard.yml"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `disabled` | `false` | Desabilita o módulo `crystal`. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | +| `symbol` | `'🔮 '` | O símbolo usado antes de exibir a versão do crystal. | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold red'` | O estilo do módulo. | +| `detect_extensions` | `['cr']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['shard.yml']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `disabled` | `false` | Desabilita o módulo `crystal`. | ### Variáveis @@ -869,7 +924,7 @@ O módulo `crystal` exibe a versão instalada atual do [Crystal](https://crystal # ~/.config/starship.toml [crystal] -format = "via [✨ $version](bold blue) " +format = 'via [✨ $version](bold blue) ' ``` ## Daml @@ -880,16 +935,16 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"Λ "` | A format string representing the symbol of Daml | -| `style` | `"bold cyan"` | O estilo do módulo. | -| `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `["daml.yaml"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `disabled` | `false` | Disables the `daml` module. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'Λ '` | A format string representing the symbol of Daml | +| `style` | `'bold cyan'` | O estilo do módulo. | +| `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['daml.yaml']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `disabled` | `false` | Disables the `daml` module. | ### Variáveis @@ -907,7 +962,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d # ~/.config/starship.toml [daml] -format = "via [D $version](bold bright-green) " +format = 'via [D $version](bold bright-green) ' ``` ## Dart @@ -920,16 +975,16 @@ O módulo `dart` exibe a versão atual instalada do [Dart](https://dart.dev/). P ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | Um formato de string que representa o simbolo do Dart | -| `detect_extensions` | `["dart"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[".dart_tool"]` | Quais pastas devem ativar este módulo. | -| `style` | `"bold blue"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `dart`. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🎯 '` | Um formato de string que representa o simbolo do Dart | +| `detect_extensions` | `['dart']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `['.dart_tool']` | Quais pastas devem ativar este módulo. | +| `style` | `'bold blue'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `dart`. | ### Variáveis @@ -947,7 +1002,7 @@ O módulo `dart` exibe a versão atual instalada do [Dart](https://dart.dev/). P # ~/.config/starship.toml [dart] -format = "via [🔰 $version](bold red) " +format = 'via [🔰 $version](bold red) ' ``` ## Deno @@ -958,16 +1013,16 @@ O módulo `deno` exibe a versão instalada atual do [Deno](https://deno.land/). ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦕 "` | Um formato de string que representa o simbolo do Deno | -| `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `["deno.json", "deno.jsonc", "mod.ts", "mod.js", "deps.ts", "deps.js"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `style` | `"green bold"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `deno`. | +| Opções | Padrão | Descrição | +| ------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦕 '` | Um formato de string que representa o simbolo do Deno | +| `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `style` | `'green bold'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `deno`. | ### Variáveis @@ -983,7 +1038,7 @@ O módulo `deno` exibe a versão instalada atual do [Deno](https://deno.land/). # ~/.config/starship.toml [deno] -format = "via [🦕 $version](green bold) " +format = 'via [🦕 $version](green bold) ' ``` ## Diretório @@ -996,20 +1051,21 @@ Por exemplo, dado `~/Dev/Nix/nixpkgs/pkgs` onde `nixpkgs` é o repositório raiz ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ----------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | O número de pastas pais do diretório atual que serão truncadas. | -| `truncate_to_repo` | `true` | Seu diretório será truncado ou não para a raiz do repositório git atual. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | O formato do módulo. | -| `style` | `"bold cyan"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `directory`. | -| `read_only` | `"🔒"` | O simbolo que indica que o diretório atual é somente leitura. | -| `read_only_style` | `"red"` | O estilo para o simbolo de somente leitura. | -| `truncation_symbol` | `""` | O simbolo para prefixo de caminhos truncados. ex: "…/" | -| `repo_root_style` | | O estilo para a raiz do repositório git. O valor padrão é equivalente a `style`. | -| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | O formato de um repositório git quando `repo_root_style` é definido. | -| `home_symbol` | `"~"` | O simbolo para indicar o diretório home. | -| `use_os_path_sep` | `true` | Use o separador de caminho específico do sistema opracional em vez de sempre usar `/` (por exemplo, `\` no Windows) | +| Opções | Padrão | Descrição | +| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | O número de pastas pais do diretório atual que serão truncadas. | +| `truncate_to_repo` | `true` | Seu diretório será truncado ou não para a raiz do repositório git atual. | +| `format` | `'[$path]($style)[$read_only]($read_only_style) '` | O formato do módulo. | +| `style` | `'bold cyan'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `directory`. | +| `read_only` | `'🔒'` | O simbolo que indica que o diretório atual é somente leitura. | +| `read_only_style` | `'red'` | O estilo para o simbolo de somente leitura. | +| `truncation_symbol` | `''` | O simbolo para prefixo de caminhos truncados. eg: '…/' | +| `before_repo_root_style` | | The style for the path segment above the root of the git repo. O valor padrão é equivalente a `style`. | +| `repo_root_style` | | O estilo para a raiz do repositório git. O valor padrão é equivalente a `style`. | +| `repo_root_format` | `'[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) '` | The format of a git repo when `before_repo_root_style` and `repo_root_style` is defined. | +| `home_symbol` | `'~'` | O simbolo para indicar o diretório home. | +| `use_os_path_sep` | `true` | Use o separador de caminho específico do sistema opracional em vez de sempre usar `/` (por exemplo, `\` no Windows) |

Este módulo tem algumas configurações avançadas que controlam como o diretório é exibido. @@ -1024,8 +1080,8 @@ Por exemplo, dado `~/Dev/Nix/nixpkgs/pkgs` onde `nixpkgs` é o repositório raiz ```toml [directory.substitutions] -"/Volumes/network/path" = "/net" -"src/com/long/java/path" = "mypath" +'/Volumes/network/path' = '/net' +'src/com/long/java/path' = 'mypath' ``` `fish_style_pwd_dir_length` interage com as opções de truncação padrão de uma forma que pode suprimir no começo: se não for zero, os componentes do path que normalmente seriam truncados são exibidos com todos caracteres. Por exemplo, o caminho `/built/this/city/on/rock/and/roll`, que normalmente seria exibido como`rock/and/roll`, seria exibido como `/b/t/c/o/rock/and/roll` com`fish_style_pwd_dir_length = 1`--os componentes de path que normalmente seriam removidos são exibidos com um único caractere. Para `fish_style_pwd_dir_length = 2`, seria `/bu/th/ci/on/rock/and/roll`. @@ -1036,8 +1092,8 @@ Por exemplo, dado `~/Dev/Nix/nixpkgs/pkgs` onde `nixpkgs` é o repositório raiz | Variável | Exemplo | Descrição | | --------- | --------------------- | -------------------------------- | -| path | `"D:/Projects"` | O caminho do diretório atual | -| style\* | `"black bold dimmed"` | Espelha o valor da opção `style` | +| path | `'D:/Projetos'` | O caminho do diretório atual | +| style\* | `'black bold dimmed'` | Espelha o valor da opção `style` | *: Esta variável só pode ser usada como parte de uma string de estilo @@ -1048,11 +1104,11 @@ Vamos considerar o caminho `/caminho/para/home/git_repo/src/lib` | Variável | Exemplo | Descrição | | ------------------ | ----------------------- | --------------------------------------------------- | -| before_root_path | `"/caminho/para/home/"` | O caminho antes do caminho do diretório raiz do git | -| repo_root | `"git_repo"` | O nome do diretório raiz do git | -| path | `"/src/lib"` | O caminho restante | -| style | `"black bold dimmed"` | Espelha o valor da opção `style` | -| repo_root_style | `"underline white"` | Estilo para o nome do diretório raiz do git | +| before_root_path | `'/caminho/para/home/'` | O caminho antes do caminho do diretório raiz do git | +| repo_root | `'git_repo'` | O nome do diretório raiz do git | +| path | `'/src/lib'` | O caminho restante | +| style | `'black bold dimmed'` | Espelha o valor da opção `style` | +| repo_root_style | `'underline white'` | Estilo para o nome do diretório raiz do git |
@@ -1063,7 +1119,7 @@ Vamos considerar o caminho `/caminho/para/home/git_repo/src/lib` [directory] truncation_length = 8 -truncation_symbol = "…/" +truncation_symbol = '…/' ``` ## Docker Context @@ -1074,13 +1130,13 @@ O módulo `docker_context` exibe o [Docker context](https://docs.docker.com/engi | Opções | Padrão | Descrição | | ------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol$context]($style) "` | O formato do módulo. | -| `symbol` | `"🐳 "` | O simbolo usado antes de exibir a versão do contexto docker. | +| `format` | `'via [$symbol$context]($style) '` | O formato do módulo. | +| `symbol` | `'🐳 '` | O simbolo usado antes de exibir a versão do contexto docker. | | `only_with_files` | `true` | Exibe somente quando houver um arquivo | | `detect_extensions` | `[]` | Quais extensões devem acionar este módulo (precisa que `only_with_files` seja true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Quais arquivos devem acionar este módulo (precisa que `only_with_files` seja true). | +| `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | Quais arquivos devem acionar este módulo (precisa que `only_with_files` seja true). | | `detect_folders` | `[]` | Quais pastas devem acionar este módulo (precisa que `only_with_files` seja true). | -| `style` | `"blue bold"` | O estilo do módulo. | +| `style` | `'blue bold'` | O estilo do módulo. | | `disabled` | `false` | Desabilita o módulo `docker_context`. | ### Variáveis @@ -1099,14 +1155,14 @@ O módulo `docker_context` exibe o [Docker context](https://docs.docker.com/engi # ~/.config/starship.toml [docker_context] -format = "via [🐋 $context](blue bold)" +format = 'via [🐋 $context](blue bold)' ``` ## Dotnet -O módulo `dotnet` exibe a versão relevante do [.NET Core SDK](https://dotnet.microsoft.com/) para a pasta atual. Se o SDK foi fixado na pasta atual, a versão será exibida. Caso contrario será exibida a ultima versão instalada do SDK. +O módulo `dotnet` exibe a versão relevante do [.NET Core SDK](https://dotnet.microsoft.com/) para o directório atual. Se o SDK foi predefinido no diretório atual, a versão será exibida. Caso contrário, o módulo exibe a versão mais recente instalada do SDK. -Por padrão o módulo vai apenas exibir no seu prompt quando um ou mais dos seguintes arquivos estiverem presente no diretório: +Por padrão, este módulo só será exibido no seu prompt quando um ou mais dos seguintes arquivos estiverem presentes no diretório atual: - `global.json` - `project.json` @@ -1117,34 +1173,34 @@ Por padrão o módulo vai apenas exibir no seu prompt quando um ou mais dos segu - `*.fsproj` - `*.xproj` -Você também precisa do .NET Core SDK instalado para usá-lo corretamente. +Você também precisará do SDK do .NET Core instalado para usá-lo corretamente. -Internamente, este módulo usa seu próprio mecanismo de detecção de versão. Normalmente é duas vezes mais rápido que executar `dotnet --version`, mas pode exibir uma versão errado se o projeto .NET tiver o layout de diretório incomum. Se a precisão é mais importante que velocidade, você pode desabilitar o mecanismo definindo `heuristic = false` nas opções do modulo. +Internamente, este módulo usa um mecanismo próprio para detecção da versão. Geralmente é duas vezes mais rápido que executar `dotnet --version`, mas pode exibir uma versão errada se o seu projeto .NET tiver o layout de diretórios incomum. Se precisão for mais importante que velocidade, você pode desabilitar o mecanismo definindo `heuristic = false` nas opções do módulo. O módulo também mostrará o Target Framework Moniker () quando houver um arquivo `.csproj` no diretório atual. ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `".NET "` | O simbolo usado antes de exibir a versão do dotnet. | -| `heuristic` | `true` | Usa a versão de detecção rápida do starship snappy. | -| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `style` | `"bold blue"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `dotnet`. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )(🎯 $tfm )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'.NET '` | O símbolo usado na frente da versão do dotnet. | +| `heuristic` | `true` | Usa a detecção de versão rápida para manter o starship ligeiro e hábil. | +| `detect_extensions` | `['csproj', 'fsproj', 'xproj']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['global.json', 'project.json', 'Directory.Build.props', 'Directory.Build.targets', 'Packages.props']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `style` | `'bold blue'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `dotnet`. | ### Variáveis -| Variável | Exemplo | Descrição | -| --------- | ---------------- | --------------------------------- | -| version | `v3.1.201` | A versão do sdk `dotnet` | -| tfm | `netstandard2.0` | O framework alvo do projeto atual | -| symbol | | Espelha o valor da opção `symbol` | -| style\* | | Espelha o valor da opção `style` | +| Variável | Exemplo | Descrição | +| --------- | ---------------- | ------------------------------------------------- | +| version | `v3.1.201` | A versão do `dotnet` | +| tfm | `netstandard2.0` | O Target Framework Moniker usado no projeto atual | +| symbol | | Espelha o valor da opção `symbol` | +| style\* | | Espelha o valor da opção `style` | *: Esta variável só pode ser usada como parte de uma string de estilo @@ -1154,8 +1210,8 @@ O módulo também mostrará o Target Framework Moniker ([\\w-]+)" = "gke-$var_cluster" +'dev.local.cluster.k8s' = 'dev' +'.*/openshift-cluster/.*' = 'openshift' +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' [kubernetes.user_aliases] -"dev.local.cluster.k8s" = "dev" -"root/.*" = "root" +'dev.local.cluster.k8s' = 'dev' +'root/.*' = 'root' ``` Only show the module in directories that contain a `k8s` file. @@ -2118,18 +2248,18 @@ Nomes longos de clusters gerados automaticamente podem ser encurtados usando exp ```toml [kubernetes.context_aliases] -# Contexto do OpenShift carrega o namespace e usuário no contexto kube: `namespace/name/user`: -".*/openshift-cluster/.*" = "openshift" -# Ou melhor, para renomear cada cluster OpenShift de uma vez: -".*/(?P[\\w-]+)/.*" = "$var_cluster" +# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: +'.*/openshift-cluster/.*' = 'openshift' +# Or better, to rename every OpenShift cluster at once: +'.*/(?P[\\w-]+)/.*' = '$var_cluster' -# Contexto do GKE, AWS e outras provedores de nuvem normalmente carregam mais informações, como a region/zone. -# A entrada a seguir corresponde o formato GKE (`gke_projectname_zone_cluster-name`) -# e renomeia cada kube context em um formato mais legível (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. +# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) +# and renames every matching kube context into a more readable format (`gke-cluster-name`): +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' ``` -## Quebra de linha +## Quebra de Linha O módulo `line_break` separa o prompt em duas linhas. @@ -2137,7 +2267,7 @@ O módulo `line_break` separa o prompt em duas linhas. | Opções | Padrão | Descrição | | ---------- | ------- | ----------------------------------------------------------------------------------- | -| `disabled` | `false` | Desabilita o módulo `line_break`, fazendo com que o prompt seja em uma unica linha. | +| `disabled` | `false` | Desabilita o módulo `line_break`, fazendo com que o prompt seja em uma única linha. | ### Exemplo @@ -2157,8 +2287,8 @@ O módulo `localip` mostra o endereço IPv4 da interface primária de rede. | Opções | Padrão | Descrição | | ---------- | ------------------------- | -------------------------------------------------------------- | | `ssh_only` | `true` | Apenas mostre o endereço IP quando conectado a uma sessão SSH. | -| `format` | `"[$localipv4]($style) "` | O formato do módulo. | -| `style` | `"bold yellow"` | O estilo do módulo. | +| `format` | `'[$localipv4]($style) '` | O formato do módulo. | +| `style` | `'bold yellow'` | O estilo do módulo. | | `disabled` | `true` | Desabilita o módulo `localip`. | ### Variáveis @@ -2177,7 +2307,7 @@ O módulo `localip` mostra o endereço IPv4 da interface primária de rede. [localip] ssh_only = false -format = "@[$localipv4](bold red) " +format = '@[$localipv4](bold red) ' disabled = false ``` @@ -2191,17 +2321,17 @@ O módulo `lua` exibe a versão atual instalada do [Lua](http://www.lua.org/). P ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🌙 "` | Uma string que representa o simbolo do Lua. | -| `detect_extensions` | `["lua"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `[".lua-version"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `["lua"]` | Quais pastas devem ativar este módulo. | -| `style` | `"bold blue"` | O estilo do módulo. | -| `lua_binary` | `"lua"` | Configura o binário lua que o Starship executa para pegar a versão. | -| `disabled` | `false` | Desabilita o módulo `lua`. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🌙 '` | Uma string que representa o simbolo do Lua. | +| `detect_extensions` | `['lua']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['.lua-version']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `['lua']` | Quais pastas devem ativar este módulo. | +| `style` | `'bold blue'` | O estilo do módulo. | +| `lua_binary` | `'lua'` | Configura o binário lua que o Starship executa para pegar a versão. | +| `disabled` | `false` | Desabilita o módulo `lua`. | ### Variáveis @@ -2219,10 +2349,10 @@ O módulo `lua` exibe a versão atual instalada do [Lua](http://www.lua.org/). P # ~/.config/starship.toml [lua] -format = "via [🌕 $version](bold blue) " +format = 'via [🌕 $version](bold blue) ' ``` -## Uso de memória +## Uso de Memória O módulo `memory_usage` mostra a memória atual do sistema e o uso de troca. @@ -2239,9 +2369,9 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para | Opções | Padrão | Descrição | | ----------- | ----------------------------------------------- | ------------------------------------------------------------- | | `threshold` | `75` | Esconde o uso de memoria a menos que exceda esta porcentagem. | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | O formato do módulo. | -| `symbol` | `"🐏"` | O simbolo usado antes de exibir o uso de memoria. | -| `style` | `"bold dimmed white"` | O estilo do módulo. | +| `format` | `'via $symbol [${ram}( \| ${swap})]($style) '` | O formato do módulo. | +| `symbol` | `'🐏'` | O simbolo usado antes de exibir o uso de memoria. | +| `style` | `'bold dimmed white'` | O estilo do módulo. | | `disabled` | `true` | Desabilita o módulo `memory_usage`. | ### Variáveis @@ -2265,8 +2395,8 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para [memory_usage] disabled = false threshold = -1 -symbol = " " -style = "bold dimmed green" +symbol = ' ' +style = 'bold dimmed green' ``` ## Meson @@ -2277,14 +2407,14 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------- | -| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | -| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. Você pode usar `""` para sem simbolo. | -| `format` | `"via [$symbol$project]($style) "` | O formato do módulo. | -| `symbol` | `"⬢ "` | The symbol used before displaying the project name. | -| `style` | `"blue bold"` | O estilo do módulo. | -| `disabled` | `false` | Disables the `meson` module. | +| Opções | Padrão | Descrição | +| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- | +| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | +| `format` | `'via [$symbol$project]($style) '` | O formato do módulo. | +| `symbol` | `'⬢ '` | The symbol used before displaying the project name. | +| `style` | `'blue bold'` | O estilo do módulo. | +| `disabled` | `false` | Disables the `meson` module. | ### Variáveis @@ -2303,9 +2433,9 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. [meson] disabled = false -truncation_symbol = "--" -symbol = " " -style = "bold dimmed green" +truncation_symbol = '--' +symbol = ' ' +style = 'bold dimmed green' ``` ## Mercurial Branch @@ -2316,11 +2446,11 @@ O módulo `hg_branch` exibe o braço atual do repositório no diretório atual. | Opções | Padrão | Descrição | | ------------------- | -------------------------------- | --------------------------------------------------------------------------------------- | -| `symbol` | `" "` | O simbolo usado ante do marcador hg ou nome do braço do repositório no diretório atual. | -| `style` | `"bold purple"` | O estilo do módulo. | -| `format` | `"on [$symbol$branch]($style) "` | O formato do módulo. | +| `symbol` | `' '` | O simbolo usado ante do marcador hg ou nome do braço do repositório no diretório atual. | +| `style` | `'bold purple'` | O estilo do módulo. | +| `format` | `'on [$symbol$branch]($style) '` | O formato do módulo. | | `truncation_length` | `2^63 - 1` | Trunca o nome do braço hg para `N` caracteres | -| `truncation_symbol` | `"…"` | O simbolo usado para indicar que o nome braço foi truncado. | +| `truncation_symbol` | `'…'` | O simbolo usado para indicar que o nome braço foi truncado. | | `disabled` | `true` | Desabilita o módulo `hg_branch`. | ### Variáveis @@ -2339,32 +2469,32 @@ O módulo `hg_branch` exibe o braço atual do repositório no diretório atual. # ~/.config/starship.toml [hg_branch] -format = "em [🌱 $branch](bold purple)" +format = 'on [🌱 $branch](bold purple)' truncation_length = 4 -truncation_symbol = "" +truncation_symbol = '' ``` ## Nim O módulo `nim` exibe a versão atual instalada do [Nim](https://nim-lang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: -- O diretório atual contem um arquivo `nim.cfg` +- O diretório atual conter um arquivo `nim.cfg` - O diretório atual tenha um arquivo com a extensão `.nim` - O diretório atual tenha um arquivo com a extensão `.nims` - O diretório atual tenha um arquivo com a extensão `.nimble` ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | O símbolo usado antes de exibir a versão do Nim. | -| `detect_extensions` | `["nim", "nims", "nimble"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `["nim.cfg"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `style` | `"bold yellow"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `nim`. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'👑 '` | O símbolo usado antes de exibir a versão do Nim. | +| `detect_extensions` | `['nim', 'nims', 'nimble']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['nim.cfg']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `style` | `'bold yellow'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `nim`. | ### Variáveis @@ -2382,8 +2512,8 @@ O módulo `nim` exibe a versão atual instalada do [Nim](https://nim-lang.org/). # ~/.config/starship.toml [nim] -style = "yellow" -symbol = "🎣 " +style = 'yellow' +symbol = '🎣 ' ``` ## Nix-shell @@ -2395,10 +2525,10 @@ O módulo `nix_shell` exibe o ambiente [nix-shell](https://nixos.org/guides/nix- | Opções | Padrão | Descrição | | ------------ | ---------------------------------------------- | ------------------------------------------------- | | `format` | `'via [$symbol$state( \($name\))]($style) '` | O formato do módulo. | -| `symbol` | `"❄️ "` | Uma string que representa o simbolo do nix-shell. | -| `style` | `"bold blue"` | O estilo do módulo. | -| `impure_msg` | `"impure"` | Uma string que exibe quando o shell é impuro. | -| `pure_msg` | `"pure"` | Uma string que exibe quando o shell é puro. | +| `symbol` | `'❄️ '` | Uma string que representa o simbolo do nix-shell. | +| `style` | `'bold blue'` | O estilo do módulo. | +| `impure_msg` | `'impure'` | Uma string que exibe quando o shell é impuro. | +| `pure_msg` | `'pure'` | Uma string que exibe quando o shell é puro. | | `disabled` | `false` | Desabilita o módulo `nix_shell`. | ### Variáveis @@ -2419,8 +2549,8 @@ O módulo `nix_shell` exibe o ambiente [nix-shell](https://nixos.org/guides/nix- [nix_shell] disabled = true -impure_msg = "[impure shell](bold red)" -pure_msg = "[pure shell](bold green)" +impure_msg = '[impure shell](bold red)' +pure_msg = '[pure shell](bold green)' format = 'via [☃️ $state( \($name\))](bold blue) ' ``` @@ -2428,7 +2558,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' O módulo `nodejs` exibe a versão atual instalada do [Node.js](https://nodejs.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: -- O diretório atual contem o arquivo `package.json` +- O diretório atual conter um arquivo `package.json` - O diretório atual tenha um arquivo `.node-version` - O diretório atual tenha um arquivo`.nvmrc` - O diretório atual tenha um diretório `node_modules` @@ -2439,13 +2569,13 @@ O módulo `nodejs` exibe a versão atual instalada do [Node.js](https://nodejs.o | Opções | Padrão | Descrição | | ------------------- | ------------------------------------------ | -------------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | Uma string que representa o simbolo do Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts", "mts", "cts"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `["package.json", ".node-version"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `["node_modules"]` | Quais pastas devem ativar este módulo. | -| `style` | `"bold green"` | O estilo do módulo. | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | Uma string que representa o simbolo do Node.js. | +| `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['package.json', '.node-version']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `['node_modules']` | Quais pastas devem ativar este módulo. | +| `style` | `'bold green'` | O estilo do módulo. | | `disabled` | `false` | Desabilita o módulo `nodejs`. | | `not_capable_style` | `bold red` | O estilo para o módulo quando a propriedade engine no package.json não coincide com a versão do Node.js. | @@ -2465,7 +2595,7 @@ O módulo `nodejs` exibe a versão atual instalada do [Node.js](https://nodejs.o # ~/.config/starship.toml [nodejs] -format = "via [🤖 $version](bold green) " +format = 'via [🤖 $version](bold green) ' ``` ## OCaml @@ -2481,18 +2611,18 @@ O módulo `ocaml` exibe a versão atual instalada do [OCaml](https://ocaml.org/) ### Opções -| Opções | Padrão | Descrição | -| ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | A string de formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | O símbolo usado antes de exibir a versão do OCaml. | -| `global_switch_indicator` | `""` | A string usada para representar a mudança global OPAM. | -| `local_switch_indicator` | `"*"` | A string usada para representar as mudanças locais do OPAM. | -| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `["_opam", "esy.lock"]` | Quais pastas devem ativar este módulo. | -| `style` | `"bold yellow"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `ocaml`. | +| Opções | Padrão | Descrição | +| ------------------------- | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | A string de formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐫 '` | O símbolo usado antes de exibir a versão do OCaml. | +| `global_switch_indicator` | `''` | A string usada para representar a mudança global OPAM. | +| `local_switch_indicator` | `'*'` | A string usada para representar as mudanças locais do OPAM. | +| `detect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['dune', 'dune-project', 'jbuild', 'jbuild-ignore', '.merlin']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `['_opam', 'esy.lock']` | Quais pastas devem ativar este módulo. | +| `style` | `'bold yellow'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `ocaml`. | ### Variáveis @@ -2512,7 +2642,43 @@ O módulo `ocaml` exibe a versão atual instalada do [OCaml](https://ocaml.org/) # ~/.config/starship.toml [ocaml] -format = "via [🐪 $version]($style) " +format = 'via [🐪 $version]($style) ' +``` + +## Open Policy Agent + +The `opa` module shows the currently installed version of the OPA tool. By default the module will be shown if the current directory contains a `.rego` file. + +### Opções + +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | +| `detect_extensions` | `['rego']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `style` | `'bold blue'` | O estilo do módulo. | +| `disabled` | `false` | Disables the `opa` module. | + +### Variáveis + +| Variável | Exemplo | Descrição | +| --------- | --------- | --------------------------------- | +| version | `v0.44.0` | The version of `opa` | +| symbol | | Espelha o valor da opção `symbol` | +| style\* | | Espelha o valor da opção `style` | + +*: Esta variável só pode ser usada como parte de uma string de estilo + +### Exemplo + +```toml +# ~/.config/starship.toml + +[opa] +format = 'via [⛑️ $version](bold red) ' ``` ## OpenStack @@ -2524,8 +2690,8 @@ O módulo `openstack` exibe o OpenStack cloud e projeto atual. O módulo apenas | Opções | Padrão | Descrição | | ---------- | ----------------------------------------------- | ---------------------------------------------------- | | `format` | `'on [$symbol$cloud(\($project\))]($style) '` | O formato do módulo. | -| `symbol` | `"☁️ "` | O simbolo usado para exibir o OpenStack cloud atual. | -| `style` | `"bold yellow"` | O estilo do módulo. | +| `symbol` | `'☁️ '` | O simbolo usado para exibir o OpenStack cloud atual. | +| `style` | `'bold yellow'` | O estilo do módulo. | | `disabled` | `false` | Desabilita o módulo `openstack`. | ### Variáveis @@ -2546,8 +2712,105 @@ O módulo `openstack` exibe o OpenStack cloud e projeto atual. O módulo apenas [openstack] format = 'on [$symbol$cloud(\($project\))]($style) ' -style = "bold yellow" -symbol = "☁️ " +style = 'bold yellow' +symbol = '☁️ ' +``` + +## OS + +The `os` module shows the current operating system. OS information is detected via the [os_info](https://lib.rs/crates/os_info) crate. + +::: atenção + +The [os_info](https://lib.rs/crates/os_info) crate used by this module is known to be inaccurate on some systems. + +::: + +::: tip + +Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para `false` no seu arquivo de configuração. + +::: + +### Opções + +| Opções | Padrão | Descrição | +| ---------- | --------------------- | ------------------------------------------------------ | +| `format` | `"[$symbol]($style)"` | O formato do módulo. | +| `style` | `"bold white"` | O estilo do módulo. | +| `disabled` | `true` | Disables the `os` module. | +| `symbols` | | A table that maps each operating system to its symbol. | + +`symbols` allows you to define arbitrary symbols to display for each operating system type. Operating system types not defined by your configuration use the default symbols table below. All operating systems currently supported by the module are listed below. If you would like an operating system to be added, feel free to open a [feature request](https://github.com/starship/starship/issues/new/choose). + +```toml +# This is the default symbols table. +[os.symbols] +Alpine = "🏔️ " +Amazon = "🙂 " +Android = "🤖 " +Arch = "🎗️ " +CentOS = "💠 " +Debian = "🌀 " +DragonFly = "🐉 " +Emscripten = "🔗 " +EndeavourOS = "🚀 " +Fedora = "🎩 " +FreeBSD = "😈 " +Garuda = "🦅 " +Gentoo = "🗜️ " +HardenedBSD = "🛡️ " +Illumos = "🐦 " +Linux = "🐧 " +Macos = "🍎 " +Manjaro = "🥭 " +Mariner = "🌊 " +MidnightBSD = "🌘 " +Mint = "🌿 " +NetBSD = "🚩 " +NixOS = "❄️ " +OpenBSD = "🐡 " +openSUSE = "🦎 " +OracleLinux = "🦴 " +Pop = "🍭 " +Raspbian = "🍓 " +Redhat = "🎩 " +RedHatEnterprise = "🎩 " +Redox = "🧪 " +Solus = "⛵ " +SUSE = "🦎 " +Ubuntu = "🎯 " +Unknown = "❓ " +Windows = "🪟 " +``` + +### Variáveis + +| Variável | Exemplo | Descrição | +| --------- | ------------ | ------------------------------------------------------------------ | +| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | +| name | `Arch Linux` | The current operating system name | +| type | `Arch` | The current operating system type | +| codename | | The current operating system codename, if applicable | +| edition | | The current operating system edition, if applicable | +| version | | The current operating system version, if applicable | +| style\* | | Espelha o valor da opção `style` | + +*: Esta variável só pode ser usada como parte de uma string de estilo + +### Exemplo + +```toml +# ~/.config/starship.toml + +[os] +format = "on [($name )]($style)" +style = "bold blue" +disabled = false + +[os.symbols] +Windows = " " +Arch = "Arch is the best! " ``` ## Versionamento de Pacotes @@ -2576,14 +2839,14 @@ O módulo `package` é mostrado quando o diretório atual é o repositório de u ### Opções -| Opções | Padrão | Descrição | -| ----------------- | --------------------------------- | ------------------------------------------------------------------------------------ | -| `format` | `"is [$symbol$version]($style) "` | O formato do módulo. | -| `symbol` | `"📦 "` | O símbolo usado antes de exibir a versão do pacote. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold 208"` | O estilo do módulo. | -| `display_private` | `false` | Habilita a exibição da versão para os pacotes marcados como privado. | -| `disabled` | `false` | Desabilita o módulo `package`. | +| Opções | Padrão | Descrição | +| ----------------- | --------------------------------- | ----------------------------------------------------------------------------------- | +| `format` | `'is [$symbol$version]($style) '` | O formato do módulo. | +| `symbol` | `'📦 '` | O símbolo usado antes de exibir a versão do pacote. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold 208'` | O estilo do módulo. | +| `display_private` | `false` | Habilita a exibição da versão para os pacotes marcados como privado. | +| `disabled` | `false` | Desabilita o módulo `package`. | ### Variáveis @@ -2601,7 +2864,7 @@ O módulo `package` é mostrado quando o diretório atual é o repositório de u # ~/.config/starship.toml [package] -format = "via [🎁 $version](208 bold) " +format = 'via [🎁 $version](208 bold) ' ``` ## Perl @@ -2616,16 +2879,16 @@ O módulo `perl` exibe a versão atual instalada do [Perl](https://www.perl.org/ ### Opções -| Opções | Padrão | Descrição | -| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | A string de formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | O símbolo usado antes de exibir a versão do Perl. | -| `detect_extensions` | `["pl", "pm", "pod"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `style` | `"bold 149"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `perl`. | +| Opções | Padrão | Descrição | +| ------------------- | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | A string de formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐪 '` | O símbolo usado antes de exibir a versão do Perl. | +| `detect_extensions` | `['pl', 'pm', 'pod']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `style` | `'bold 149'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `perl`. | ### Variáveis @@ -2641,29 +2904,29 @@ O módulo `perl` exibe a versão atual instalada do [Perl](https://www.perl.org/ # ~/.config/starship.toml [perl] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## PHP O módulo `php` mostra a versão atualmente instalada do [PHP](https://www.php.net/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: -- O diretório atual contem um arquivo `composer.json` +- The current directory contains a `composer.json` file - O diretório atual tenha um arquivo `.php-version` - O diretório atual tenha um arquivo com extensão `.php` ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | -| `detect_extensions` | `["php"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `["composer.json", ".php-version"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `style` | `"147 bold"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `php`. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐘 '` | The symbol used before displaying the version of PHP. | +| `detect_extensions` | `['php']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['composer.json', '.php-version']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `style` | `'147 bold'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `php`. | ### Variáveis @@ -2681,7 +2944,7 @@ O módulo `php` mostra a versão atualmente instalada do [PHP](https://www.php.n # ~/.config/starship.toml [php] -format = "via [🔹 $version](147 bold) " +format = 'via [🔹 $version](147 bold) ' ``` ## Pulumi @@ -2701,14 +2964,14 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida: ### Opções -| Opções | Padrão | Descrição | -| ---------------- | -------------------------------------------- | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($username@)$stack]($style) "` | A string de formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | Uma string que é exibida antes do Pulumi stack. | -| `style` | `"bold 5"` | O estilo do módulo. | -| `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | -| `disabled` | `false` | Desabilita o módulo `pulumi`. | +| Opções | Padrão | Descrição | +| ---------------- | -------------------------------------------- | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($username@)$stack]($style) '` | A string de formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | Uma string que é exibida antes do Pulumi stack. | +| `style` | `'bold 5'` | O estilo do módulo. | +| `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | +| `disabled` | `false` | Desabilita o módulo `pulumi`. | ### Variáveis @@ -2730,7 +2993,7 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida: # ~/.config/starship.toml [pulumi] -format = "[🛥 ($version )$stack]($style) " +format = '[🛥 ($version )$stack]($style) ' ``` #### Sem a versão do Pulumi @@ -2738,29 +3001,29 @@ format = "[🛥 ($version )$stack]($style) " ```toml # ~/.config/starship.toml [pulumi] -symbol = "🛥 " -format = "[$symbol$stack]($style) " +symbol = '🛥 ' +format = '[$symbol$stack]($style) ' ``` ## PureScript O módulo `purescript` exibe a versão atual instalada do [PureScript](https://www.purescript.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: -- O diretório atual contem um arquivo `spago.dhall` +- O diretório atual conter um arquivo `spago.dhall` - O diretório atual tenha um arquivo com a extensão `.purs` ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"<=> "` | O símbolo usado antes de exibir a versão do PureScript. | -| `detect_extensions` | `["purs"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `["spago.dhall"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `style` | `"bold white"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `purescript`. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'<=> '` | O símbolo usado antes de exibir a versão do PureScript. | +| `detect_extensions` | `['purs']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['spago.dhall']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `style` | `'bold white'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `purescript`. | ### Variáveis @@ -2778,7 +3041,7 @@ O módulo `purescript` exibe a versão atual instalada do [PureScript](https://w # ~/.config/starship.toml [purescript] -format = "via [$symbol$version](bold white)" +format = 'via [$symbol$version](bold white)' ``` ## Python @@ -2792,34 +3055,34 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual tenha um arquivo `.python-version` - O diretório atual tenha um arquivo `Pipfile` - O diretório atual tenha um arquivo `__init__.py` -- O diretório atual contem um arquivo `pyproject.toml` -- O diretório atual contem um arquivo `requirements.txt` -- O diretório atual contem um arquivo `setup.py` -- O diretório atual contem um arquivo `tox.ini` +- O diretório atual conter um arquivo `pyproject.toml` +- O diretório atual conter um arquivo `requirements.txt` +- O diretório atual conter um arquivo `setup.py` +- O diretório atual conter um arquivo `tox.ini` - O diretório atual tenha um arquivo com a extensão `.py`. - Um ambiente virtual está atualmente ativo ### Opções -| Opções | Padrão | Descrição | -| -------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | Uma string que representa o simbolo do Python | -| `style` | `"yellow bold"` | O estilo do módulo. | -| `pyenv_version_name` | `false` | Usa pyenv para pegar a versão do Python | -| `pyenv_prefix` | `pyenv` | Prefixo antes da versão do pyenv, apenas usado se pyenv for usado | -| `python_binary` | `["python", "python3", "python2"]` | Configura o binário python que o Starship vai executar para obter a versão. | -| `detect_extensions` | `["py"]` | Quais extensões devem acionar este módulo | -| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | [] | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo | -| `disabled` | `false` | Desabilita o módulo `python`. | +| Opções | Padrão | Descrição | +| -------------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐍 '` | Uma string que representa o simbolo do Python | +| `style` | `'yellow bold'` | O estilo do módulo. | +| `pyenv_version_name` | `false` | Usa pyenv para pegar a versão do Python | +| `pyenv_prefix` | `pyenv` | Prefixo antes da versão do pyenv, apenas usado se pyenv for usado | +| `python_binary` | `['python', 'python3', 'python2']` | Configura o binário python que o Starship vai executar para obter a versão. | +| `detect_extensions` | `['py']` | Quais extensões devem acionar este módulo | +| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | [] | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo | +| `disabled` | `false` | Desabilita o módulo `python`. | ::: tip A variável `python_binary` aceita uma string ou uma lista de strings. O Starship vai tentar executar cada binário até obter um resultado. Note que você pode apenas alterar o binário em que o Starship executa para pegar a versão do Python não os argumentos que são utilizados. -O valor padrão e a ordem para o `python_binary` foram escolhidos para identificar primeiro uma versão do Python em um ambiente virtualenv/conda (que atualmente adiciona um `python`, não importa se ele aponta pro `python3` ou `python2`). Este tem efeito de lado, se você tenha um sistema com Python 2 instalado, pode ser usado antes de qualquer Python 3 (pelo menos nas Distros Linux que sempre fazem um symlink `/usr/bin/python` para Python 2). Se você não trabalha mais com Python 2, mas não pode remover do sistema o Python 2, alterando este para `"python3"` vai esconder qualquer versão de Python 2, veja o exemplo abaixo. +O valor padrão e a ordem para o `python_binary` foram escolhidos para identificar primeiro uma versão do Python em um ambiente virtualenv/conda (que atualmente adiciona um `python`, não importa se ele aponta pro `python3` ou `python2`). Este tem efeito de lado, se você tenha um sistema com Python 2 instalado, pode ser usado antes de qualquer Python 3 (pelo menos nas Distros Linux que sempre fazem um symlink `/usr/bin/python` para 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. ::: @@ -2827,11 +3090,11 @@ O valor padrão e a ordem para o `python_binary` foram escolhidos para identific | Variável | Exemplo | Descrição | | ------------ | --------------- | --------------------------------------- | -| version | `"v3.8.1"` | A versão do `python` | -| symbol | `"🐍 "` | Espelha o valor da opção `symbol` | -| style | `"yellow bold"` | Espelha o valor da opção `style` | -| pyenv_prefix | `"pyenv "` | Espelha o valor da opção `pyenv_prefix` | -| virtualenv | `"venv"` | O nome atual do `virtualenv` | +| version | `'v3.8.1'` | A versão do `python` | +| symbol | `'🐍 '` | Espelha o valor da opção `symbol` | +| style | `'yellow bold'` | Espelha o valor da opção `style` | +| pyenv_prefix | `'pyenv '` | Espelha o valor da opção `pyenv_prefix` | +| virtualenv | `'venv'` | O nome atual do `virtualenv` | ### Exemplo @@ -2839,7 +3102,7 @@ O valor padrão e a ordem para o `python_binary` foram escolhidos para identific # ~/.config/starship.toml [python] -symbol = "👾 " +symbol = '👾 ' pyenv_version_name = true ``` @@ -2848,7 +3111,7 @@ pyenv_version_name = true [python] # Use apenas o binário `python3` para obter a versão. -python_binary = "python3" +python_binary = 'python3' ``` ```toml @@ -2867,7 +3130,7 @@ detect_extensions = [] # # Note que isso só funcionará quando o venv estiver dentro do projeto e só # funcionará apenas no diretório que contém o diretório venv, mas talvez isso seja ok? -python_binary = ["./venv/bin/python", "python", "python3", "python2"] +python_binary = ['./venv/bin/python', 'python', 'python3', 'python2'] ``` ## R @@ -2884,16 +3147,16 @@ O módulo `rlang` mostra a versão atualmente instalada do [R](https://www.r-pro ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"📐"` | Uma string que representa o simbolo do R. | -| `style` | `"blue bold"` | O estilo do módulo. | -| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Quais extensões devem acionar este módulo | -| `detect_files` | `[".Rprofile"]` | [] | -| `detect_folders` | `[".Rproj.user"]` | Quais pastas devem ativar este módulo | -| `disabled` | `false` | Desabilita o módulo `r`. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'📐'` | Uma string que representa o simbolo do R. | +| `style` | `'blue bold'` | O estilo do módulo. | +| `detect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | Quais extensões devem acionar este módulo | +| `detect_files` | `['.Rprofile']` | [] | +| `detect_folders` | `['.Rproj.user']` | Quais pastas devem ativar este módulo | +| `disabled` | `false` | Desabilita o módulo `r`. | ### Variáveis @@ -2901,7 +3164,7 @@ O módulo `rlang` mostra a versão atualmente instalada do [R](https://www.r-pro | -------- | ------------- | --------------------------------- | | version | `v4.0.5` | A versão do `R` | | symbol | | Espelha o valor da opção `symbol` | -| style | `"blue bold"` | Espelha o valor da opção `style` | +| style | `'blue bold'` | Espelha o valor da opção `style` | ### Exemplo @@ -2909,7 +3172,7 @@ O módulo `rlang` mostra a versão atualmente instalada do [R](https://www.r-pro # ~/.config/starship.toml [rlang] -format = "com [📐 $version](blue bold) " +format = 'with [📐 $version](blue bold) ' ``` ## Raku @@ -2921,16 +3184,16 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version-$vm_version )]($style)"` | A string de formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦋 "` | The symbol used before displaying the version of Raku | -| `detect_extensions` | `["p6", "pm6", "pod6", "raku", "rakumod"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `["META6.json"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `style` | `"bold 149"` | O estilo do módulo. | -| `disabled` | `false` | Disables the `raku` module. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------------------ | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version-$vm_version )]($style)'` | A string de formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦋 '` | The symbol used before displaying the version of Raku | +| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['META6.json']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `style` | `'bold 149'` | O estilo do módulo. | +| `disabled` | `false` | Disables the `raku` module. | ### Variáveis @@ -2947,7 +3210,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra # ~/.config/starship.toml [raku] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## Red @@ -2958,16 +3221,16 @@ Por padrão o módulo `red` exibe a versão atual instalada do [Red](https://www ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🔺 "` | Uma string que representa o simbolo do Red. | -| `detect_extensions` | `["red"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `style` | `"red bold"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `red`. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🔺 '` | Uma string que representa o simbolo do Red. | +| `detect_extensions` | `['red']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `style` | `'red bold'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `red`. | ### Variáveis @@ -2985,7 +3248,7 @@ Por padrão o módulo `red` exibe a versão atual instalada do [Red](https://www # ~/.config/starship.toml [red] -symbol = "🔴 " +symbol = '🔴 ' ``` ## Ruby @@ -3001,17 +3264,17 @@ O Starship pega a versão atual do Ruby rodando `ruby -v`. ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💎 "` | Uma string que representa o simbolo do Ruby. | -| `detect_extensions` | `["rb"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `["Gemfile", ".ruby-version"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Quais variáveis de ambiente devem ativar este módulo. | -| `style` | `"bold red"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `ruby`. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💎 '` | Uma string que representa o simbolo do Ruby. | +| `detect_extensions` | `['rb']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['Gemfile', '.ruby-version']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Quais variáveis de ambiente devem ativar este módulo. | +| `style` | `'bold red'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `ruby`. | ### Variáveis @@ -3029,7 +3292,7 @@ O Starship pega a versão atual do Ruby rodando `ruby -v`. # ~/.config/starship.toml [ruby] -symbol = "🔺 " +symbol = '🔺 ' ``` ## Rust @@ -3041,16 +3304,16 @@ Por padrão o módulo `rust` vai exibir a versão atual instalada do [Rust](http ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦀 "` | Uma string que representa o simbolo do Rust | -| `detect_extensions` | `["rs"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `["Cargo.toml"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `style` | `"bold red"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `rust`. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦀 '` | Uma string que representa o simbolo do Rust | +| `detect_extensions` | `['rs']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['Cargo.toml']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `style` | `'bold red'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `rust`. | ### Variáveis @@ -3070,7 +3333,7 @@ Por padrão o módulo `rust` vai exibir a versão atual instalada do [Rust](http # ~/.config/starship.toml [rust] -format = "via [⚙️ $version](red bold)" +format = 'via [⚙️ $version](red bold)' ``` ## Scala @@ -3083,16 +3346,16 @@ O módulo `scala` exibe a versão atual instalada do [Scala](https://www.scala-l ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------ | -| `format` | `"via [${symbol}(${version} )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["sbt", "scala"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[".metals"]` | Quais pastas devem ativar este módulo. | -| `symbol` | `"🆂 "` | Uma string que representa o simbolo do Scala. | -| `style` | `"red dimmed"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `scala`. | +| Opções | Padrão | Descrição | +| ------------------- | ---------------------------------------- | ----------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}(${version} )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['sbt', 'scala']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `['.metals']` | Quais pastas devem ativar este módulo. | +| `symbol` | `'🆂 '` | Uma string que representa o simbolo do Scala. | +| `style` | `'red dimmed'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `scala`. | ### Variáveis @@ -3110,7 +3373,7 @@ O módulo `scala` exibe a versão atual instalada do [Scala](https://www.scala-l # ~/.config/starship.toml [scala] -symbol = "🌟 " +symbol = '🌟 ' ``` ## Shell @@ -3127,19 +3390,19 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para | Opções | Padrão | Descrição | | ---------------------- | ------------------------- | ------------------------------------------------------- | -| `bash_indicator` | `"bsh"` | Uma string para representar o bash. | -| `fish_indicator` | `"fsh"` | Uma string usada para representar o fish. | -| `zsh_indicator` | `"zsh"` | Uma string usada para representar o zsh. | -| `powershell_indicator` | `"psh"` | Uma string usada para representar o powershell. | -| `ion_indicator` | `"ion"` | Uma string usada para representar o ion. | -| `elvish_indicator` | `"esh"` | Uma string usada para representar o elvish. | -| `tcsh_indicator` | `"tsh"` | Uma string usada para representar o tcsh. | -| `xonsh_indicator` | `"xsh"` | Uma string usada para representar o xonsh. | -| `cmd_indicator` | `"cmd"` | Uma string usada para representar o cmd. | -| `nu_indicator` | `"nu"` | Uma string usada para representar o nu. | -| `unknown_indicator` | | Valor padrão para exibir quando o shell é desconhecido. | -| `format` | `"[$indicator]($style) "` | O formato do módulo. | -| `style` | `"white bold"` | O estilo do módulo. | +| `bash_indicator` | `'bsh'` | Uma string para representar o bash. | +| `fish_indicator` | `'fsh'` | Uma string usada para representar o fish. | +| `zsh_indicator` | `'zsh'` | Uma string usada para representar o zsh. | +| `powershell_indicator` | `'psh'` | Uma string usada para representar o powershell. | +| `ion_indicator` | `'ion'` | Uma string usada para representar o ion. | +| `elvish_indicator` | `'esh'` | Uma string usada para representar o elvish. | +| `tcsh_indicator` | `'tsh'` | Uma string usada para representar o tcsh. | +| `xonsh_indicator` | `'xsh'` | Uma string usada para representar o xonsh. | +| `cmd_indicator` | `'cmd'` | Uma string usada para representar o cmd. | +| `nu_indicator` | `'nu'` | Uma string usada para representar o nu. | +| `unknown_indicator` | `''` | Valor padrão para exibir quando o shell é desconhecido. | +| `format` | `'[$indicator]($style) '` | O formato do módulo. | +| `style` | `'white bold'` | O estilo do módulo. | | `disabled` | `true` | Desabilita o módulo `shell`. | ### Variáveis @@ -3157,26 +3420,26 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para # ~/.config/starship.toml [shell] -fish_indicator = "" -powershell_indicator = "_" -unknown_indicator = "mystery shell" -style = "cyan bold" +fish_indicator = '' +powershell_indicator = '_' +unknown_indicator = 'mystery shell' +style = 'cyan bold' disabled = false ``` ## SHLVL -O módulo `shlvl` exibe o atual [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") variável de ambiente, se estiver definido um número e coincidir ou exceder o limite especificado. +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ('shell level') environment variable, if it is set to a number and meets or exceeds the specified threshold. ### Opções | Opções | Padrão | Descrição | | ----------- | ---------------------------- | ----------------------------------------------------------------- | | `threshold` | `2` | Limite de exibição. | -| `format` | `"[$symbol$shlvl]($style) "` | O formato do módulo. | -| `symbol` | `"↕️ "` | O simbolo usado para representar o `SHLVL`. | +| `format` | `'[$symbol$shlvl]($style) '` | O formato do módulo. | +| `symbol` | `'↕️ '` | O simbolo usado para representar o `SHLVL`. | | `repeat` | `false` | Caso o `symbol` deva se repetir de acordo com o total do `SHLVL`. | -| `style` | `"bold yellow"` | O estilo do módulo. | +| `style` | `'bold yellow'` | O estilo do módulo. | | `disabled` | `true` | Desabilita o módulo `shlvl`. | ### Variáveis @@ -3196,7 +3459,7 @@ O módulo `shlvl` exibe o atual [`SHLVL`](https://tldp.org/LDP/abs/html/internal [shlvl] disabled = false -format = "$shlvl level(s) down" +format = '$shlvl level(s) down' threshold = 3 ``` @@ -3209,8 +3472,8 @@ O módulo `singularity` exibe a imagem atual do [Singularity](https://sylabs.io/ | Opções | Padrão | Descrição | | ---------- | -------------------------------- | ------------------------------------------- | | `format` | `'[$symbol\[$env\]]($style) '` | O formato do módulo. | -| `symbol` | `""` | Uma string exibida antes do nome da imagem. | -| `style` | `"bold dimmed blue"` | O estilo do módulo. | +| `symbol` | `''` | Uma string exibida antes do nome da imagem. | +| `style` | `'bold dimmed blue'` | O estilo do módulo. | | `disabled` | `false` | Desabilita o módulo `singularity`. | ### Variáveis @@ -3241,9 +3504,9 @@ O módulo `spack` mostra o ambiente [Spack](https://spack.readthedocs.io/en/late | Opções | Padrão | Descrição | | ------------------- | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | O número de diretórios para os quais o caminho do ambiente deve ser truncado. `0` quer dizer sem truncação. Também consulte o módulo [`directory`](#directory). | -| `symbol` | `"🅢 "` | O simbolo usado antes do nome do environment. | -| `style` | `"bold blue"` | O estilo do módulo. | -| `format` | `"via [$symbol$environment]($style) "` | O formato do módulo. | +| `symbol` | `'🅢 '` | O simbolo usado antes do nome do environment. | +| `style` | `'bold blue'` | O estilo do módulo. | +| `format` | `'via [$symbol$environment]($style) '` | O formato do módulo. | | `disabled` | `false` | Desabilita o módulo `spack`. | ### Variáveis @@ -3262,7 +3525,7 @@ O módulo `spack` mostra o ambiente [Spack](https://spack.readthedocs.io/en/late # ~/.config/starship.toml [spack] -format = "[$symbol$environment](dimmed blue) " +format = '[$symbol$environment](dimmed blue) ' ``` ## Status @@ -3279,14 +3542,14 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para | Opções | Padrão | Descrição | | --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `format` | `"[$symbol$status]($style) "` | O formato do módulo | -| `symbol` | `"✖"` | O simbolo exibido no erro de programa | -| `success_symbol` | `""` | O simbolo exibido no sucesso de programa | -| `not_executable_symbol` | `"🚫"` | O simbolo exibido quando o arquivo não é executável | -| `not_found_symbol` | `"🔍"` | O simbolo exibido quando o comando não é encontrado | -| `sigint_symbol` | `"🧱"` | O simbolo exibido no SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | O simbolo exibido em qualquer sinal | -| `style` | `"bold red"` | O estilo do módulo. | +| `format` | `'[$symbol$status]($style) '` | O formato do módulo | +| `symbol` | `'❌'` | O simbolo exibido no erro de programa | +| `success_symbol` | `''` | O simbolo exibido no sucesso de programa | +| `not_executable_symbol` | `'🚫'` | O simbolo exibido quando o arquivo não é executável | +| `not_found_symbol` | `'🔍'` | O simbolo exibido quando o comando não é encontrado | +| `sigint_symbol` | `'🧱'` | O simbolo exibido no SIGINT (Ctrl + c) | +| `signal_symbol` | `'⚡'` | O simbolo exibido em qualquer sinal | +| `style` | `'bold red'` | O estilo do módulo. | | `recognize_signal_code` | `true` | Habilita o mapeamento de sinais para códigos de saída | | `map_symbol` | `false` | Habilita o mapeamento de símbolos para códigos de saída | | `pipestatus` | `false` | Habilita o relatório de pipestatus | @@ -3318,9 +3581,9 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para # ~/.config/starship.toml [status] -style = "bg:blue" -symbol = "🔴 " -success_symbol = "🟢 SUCCESS" +style = 'bg:blue' +symbol = '🔴 ' +success_symbol = '🟢 SUCCESS' format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false @@ -3340,9 +3603,9 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para | Opções | Padrão | Descrição | | --------------- | ------------------------ | -------------------------------------------------------------------------- | -| `format` | `"[as $symbol]($style)"` | O formato do módulo | -| `symbol` | `"🧙 "` | O simbolo exibido quando as credenciais estão em cache | -| `style` | `"bold blue"` | O estilo do módulo. | +| `format` | `'[as $symbol]($style)'` | O formato do módulo | +| `symbol` | `'🧙 '` | O simbolo exibido quando as credenciais estão em cache | +| `style` | `'bold blue'` | O estilo do módulo. | | `allow_windows` | `false` | Desde que o Windows não tem um padrão sudo, o valor padrão é desabilitado. | | `disabled` | `true` | Desabilita o módulo `sudo`. | @@ -3361,8 +3624,8 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para # ~/.config/starship.toml [sudo] -style = "bold green" -symbol = "👩‍💻 " +style = 'bold green' +symbol = '👩‍💻 ' disabled = false ``` @@ -3384,16 +3647,16 @@ Por padrão o módulo `swift` vai exibir a versão atual instalada do [Swift](ht ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐦 "` | Uma string que representa o simbolo do Swift | -| `detect_extensions` | `["swift"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `["Package.swift"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `style` | `"bold 202"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `swift`. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐦 '` | Uma string que representa o simbolo do Swift | +| `detect_extensions` | `['swift']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['Package.swift']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `style` | `'bold 202'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `swift`. | ### Variáveis @@ -3411,7 +3674,7 @@ Por padrão o módulo `swift` vai exibir a versão atual instalada do [Swift](ht # ~/.config/starship.toml [swift] -format = "via [🏎 $version](red bold)" +format = 'via [🏎 $version](red bold)' ``` ## Terraform @@ -3431,16 +3694,16 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida: ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol$workspace]($style) "` | A string de formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | Uma string que é exibida antes do workspace terraform. | -| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[".terraform"]` | Quais pastas devem ativar este módulo. | -| `style` | `"bold 105"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `terraform`. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol$workspace]($style) '` | A string de formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💠'` | Uma string que é exibida antes do workspace terraform. | +| `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `['.terraform']` | Quais pastas devem ativar este módulo. | +| `style` | `'bold 105'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `terraform`. | ### Variáveis @@ -3461,7 +3724,7 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida: # ~/.config/starship.toml [terraform] -format = "[🏎💨 $version$workspace]($style) " +format = '[🏎💨 $version$workspace]($style) ' ``` #### Sem a versão do Terraform @@ -3470,7 +3733,7 @@ format = "[🏎💨 $version$workspace]($style) " # ~/.config/starship.toml [terraform] -format = "[🏎💨 $workspace]($style) " +format = '[🏎💨 $workspace]($style) ' ``` ## Horário @@ -3487,15 +3750,15 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para | Opções | Padrão | Descrição | | ----------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | A string de formato do módulo. | +| `format` | `'at [$time]($style) '` | A string de formato do módulo. | | `use_12hr` | `false` | Habilita a formatação de 12 horas | | `time_format` | veja abaixo | A string [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) usada para formatar a hora. | -| `style` | `"bold yellow"` | O estilo do módulo time | -| `utc_time_offset` | `"local"` | Define o UTC a ser usado. Intervalo de -24 < x < 24. Aceita floats para acomodar timezones 30/45. | +| `style` | `'bold yellow'` | O estilo do módulo time | +| `utc_time_offset` | `'local'` | Define o UTC a ser usado. Intervalo de -24 < x < 24. Aceita floats para acomodar timezones 30/45. | | `disabled` | `true` | Desabilita o módulo `time`. | -| `time_range` | `"-"` | Define o intervalo de tempo o qual o módulo será exibido. O horário deve ser especificado no formato de 24-hours | +| `time_range` | `'-'` | Define o intervalo de tempo o qual o módulo será exibido. O horário deve ser especificado no formato de 24-hours | -Se `use_12hr` é `true`, então `time_format` tem o padrão `"%r"`. Caso contrário, o padrão é `"%T"`. Ajustes manuais no `time_format` irão sobrescrever a configuração `use_12hr`. +If `use_12hr` is `true`, then `time_format` defaults to `'%r'`. Otherwise, it defaults to `'%T'`. Ajustes manuais no `time_format` irão sobrescrever a configuração `use_12hr`. ### Variáveis @@ -3514,9 +3777,9 @@ Se `use_12hr` é `true`, então `time_format` tem o padrão `"%r"`. Caso contrá [time] disabled = false format = '🕙[\[ $time \]]($style) ' -time_format = "%T" -utc_time_offset = "-5" -time_range = "10:00:00-14:00:00" +time_format = '%T' +utc_time_offset = '-5' +time_range = '10:00:00-14:00:00' ``` ## Nome do usuário @@ -3538,9 +3801,9 @@ Conexões SSH são detectadas checando as variáveis de ambiente `SSH_CONNECTION | Opções | Padrão | Descrição | | ------------- | ----------------------- | --------------------------------------------- | -| `style_root` | `"bold red"` | O estilo usado quando o usuário é root/admin. | -| `style_user` | `"bold yellow"` | O estilo usado para usuários não root. | -| `format` | `"[$user]($style) in "` | O formato do módulo. | +| `style_root` | `'bold red'` | O estilo usado quando o usuário é root/admin. | +| `style_user` | `'bold yellow'` | O estilo usado para usuários não root. | +| `format` | `'[$user]($style) in '` | O formato do módulo. | | `show_always` | `false` | Sempre exibe o módulo `username`. | | `disabled` | `false` | Desabilita o módulo `username`. | @@ -3548,8 +3811,8 @@ Conexões SSH são detectadas checando as variáveis de ambiente `SSH_CONNECTION | Variável | Exemplo | Descrição | | -------- | ------------ | -------------------------------------------------------------------------------------- | -| `style` | `"red bold"` | Espelha o valor da opção `style_root` quando o root esta logado e `style_user` se não. | -| `user` | `"fulano"` | O ID do usuário logado atualmente. | +| `style` | `'red bold'` | Espelha o valor da opção `style_root` quando o root esta logado e `style_user` se não. | +| `user` | `'fulano'` | O ID do usuário logado atualmente. | ### Exemplo @@ -3557,9 +3820,9 @@ Conexões SSH são detectadas checando as variáveis de ambiente `SSH_CONNECTION # ~/.config/starship.toml [username] -style_user = "white bold" -style_root = "black bold" -format = "user: [$user]($style) " +style_user = 'white bold' +style_root = 'black bold' +format = 'user: [$user]($style) ' disabled = false show_always = true ``` @@ -3572,16 +3835,16 @@ O módulo `vagrant` exibe a versão atual instalada do [Vagrant](https://www.vag ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"⍱ "` | Um formato de string que representa o simbolo do Vagrant. | -| `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `["Vagrantfile"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `style` | `"cyan bold"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `vagrant`. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'⍱ '` | Um formato de string que representa o simbolo do Vagrant. | +| `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['Vagrantfile']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `style` | `'cyan bold'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `vagrant`. | ### Variáveis @@ -3599,7 +3862,7 @@ O módulo `vagrant` exibe a versão atual instalada do [Vagrant](https://www.vag # ~/.config/starship.toml [vagrant] -format = "via [⍱ $version](bold white) " +format = 'via [⍱ $version](bold white) ' ``` ## V @@ -3611,16 +3874,16 @@ O módulo `vlang` exibe a versão atual instalada do [V](https://vlang.io/). Por ### Opções -| Opções | Padrão | Descrição | -| ------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"V "` | Um formato de string que representa o simbolo do V | -| `detect_extensions` | `["v"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `style` | `"blue bold"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `vlang`. | +| Opções | Padrão | Descrição | +| ------------------- | -------------------------------------------- | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'V '` | Um formato de string que representa o simbolo do V | +| `detect_extensions` | `['v']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `style` | `'blue bold'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `vlang`. | ### Variáveis @@ -3635,7 +3898,7 @@ O módulo `vlang` exibe a versão atual instalada do [V](https://vlang.io/). Por ```toml # ~/.config/starship.toml [vlang] -format = "via [V $version](blue bold) " +format = 'via [V $version](blue bold) ' ``` ## VCSH @@ -3646,9 +3909,9 @@ O módulo `vcsh` exibe o repositório [VCSH](https://github.com/RichiH/vcsh) atu | Opções | Padrão | Descrição | | ---------- | -------------------------------- | ------------------------------------------------------ | -| `symbol` | | O simbolo usado antes de exibir o nome do repositório. | -| `style` | `"bold yellow"` | O estilo do módulo. | -| `format` | `"vcsh [$symbol$repo]($style) "` | O formato do módulo. | +| `symbol` | `''` | O simbolo usado antes de exibir o nome do repositório. | +| `style` | `'bold yellow'` | O estilo do módulo. | +| `format` | `'vcsh [$symbol$repo]($style) '` | O formato do módulo. | | `disabled` | `false` | Desabilita o módulo `vcsh`. | ### Variáveis @@ -3667,7 +3930,7 @@ O módulo `vcsh` exibe o repositório [VCSH](https://github.com/RichiH/vcsh) atu # ~/.config/starship.toml [vcsh] -format = "[🆅 $repo](bold blue) " +format = '[🆅 $repo](bold blue) ' ``` ## Zig @@ -3678,16 +3941,16 @@ Por padrão, o módulo `zig` mostra a versão atualmente instalada do [Zig](http ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"↯ "` | O símbolo usado antes de exibir a versão do Zig. | -| `style` | `"bold yellow"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `zig`. | -| `detect_extensions` | `["zig"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'↯ '` | O símbolo usado antes de exibir a versão do Zig. | +| `style` | `'bold yellow'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `zig`. | +| `detect_extensions` | `['zig']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | ### Variáveis @@ -3705,7 +3968,7 @@ Por padrão, o módulo `zig` mostra a versão atualmente instalada do [Zig](http # ~/.config/starship.toml [zig] -symbol = "⚡️ " +symbol = '⚡️ ' ``` ## Comandos Personalizados @@ -3750,16 +4013,16 @@ Strings de formatação também podem conter sequencias de prompt especificas de | Opções | Padrão | Descrição | | ------------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | `""` | O comando cuja a saída deve ser exibida. O comando será passado no stdin para o shell. | +| `command` | `''` | O comando cuja a saída deve ser exibida. O comando será passado no stdin para o shell. | | `when` | `false` | Ou um valor booleano (`true` ou `false`, sem aspas) ou um comando shell de string usado como condição para mostrar o módulo. No caso de uma string, o módulo será mostrado se o comando retornar um código de status `0`. | | `shell` | | [Veja abaixo](#custom-command-shell) | -| `description` | `""` | A descrição do módulo, isto será exibido quando executar `starship explain`. | +| `description` | `''` | A descrição do módulo, isto será exibido quando executar `starship explain`. | | `detect_files` | `[]` | Os arquivos que serão buscados por correspondência no diretório atual. | | `detect_folders` | `[]` | Os diretórios que serão buscados por correspondência no diretório atual. | | `detect_extensions` | `[]` | As extensões que serão buscadas por correspondência no diretório atual. | -| `symbol` | `""` | O simbolo usado antes de exibir a saída do comando. | -| `style` | `"bold green"` | O estilo do módulo. | -| `format` | `"[$symbol($output )]($style)"` | O formato do módulo. | +| `symbol` | `''` | O simbolo usado antes de exibir a saída do comando. | +| `style` | `'bold green'` | O estilo do módulo. | +| `format` | `'[$symbol($output )]($style)'` | O formato do módulo. | | `disabled` | `false` | Desabilita este módulo `custom`. | | `os` | | Nome do sistema operacional onde módulo sera exibido (unix, linux, macos, windows, ... ) [Veja os possíveis valores](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | | `use_stdin` | | Um valor booleano opcional que substitui se os comandos devem ser encaminhados para o shell por meio da entrada padrão ou como um argumento. Se a entrada padrão não definida for usada por padrão, a menos que o shell não a suporte (cmd, nushell). Configurar isso desativa a manipulação de argumentos específicos do shell. | @@ -3782,14 +4045,14 @@ Strings de formatação também podem conter sequencias de prompt especificas de - A primeira string é o caminho para o shell que executará o comando. - Outros argumentos que serão passados para o shell. -Se não definido, ele retornará para o STARSHIP_SHELl e então para o "sh" no Linux e "cmd/C" no Windows. +If unset, it will fallback to STARSHIP_SHELL and then to 'sh' on Linux, and 'cmd /C' on Windows. O `command` será passado no stdin. Se o `shell` não for dado ou apenas conter um elemento e o Starship detectar PowerShell ele será usado, os seguintes argumentos serão automaticamente adicionados: `-NoProfile -Command -`. Se `shell` não for fornecido ou contiver apenas um elemento e o Starship detectar que o Cmd será usado, o seguinte argumento será adicionado automaticamente: `/C` e `stdin` serão definidos como `false`. Se `shell` não for fornecido ou contiver apenas um elemento e o Starship detectar que o Nushell será usado, os seguintes argumentos serão adicionados automaticamente: `-c` e `stdin` serão definidos como `false`. Este comportamento pode ser evitado passando explicitamente argumento para o shell, ex. ```toml -shell = ["pwsh", "-Command", "-"] +shell = ['pwsh', '-Command', '-'] ``` ::: warning Tenha certeza que tenha uma configuração de shell @@ -3810,19 +4073,19 @@ Detecção automática de shell e adição de parâmetros estão sendo implement # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -detect_files = ["foo"] # can specify filters but wildcards are not supported -when = """ test "$HOME" = "$PWD" """ -format = " transcending [$output]($style)" +command = 'echo foo' # shows output of command +detect_files = ['foo'] # can specify filters but wildcards are not supported +when = ''' test "$HOME" = "$PWD" ''' +format = ' transcending [$output]($style)' [custom.time] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command', '-'] [custom.time-as-arg] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command'] use_stdin = false ``` diff --git a/docs/pt-BR/guide/README.md b/docs/pt-BR/guide/README.md index 00a96bfc..1ebb4c24 100644 --- a/docs/pt-BR/guide/README.md +++ b/docs/pt-BR/guide/README.md @@ -219,7 +219,6 @@ Ou instale o Starship usando qualquer um dos seguintes gerenciadores de pacotes: | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | | Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | -| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | @@ -417,6 +416,14 @@ Por favor, confira estes projetos anteriores que ajudaram a inspirar a criação - **[reujab/silver](https://github.com/reujab/silver)** – Um prompt personalizável com ícones do tipo powerline. +## ❤️ Patrocinadores + +Apoie este projeto [tornando-se um patrocinador](https://github.com/sponsors/starship). O seu nome ou logotipo aparecerá aqui com um link para o seu site. + +**Supporter Tier** + +- [Dimension](https://dimension.dev/) +


Ícone de foguete do Starship @@ -424,4 +431,4 @@ Por favor, confira estes projetos anteriores que ajudaram a inspirar a criação ## 📝 Licença -Todos os direitos reservados © 2019-Presente, [Contribuidores Starship](https://github.com/starship/starship/graphs/contributors).
Este projeto está licenciado pelo [ISC](https://github.com/starship/starship/blob/master/LICENSE). +Copyright © 2019-presente, [Colaboradores Starship](https://github.com/starship/starship/graphs/contributors).
Este projeto é licenciado pelo [ISC](https://github.com/starship/starship/blob/master/LICENSE). diff --git a/docs/pt-BR/presets/README.md b/docs/pt-BR/presets/README.md index e097f5fc..297a3e40 100644 --- a/docs/pt-BR/presets/README.md +++ b/docs/pt-BR/presets/README.md @@ -10,9 +10,17 @@ Essa personalização altera os símbolos para cada módulo usar Nerd Font. [![Captura de tela da personalização com símbolos usando Nerd Font](/presets/img/nerd-font-symbols.png "Clique para ver as personalizações para Nerd Font")](./nerd-font) +## [No Nerd Fonts](./no-nerd-font.md) + +This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt. + +::: tip This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). ::: + +[Click to view No Nerd Font preset](./no-nerd-font) + ## [Seguimentos entre colchetes](./bracketed-segments.md) -Está personalização altera o formato de todos os módulos integrados para que usem colchetes ao mostrar o seguimento ao invés de usar texto convencional do Starship ("via", "on", etc.). +Esta configuração altera o formato de todos os módulos internos para mostrar seus respectivos segmentos entre colchetes em vez de usar o texto convencional do Starship ("via", "on", etc.). [![Captura de tela de segmentos predefinidos](/presets/img/bracketed-segments.png "Clique para ver as personalizações de seguimentos entre colchetes")](./bracketed-segments) @@ -20,22 +28,34 @@ Está personalização altera o formato de todos os módulos integrados para que Essa personalização converte os símbolos para cada módulo em texto simples. Importante para quando não tiver suporte para caracteres Unicode. -[![Captura de tela de personalização de símbolos de texto simples](/presets/img/plain-text-symbols.png "Clique para ver as personalizações para símbolos de texto simples")](./plain-text) +[![Captura de tela da predefinição de símbolos de texto simples](/presets/img/plain-text-symbols.png "Clique para ver as personalizações para símbolos de texto simples")](./plain-text) ## [Runtime Ausente](./no-runtimes.md) -Está predefinição oculta a versão do runtime da linguagem. Se você trabalha com containers ou ambientes virtualizados, este é para você! +Esta predefinição oculta a versão do runtime da linguagem. Se você trabalha com containers ou ambientes virtualizados, esta aqui é para você! -[![Captura de tela de uma personalização ocultando a versão do runtime](/presets/img/no-runtime-versions.png "Clique para ver as personalizações para remover a versão do runtime")](./no-runtimes) +[![Captura da tela de predefinição Ocultar Versões de Runtime](/presets/img/no-runtime-versions.png "Clique para ver as personalizações para remover a versão do runtime")](./no-runtimes) + +## [No Empty Icons](./no-empty-icons.md) + +This preset does not show icons if the toolset is not found. + +[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Clique para ver as personalizações para remover a versão do runtime")](./no-empty-icons.md) ## [Prompt do Terminal com Pure](./pure-preset.md) -Essa personalização simula a aparência e o comportamento do [Pure](https://github.com/sindresorhus/pure). +Essa personalização simula o comportamento e aparência do [Pure](https://github.com/sindresorhus/pure). -[![Captura de tela da personalização do prompt do terminal usando Pure](/presets/img/pure-preset.png "Clique para ver as personalização para usar no prompt do terminal com Pure")](./pure-preset) +[![Captura de tela da configuração emulando Pure](/presets/img/pure-preset.png "Clique para ver as personalização para usar no prompt do terminal com Pure")](./pure-preset) ## [Pastel Powerline](./pastel-powerline.md) Esta personalização é inspirada em [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). Mostra também como a substituição de segmentos do caminho completo do diretório funciona no starship. -[![Capture de tela das personalizações com Pastel Powerline](/presets/img/pastel-powerline.png "Clique para ver as personalização para usar no prompt do terminal com Pure")](./pastel-powerline) +[![Screenshot do preset Pastel Powerline](/presets/img/pastel-powerline.png "Clique para ver as personalização para usar no prompt do terminal com Pure")](./pastel-powerline) + +## [Tokyo Night](./tokyo-night.md) + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) diff --git a/docs/pt-BR/presets/no-empty-icons.md b/docs/pt-BR/presets/no-empty-icons.md new file mode 100644 index 00000000..5c083f2d --- /dev/null +++ b/docs/pt-BR/presets/no-empty-icons.md @@ -0,0 +1,17 @@ +[Retornar para Personalizações](./README.md#no-empty-icons) + +# No Empty Icons Preset + +If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. + +![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) + +### Configuração + +```sh +starship preset no-empty-icons > ~/.config/starship.toml +``` + +[Clique para baixar o TOML](/presets/toml/no-empty-icons.toml) + +<<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/pt-BR/presets/no-nerd-font.md b/docs/pt-BR/presets/no-nerd-font.md new file mode 100644 index 00000000..a82a89b6 --- /dev/null +++ b/docs/pt-BR/presets/no-nerd-font.md @@ -0,0 +1,19 @@ +[Retornar para Personalizações](./README.md#no-nerd-fonts) + +# No Nerd Fonts Preset + +This preset restricts the use of symbols to those from emoji and powerline sets. + +This means that even without a Nerd Font installed, you should be able to view all module symbols. + +This preset will become the default preset in a future release of starship. + +### Configuração + +```sh +starship preset no-nerd-font > ~/.config/starship.toml +``` + +[Clique para baixar o TOML](/presets/toml/no-nerd-font.toml) + +<<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/pt-BR/presets/no-runtimes.md b/docs/pt-BR/presets/no-runtimes.md index b66d2ee6..70bc5662 100644 --- a/docs/pt-BR/presets/no-runtimes.md +++ b/docs/pt-BR/presets/no-runtimes.md @@ -2,9 +2,9 @@ # Remover versão do runtime -Está personalização oculta a versão do runtime da linguagem. Se você trabalha com containers ou ambientes virtualizados, este é para você! +Esta predefinição oculta a versão do runtime da linguagem. Se você trabalha com containers ou ambientes virtualizados, esta aqui é para você! -![Captura de tela de ajustes de ocultar versão de runtime](/presets/img/no-runtime-versions.png) +![Captura da tela de predefinição Ocultar Versões de Runtime](/presets/img/no-runtime-versions.png) ### Configuração diff --git a/docs/pt-BR/presets/tokyo-night.md b/docs/pt-BR/presets/tokyo-night.md new file mode 100644 index 00000000..f7c02c4a --- /dev/null +++ b/docs/pt-BR/presets/tokyo-night.md @@ -0,0 +1,21 @@ +[Retornar para Personalizações](./README.md#pastel-powerline) + +# Tokyo Night Preset + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) + +### Pré-requisitos + +- Uma fonte [Nerd Font](https://www.nerdfonts.com/) instalada e ativada em seu terminal + +### Configuração + +```sh +starship preset tokyo-night > ~/.config/starship.toml +``` + +[Clique para baixar o TOML](/presets/toml/tokyo-night.toml) + +<<< @/.vuepress/public/presets/toml/tokyo-night.toml diff --git a/docs/pt-PT/advanced-config/README.md b/docs/pt-PT/advanced-config/README.md index 3e45a887..9a8b0fff 100644 --- a/docs/pt-PT/advanced-config/README.md +++ b/docs/pt-PT/advanced-config/README.md @@ -205,7 +205,9 @@ Some shells support a right prompt which renders on the same line as the input. Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](/config/#fill). -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. + +Note: Nushell 0.71.0 or later is required ### Example @@ -280,5 +282,5 @@ If multiple colors are specified for foreground/background, the last one in the Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: - Many terminals disable support for `blink` by default -- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564). +- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). - `strikethrough` is not supported by the default macOS Terminal.app diff --git a/docs/pt-PT/config/README.md b/docs/pt-PT/config/README.md index e9f96890..63a5e67b 100644 --- a/docs/pt-PT/config/README.md +++ b/docs/pt-PT/config/README.md @@ -15,15 +15,17 @@ All configuration for starship is done in this [TOML](https://github.com/toml-la # Inserts a blank line between shell prompts add_newline = true -# Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +# 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 ``` +### Config File Location + You can change default configuration file location with `STARSHIP_CONFIG` environment variable: ```sh @@ -70,6 +72,62 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. +### Strings + +In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. + +The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. + +| Symbol | Type | Notes | +| ------ | ------------------------- | ------------------------------------------------------ | +| `'` | literal string | less escaping | +| `"` | string | more escaping | +| `'''` | multi-line literal string | less escaping | +| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | + +For example: + +```toml +# literal string +format = '☺\☻ ' + +# regular string +format = "☺\\☻ " + +# escaping Starship symbols +format = '\[\$\] ' +``` + +When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: + +```toml +# with literal string +format = ''' + +\$''' + +# with multiline basic string +format = """ + +\\$""" + +# with basic string +format = "\n\\$" +``` + +In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. + +```toml +format = """ +line1\ +line1\ +line1 +line2\ +line2\ +line2 +""" +``` + ### Format Strings Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. @@ -80,9 +138,9 @@ A variable contains a `$` symbol followed by the name of the variable. The name 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. +- `'$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 @@ -94,20 +152,20 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri 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. +- `'[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 +- `'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. @@ -117,43 +175,20 @@ A conditional format string wrapped in `(` and `)` will not render if all variab For example: -- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. -- `(some text)` will always show nothing since there are no variables wrapped in the braces. -- 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\] )`. - -#### Special characters - -The following symbols have special usage in a format string and must be escaped: `$ \ [ ] ( )`. - -Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). - -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 = ''' - -\$''' -``` +- `'(@$region)'` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. +- `'(some text)'` will always show nothing since there are no variables wrapped in the braces. +- When `$combined` is a shortcut for `\[$a$b\]`, `'($combined)'` will show nothing only if `$a` and `$b` are both `None`. This works the same as `'(\[$a$b\] )'`. ### Negative matching -Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched. +Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading '!' character. The presence of _any_ negative indicator in the directory will result in the module not being matched. Extensions are matched against both the characters after the last dot in a filename, and the characters after the first dot in a filename. For example, `foo.bar.tar.gz` will be matched against `bar.tar.gz` and `gz` in the `detect_extensions` variable. Files whose name begins with a dot are not considered to have extensions at all. To see how this works in practice, you could match TypeScript but not MPEG Transport Stream files thus: ```toml -detect_extensions = ["ts", "!video.ts", "!audio.ts"] +detect_extensions = ['ts', '!video.ts', '!audio.ts'] ``` ## Prompt @@ -165,11 +200,11 @@ This is the list of prompt-wide configuration options. | Option | Default | Description | | ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `format` | [link](#default-prompt-format) | Configure the format of the prompt. | -| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | +| `right_format` | `''` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | | `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Inserts blank line between shell prompts. | -| `palette` | `""` | Sets which color palette from `palettes` to use. | +| `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | ### Example @@ -178,10 +213,10 @@ This is the list of prompt-wide configuration options. # ~/.config/starship.toml # Use custom format -format = """ +format = ''' [┌───────────────────>](bold green) [│](bold green)$directory$rust$package -[└─>](bold green) """ +[└─>](bold green) ''' # Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 @@ -189,15 +224,15 @@ scan_timeout = 10 # Disable the blank line at the start of the prompt add_newline = false -# Set "foo" as custom color palette -palette = "foo" +# Set 'foo' as custom color palette +palette = 'foo' # Define custom colors [palettes.foo] # Overwrite existing color -blue = "21" +blue = '21' # Define new color -mustard = "#af8700" +mustard = '#af8700' ``` ### Default Prompt Format @@ -205,7 +240,7 @@ mustard = "#af8700" 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" +format = '$all' # Which is equivalent to format = """ @@ -236,7 +271,9 @@ $elixir\ $elm\ $erlang\ $golang\ +$guix_shell\ $haskell\ +$haxe\ $helm\ $java\ $julia\ @@ -245,6 +282,7 @@ $lua\ $nim\ $nodejs\ $ocaml\ +$opa\ $perl\ $php\ $pulumi\ @@ -281,6 +319,7 @@ $jobs\ $battery\ $time\ $status\ +$os\ $container\ $shell\ $character""" @@ -290,7 +329,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format = "$all$directory$character" +format = '$all$directory$character' ``` ## AWS @@ -305,15 +344,17 @@ When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. +When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. + ### Options | Option | Default | Description | | ------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | -| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | -| `profile_aliases` | | Table of profile aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | The style 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. | +| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | +| `style` | `'bold yellow'` | The style for the module. | | `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Disables the `AWS` module. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -339,11 +380,11 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL [aws] format = 'on [$symbol($profile )(\($region\) )]($style)' -style = "bold blue" -symbol = "🅰 " +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' [aws.profile_aliases] CompanyGroupFrobozzOnCallAccess = 'Frobozz' ``` @@ -354,12 +395,12 @@ CompanyGroupFrobozzOnCallAccess = 'Frobozz' # ~/.config/starship.toml [aws] -format = "on [$symbol$region]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$region]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' ``` #### Display profile @@ -368,34 +409,48 @@ us-east-1 = "va" # ~/.config/starship.toml [aws] -format = "on [$symbol$profile]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$profile]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.profile_aliases] Enterprise_Naming_Scheme-voidstars = 'void**' ``` ## Azure -The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription, as defined in the `~/.azure/azureProfile.json` file. +The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription or the username, as defined in the `~/.azure/azureProfile.json` file. ### Options | Variable | Default | Description | | ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `"on [$symbol($subscription)]($style) "` | The format for the Azure module to render. | -| `symbol` | `"ﴃ "` | The symbol used in the format. | -| `style` | `"blue bold"` | The style used in the format. | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'ﴃ '` | The symbol used in the format. | +| `style` | `'blue bold'` | The style used in the format. | | `disabled` | `true` | Disables the `azure` module. | -### Example +### Examples + +#### Display Subscription Name ```toml # ~/.config/starship.toml [azure] disabled = false -format = "on [$symbol($subscription)]($style) " +format = 'on [$symbol($subscription)]($style) ' +symbol = 'ﴃ ' +style = 'blue bold' +``` + +#### Display Username + +```toml +# ~/.config/starship.toml + +[azure] +disabled = false +format = "on [$symbol($username)]($style) " symbol = "ﴃ " style = "blue bold" ``` @@ -408,12 +463,12 @@ The `battery` module shows how charged the device's battery is and its current c | 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. | +| `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. | @@ -423,9 +478,9 @@ The `battery` module shows how charged the device's battery is and its current c # ~/.config/starship.toml [battery] -full_symbol = "🔋 " -charging_symbol = "⚡️ " -discharging_symbol = "💀 " +full_symbol = '🔋 ' +charging_symbol = '⚡️ ' +discharging_symbol = '💀 ' ``` ### Battery Display @@ -435,7 +490,7 @@ The `display` configuration option is used to define when the battery indicator ```toml [[battery.display]] threshold = 10 -style = "bold red" +style = 'bold red' ``` The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. @@ -447,21 +502,21 @@ The `display` option is an array of the following table. | Option | Default | Description | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | | `threshold` | `10` | The upper bound for the display option. | -| `style` | `"red bold"` | The style used if the display option is in use. | +| `style` | `'red bold'` | The style used if the display option is in use. | | `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. | | `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. | #### Example ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% threshold = 10 -style = "bold red" +style = 'bold red' -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% threshold = 30 -style = "bold yellow" -discharging_symbol = "💦" +style = 'bold yellow' +discharging_symbol = '💦' # when capacity is over 30%, the battery indicator will not be displayed ``` @@ -477,13 +532,13 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil | Option | Default | Description | | ------------------- | ----------------------------------------------- | ----------------------------------------------------- | -| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. | -| `version_format` | `"v${raw}"` | The version format. | -| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. | +| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. | +| `version_format` | `'v${raw}'` | The version format. | +| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | -| `style` | `"bold blue"` | The style for the module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `elixir` module. | ### Variables @@ -502,7 +557,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil # ~/.config/starship.toml [buf] -symbol = "🦬 " +symbol = '🦬 ' ``` ## Bun @@ -516,13 +571,13 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🍞 "` | A format string representing the symbol of Node.js. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["bun.lockb", "bunfig.toml"]` | Which filenames should trigger this module. | +| `detect_files` | `['bun.lockb', 'bunfig.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | The style for the module. | +| `style` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `bun` module. | ### Variables @@ -541,7 +596,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. # ~/.config/starship.toml [bun] -format = "via [🍔 $version](bold green) " +format = 'via [🍔 $version](bold green) ' ``` ## C @@ -552,14 +607,14 @@ The `c` module shows some information about your C compiler. By default the modu | Option | Default | Description | | ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version(-$name) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"C "` | The symbol used before displaying the compiler details | -| `detect_extensions` | `["c", "h"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ "cc", "--version" ], [ "gcc", "--version" ], [ "clang", "--version" ] ] | How to detect what the compiler is | -| `style` | `"bold 149"` | The style for the module. | +| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | +| `style` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `c` module. | ### Variables @@ -577,7 +632,7 @@ NB that `version` is not in the default format. The `commands` option accepts a list of commands to determine the compiler version and name. -Each command is represented as a list of the executable name, followed by its arguments, usually something like `["mycc", "--version"]`. Starship will try executing each command until it gets a result on STDOUT. +Each command is represented as a list of the executable name, followed by its arguments, usually something like `['mycc', '--version']`. Starship will try executing each command until it gets a result on STDOUT. If a C compiler is not supported by this module, you can request it by [raising an issue on GitHub](https://github.com/starship/starship/). @@ -587,7 +642,7 @@ If a C compiler is not supported by this module, you can request it by [raising # ~/.config/starship.toml [c] -format = "via [$name $version]($style)" +format = 'via [$name $version]($style)' ``` ## Character @@ -611,13 +666,13 @@ By default it only changes color. If you also want to change its shape take a lo | 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. | -| `vimcmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | -| `vimcmd_replace_one_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim `replace_one` mode. | -| `vimcmd_replace_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim replace mode. | -| `vimcmd_visual_symbol` | `"[❮](bold yellow)"` | The format string used before the text input if the shell is in vim replace mode. | +| `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. | +| `vimcmd_symbol` | `'[❮](bold green)'` | The format string used before the text input if the shell is in vim normal mode. | +| `vimcmd_replace_one_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim `replace_one` mode. | +| `vimcmd_replace_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim replace mode. | +| `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | | `disabled` | `false` | Disables the `character` module. | ### Variables @@ -634,8 +689,8 @@ By default it only changes color. If you also want to change its shape take a lo # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[✗](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[✗](bold red) ' ``` #### Without custom error shape @@ -644,8 +699,8 @@ error_symbol = "[✗](bold red) " # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[➜](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[➜](bold red) ' ``` #### With custom vim shape @@ -654,7 +709,7 @@ error_symbol = "[➜](bold red) " # ~/.config/starship.toml [character] -vicmd_symbol = "[V](bold green) " +vicmd_symbol = '[V](bold green) ' ``` ## CMake @@ -668,13 +723,13 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | Option | Default | Description | | ------------------- | -------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"△ "` | The symbol used before the version of cmake. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'△ '` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this module | -| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | +| `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | -| `style` | `"bold blue"` | The style for the module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -698,11 +753,11 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold blue"` | The style for the module. | -| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Which extensions should trigger this module. | +| `symbol` | `'⚙️ '` | The symbol used before displaying the version of COBOL. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold blue'` | The style for the module. | +| `detect_extensions` | `['cbl', 'cob', 'CBL', 'COB']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `cobol` module. | @@ -735,8 +790,8 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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. | +| `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). | @@ -758,7 +813,7 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec [cmd_duration] min_time = 500 -format = "underwent [$duration](bold yellow)" +format = 'underwent [$duration](bold yellow)' ``` ## Conda @@ -776,9 +831,9 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | 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. | +| `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. | @@ -798,7 +853,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c # ~/.config/starship.toml [conda] -format = "[$symbol$environment](dimmed green) " +format = '[$symbol$environment](dimmed green) ' ``` ## Container @@ -809,8 +864,8 @@ The `container` module displays a symbol and container name, if inside a contain | Option | Default | Description | | ---------- | ---------------------------------- | ----------------------------------------- | -| `symbol` | `"⬢"` | The symbol shown, when inside a container | -| `style` | `"bold red dimmed"` | The style for the module. | +| `symbol` | `'⬢'` | The symbol shown, when inside a container | +| `style` | `'bold red dimmed'` | The style for the module. | | `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `container` module. | @@ -844,12 +899,12 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold red"` | The style for the module. | -| `detect_extensions` | `["cr"]` | Which extensions should trigger this module. | -| `detect_files` | `["shard.yml"]` | Which filenames should trigger this module. | +| `symbol` | `'🔮 '` | The symbol used before displaying the version of crystal. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold red'` | The style for the module. | +| `detect_extensions` | `['cr']` | Which extensions should trigger this module. | +| `detect_files` | `['shard.yml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `crystal` module. | @@ -869,7 +924,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// # ~/.config/starship.toml [crystal] -format = "via [✨ $version](bold blue) " +format = 'via [✨ $version](bold blue) ' ``` ## Daml @@ -882,12 +937,12 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"Λ "` | A format string representing the symbol of Daml | -| `style` | `"bold cyan"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'Λ '` | A format string representing the symbol of Daml | +| `style` | `'bold cyan'` | The style for the module. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['daml.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `daml` module. | @@ -907,7 +962,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d # ~/.config/starship.toml [daml] -format = "via [D $version](bold bright-green) " +format = 'via [D $version](bold bright-green) ' ``` ## Dart @@ -922,13 +977,13 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | Option | Default | Description | | ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `detect_extensions` | `["dart"]` | Which extensions should trigger this module. | -| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".dart_tool"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🎯 '` | A format string representing the symbol of Dart | +| `detect_extensions` | `['dart']` | Which extensions should trigger this module. | +| `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | Which filenames should trigger this module. | +| `detect_folders` | `['.dart_tool']` | Which folders should trigger this module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -947,7 +1002,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d # ~/.config/starship.toml [dart] -format = "via [🔰 $version](bold red) " +format = 'via [🔰 $version](bold red) ' ``` ## Deno @@ -960,13 +1015,13 @@ The `deno` module shows you your currently installed version of [Deno](https://d | Option | Default | Description | | ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦕 "` | A format string representing the symbol of Deno | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦕 '` | A format string representing the symbol of Deno | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["deno.json", "deno.jsonc", "mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. | +| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"green bold"` | The style for the module. | +| `style` | `'green bold'` | The style for the module. | | `disabled` | `false` | Disables the `deno` module. | ### Variables @@ -983,7 +1038,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d # ~/.config/starship.toml [deno] -format = "via [🦕 $version](green bold) " +format = 'via [🦕 $version](green bold) ' ``` ## Directory @@ -996,20 +1051,21 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### 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: "…/" | -| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | -| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) | +| 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: '…/' | +| `before_repo_root_style` | | The style for the path segment above the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `'[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) '` | The format of a git repo when `before_repo_root_style` and `repo_root_style` is defined. | +| `home_symbol` | `'~'` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |

This module has a few advanced configuration options that control how the directory is displayed. @@ -1024,8 +1080,8 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ```toml [directory.substitutions] -"/Volumes/network/path" = "/net" -"src/com/long/java/path" = "mypath" +'/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`. @@ -1036,8 +1092,8 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | Variable | Example | Description | | --------- | --------------------- | ----------------------------------- | -| path | `"D:/Projects"` | The current directory path | -| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | +| 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 @@ -1048,11 +1104,11 @@ Let us consider the path `/path/to/home/git_repo/src/lib` | Variable | Example | Description | | ------------------ | --------------------- | --------------------------------------- | -| before_root_path | `"/path/to/home/"` | The path before git root directory path | -| repo_root | `"git_repo"` | The git root directory name | -| path | `"/src/lib"` | The remaining path | -| style | `"black bold dimmed"` | Mirrors the value of option `style` | -| repo_root_style | `"underline white"` | Style for git root directory name | +| before_root_path | `'/path/to/home/'` | The path before git root directory path | +| repo_root | `'git_repo'` | The git root directory name | +| path | `'/src/lib'` | The remaining path | +| style | `'black bold dimmed'` | Mirrors the value of option `style` | +| repo_root_style | `'underline white'` | Style for git root directory name |
@@ -1063,7 +1119,7 @@ Let us consider the path `/path/to/home/git_repo/src/lib` [directory] truncation_length = 8 -truncation_symbol = "…/" +truncation_symbol = '…/' ``` ## Docker Context @@ -1074,13 +1130,13 @@ The `docker_context` module shows the currently active [Docker context](https:// | Option | Default | Description | | ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `format` | `'via [$symbol$context]($style) '` | The format for the module. | +| `symbol` | `'🐳 '` | The symbol used before displaying the Docker context. | | `only_with_files` | `true` | Only show when there's a match | | `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | +| `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | Which filenames should trigger this module (needs `only_with_files` to be true). | | `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | -| `style` | `"blue bold"` | The style for the module. | +| `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -1099,7 +1155,7 @@ The `docker_context` module shows the currently active [Docker context](https:// # ~/.config/starship.toml [docker_context] -format = "via [🐋 $context](blue bold)" +format = 'via [🐋 $context](blue bold)' ``` ## Dotnet @@ -1127,14 +1183,14 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$var_cluster" +'dev.local.cluster.k8s' = 'dev' +'.*/openshift-cluster/.*' = 'openshift' +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' [kubernetes.user_aliases] -"dev.local.cluster.k8s" = "dev" -"root/.*" = "root" +'dev.local.cluster.k8s' = 'dev' +'root/.*' = 'root' ``` Only show the module in directories that contain a `k8s` file. @@ -2121,14 +2249,14 @@ Long and automatically generated cluster names can be identified and shortened u ```toml [kubernetes.context_aliases] # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -".*/openshift-cluster/.*" = "openshift" +'.*/openshift-cluster/.*' = 'openshift' # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$var_cluster" +'.*/(?P[\\w-]+)/.*' = '$var_cluster' # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' ``` ## Line Break @@ -2159,8 +2287,8 @@ The `localip` module shows the IPv4 address of the primary network interface. | Option | Default | Description | | ---------- | ------------------------- | ------------------------------------------------------ | | `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | The style for the module. | +| `format` | `'[$localipv4]($style) '` | The format for the module. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `true` | Disables the `localip` module. | ### Variables @@ -2179,7 +2307,7 @@ The `localip` module shows the IPv4 address of the primary network interface. [localip] ssh_only = false -format = "@[$localipv4](bold red) " +format = '@[$localipv4](bold red) ' disabled = false ``` @@ -2195,14 +2323,14 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | Option | Default | Description | | ------------------- | ------------------------------------ | -------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | -| `detect_extensions` | `["lua"]` | Which extensions should trigger this module. | -| `detect_files` | `[".lua-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["lua"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | -| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🌙 '` | A format string representing the symbol of Lua. | +| `detect_extensions` | `['lua']` | Which extensions should trigger this module. | +| `detect_files` | `['.lua-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['lua']` | Which folders should trigger this module. | +| `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 @@ -2221,7 +2349,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o # ~/.config/starship.toml [lua] -format = "via [🌕 $version](bold blue) " +format = 'via [🌕 $version](bold blue) ' ``` ## Memory Usage @@ -2241,9 +2369,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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. | +| `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 @@ -2267,8 +2395,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y [memory_usage] disabled = false threshold = -1 -symbol = " " -style = "bold dimmed green" +symbol = ' ' +style = 'bold dimmed green' ``` ## Meson @@ -2282,10 +2410,10 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. | Option | Default | Description | | ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- | | `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | -| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. | -| `format` | `"via [$symbol$project]($style) "` | The format for the module. | -| `symbol` | `"⬢ "` | The symbol used before displaying the project name. | -| `style` | `"blue bold"` | The style for the module. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | +| `format` | `'via [$symbol$project]($style) '` | The format for the module. | +| `symbol` | `'⬢ '` | The symbol used before displaying the project name. | +| `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `meson` module. | ### Variables @@ -2305,9 +2433,9 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. [meson] disabled = false -truncation_symbol = "--" -symbol = " " -style = "bold dimmed green" +truncation_symbol = '--' +symbol = ' ' +style = 'bold dimmed green' ``` ## Mercurial Branch @@ -2318,11 +2446,11 @@ The `hg_branch` module shows the active branch of the repo in your current direc | 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. | +| `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 `N` graphemes | -| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a branch name was truncated. | | `disabled` | `true` | Disables the `hg_branch` module. | ### Variables @@ -2341,9 +2469,9 @@ The `hg_branch` module shows the active branch of the repo in your current direc # ~/.config/starship.toml [hg_branch] -format = "on [🌱 $branch](bold purple)" +format = 'on [🌱 $branch](bold purple)' truncation_length = 4 -truncation_symbol = "" +truncation_symbol = '' ``` ## Nim @@ -2359,13 +2487,13 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | -| `detect_extensions` | `["nim", "nims", "nimble"]` | Which extensions should trigger this module. | -| `detect_files` | `["nim.cfg"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'👑 '` | The symbol used before displaying the version of Nim. | +| `detect_extensions` | `['nim', 'nims', 'nimble']` | Which extensions should trigger this module. | +| `detect_files` | `['nim.cfg']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | The style for the module. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `nim` module. | ### Variables @@ -2384,8 +2512,8 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang # ~/.config/starship.toml [nim] -style = "yellow" -symbol = "🎣 " +style = 'yellow' +symbol = '🎣 ' ``` ## Nix-shell @@ -2397,10 +2525,10 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | 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. | +| `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 @@ -2421,8 +2549,8 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ [nix_shell] disabled = true -impure_msg = "[impure shell](bold red)" -pure_msg = "[pure shell](bold green)" +impure_msg = '[impure shell](bold red)' +pure_msg = '[pure shell](bold green)' format = 'via [☃️ $state( \($name\))](bold blue) ' ``` @@ -2441,13 +2569,13 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | Option | Default | Description | | ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string representing the symbol of Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts", "mts", "cts"]` | Which extensions should trigger this module. | -| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | -| `style` | `"bold green"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string representing the symbol of Node.js. | +| `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Which extensions should trigger this module. | +| `detect_files` | `['package.json', '.node-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['node_modules']` | Which folders should trigger this module. | +| `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 package.json does not match the Node.js version. | @@ -2467,7 +2595,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n # ~/.config/starship.toml [nodejs] -format = "via [🤖 $version](bold green) " +format = 'via [🤖 $version](bold green) ' ``` ## OCaml @@ -2485,15 +2613,15 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | Option | Default | Description | | ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | -| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | -| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | -| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Which extensions should trigger this module. | -| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Which filenames should trigger this module. | -| `detect_folders` | `["_opam", "esy.lock"]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | The style for the module. | +| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐫 '` | The symbol used before displaying the version of OCaml. | +| `global_switch_indicator` | `''` | The format string used to represent global OPAM switch. | +| `local_switch_indicator` | `'*'` | The format string used to represent local OPAM switch. | +| `detect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | Which extensions should trigger this module. | +| `detect_files` | `['dune', 'dune-project', 'jbuild', 'jbuild-ignore', '.merlin']` | Which filenames should trigger this module. | +| `detect_folders` | `['_opam', 'esy.lock']` | Which folders should trigger this module. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `ocaml` module. | ### Variables @@ -2514,7 +2642,43 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam # ~/.config/starship.toml [ocaml] -format = "via [🐪 $version]($style) " +format = 'via [🐪 $version]($style) ' +``` + +## Open Policy Agent + +The `opa` module shows the currently installed version of the OPA tool. By default the module will be shown if the current directory contains a `.rego` file. + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | +| `detect_extensions` | `['rego']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'bold blue'` | The style for the module. | +| `disabled` | `false` | Disables the `opa` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.44.0` | The version of `opa` | +| symbol | | Mirrors the 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 + +[opa] +format = 'via [⛑️ $version](bold red) ' ``` ## OpenStack @@ -2526,8 +2690,8 @@ The `openstack` module shows the current OpenStack cloud and project. The module | Option | Default | Description | | ---------- | ----------------------------------------------- | -------------------------------------------------------------- | | `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | -| `style` | `"bold yellow"` | The style for the module. | +| `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 @@ -2548,8 +2712,105 @@ The `openstack` module shows the current OpenStack cloud and project. The module [openstack] format = 'on [$symbol$cloud(\($project\))]($style) ' -style = "bold yellow" -symbol = "☁️ " +style = 'bold yellow' +symbol = '☁️ ' +``` + +## OS + +The `os` module shows the current operating system. OS information is detected via the [os_info](https://lib.rs/crates/os_info) crate. + +::: warning + +The [os_info](https://lib.rs/crates/os_info) crate used by this module is known to be inaccurate on some systems. + +::: + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ---------- | --------------------- | ------------------------------------------------------ | +| `format` | `"[$symbol]($style)"` | The format for the module. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `true` | Disables the `os` module. | +| `symbols` | | A table that maps each operating system to its symbol. | + +`symbols` allows you to define arbitrary symbols to display for each operating system type. Operating system types not defined by your configuration use the default symbols table below. All operating systems currently supported by the module are listed below. If you would like an operating system to be added, feel free to open a [feature request](https://github.com/starship/starship/issues/new/choose). + +```toml +# This is the default symbols table. +[os.symbols] +Alpine = "🏔️ " +Amazon = "🙂 " +Android = "🤖 " +Arch = "🎗️ " +CentOS = "💠 " +Debian = "🌀 " +DragonFly = "🐉 " +Emscripten = "🔗 " +EndeavourOS = "🚀 " +Fedora = "🎩 " +FreeBSD = "😈 " +Garuda = "🦅 " +Gentoo = "🗜️ " +HardenedBSD = "🛡️ " +Illumos = "🐦 " +Linux = "🐧 " +Macos = "🍎 " +Manjaro = "🥭 " +Mariner = "🌊 " +MidnightBSD = "🌘 " +Mint = "🌿 " +NetBSD = "🚩 " +NixOS = "❄️ " +OpenBSD = "🐡 " +openSUSE = "🦎 " +OracleLinux = "🦴 " +Pop = "🍭 " +Raspbian = "🍓 " +Redhat = "🎩 " +RedHatEnterprise = "🎩 " +Redox = "🧪 " +Solus = "⛵ " +SUSE = "🦎 " +Ubuntu = "🎯 " +Unknown = "❓ " +Windows = "🪟 " +``` + +### Variables + +| Variable | Example | Description | +| --------- | ------------ | ------------------------------------------------------------------ | +| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | +| name | `Arch Linux` | The current operating system name | +| type | `Arch` | The current operating system type | +| codename | | The current operating system codename, if applicable | +| edition | | The current operating system edition, if applicable | +| version | | The current operating system version, if applicable | +| 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 + +[os] +format = "on [($name )]($style)" +style = "bold blue" +disabled = false + +[os.symbols] +Windows = " " +Arch = "Arch is the best! " ``` ## Package Version @@ -2580,10 +2841,10 @@ The `package` module is shown when the current directory is the repository for a | Option | Default | Description | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"is [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold 208"` | The style for the module. | +| `format` | `'is [$symbol$version]($style) '` | The format for the module. | +| `symbol` | `'📦 '` | The symbol used before displaying the version the package. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `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. | @@ -2603,7 +2864,7 @@ The `package` module is shown when the current directory is the repository for a # ~/.config/starship.toml [package] -format = "via [🎁 $version](208 bold) " +format = 'via [🎁 $version](208 bold) ' ``` ## Perl @@ -2620,13 +2881,13 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe | Option | Default | Description | | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | -| `detect_extensions` | `["pl", "pm", "pod"]` | Which extensions should trigger this module. | -| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | +| `detect_extensions` | `['pl', 'pm', 'pod']` | Which extensions should trigger this module. | +| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | The style for the module. | +| `style` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `perl` module. | ### Variables @@ -2643,7 +2904,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe # ~/.config/starship.toml [perl] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## PHP @@ -2658,13 +2919,13 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | -| `detect_extensions` | `["php"]` | Which extensions should trigger this module. | -| `detect_files` | `["composer.json", ".php-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐘 '` | The symbol used before displaying the version of PHP. | +| `detect_extensions` | `['php']` | Which extensions should trigger this module. | +| `detect_files` | `['composer.json', '.php-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"147 bold"` | The style for the module. | +| `style` | `'147 bold'` | The style for the module. | | `disabled` | `false` | Disables the `php` module. | ### Variables @@ -2683,7 +2944,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. # ~/.config/starship.toml [php] -format = "via [🔹 $version](147 bold) " +format = 'via [🔹 $version](147 bold) ' ``` ## Pulumi @@ -2705,10 +2966,10 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string shown before the Pulumi stack. | -| `style` | `"bold 5"` | The style for the module. | +| `format` | `'via [$symbol($username@)$stack]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string shown before the Pulumi stack. | +| `style` | `'bold 5'` | The style for the module. | | `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | | `disabled` | `false` | Disables the `pulumi` module. | @@ -2732,7 +2993,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [pulumi] -format = "[🛥 ($version )$stack]($style) " +format = '[🛥 ($version )$stack]($style) ' ``` #### Without Pulumi version @@ -2740,8 +3001,8 @@ format = "[🛥 ($version )$stack]($style) " ```toml # ~/.config/starship.toml [pulumi] -symbol = "🛥 " -format = "[$symbol$stack]($style) " +symbol = '🛥 ' +format = '[$symbol$stack]($style) ' ``` ## PureScript @@ -2755,13 +3016,13 @@ The `purescript` module shows the currently installed version of [PureScript](ht | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | -| `detect_extensions` | `["purs"]` | Which extensions should trigger this module. | -| `detect_files` | `["spago.dhall"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'<=> '` | The symbol used before displaying the version of PureScript. | +| `detect_extensions` | `['purs']` | Which extensions should trigger this module. | +| `detect_files` | `['spago.dhall']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold white"` | The style for the module. | +| `style` | `'bold white'` | The style for the module. | | `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -2780,7 +3041,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht # ~/.config/starship.toml [purescript] -format = "via [$symbol$version](bold white)" +format = 'via [$symbol$version](bold white)' ``` ## Python @@ -2806,14 +3067,14 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | | `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | The style for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐍 '` | A format string representing the symbol of 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 | -| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `detect_extensions` | `["py"]` | Which extensions should trigger this module | -| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module | +| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | +| `detect_extensions` | `['py']` | Which extensions should trigger this module | +| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | | `disabled` | `false` | Disables the `python` module. | @@ -2821,7 +3082,7 @@ By default the module will be shown if any of the following conditions are met: 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. +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. ::: @@ -2829,11 +3090,11 @@ The default values and order for `python_binary` was chosen to first identify th | 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 | +| 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 @@ -2841,7 +3102,7 @@ The default values and order for `python_binary` was chosen to first identify th # ~/.config/starship.toml [python] -symbol = "👾 " +symbol = '👾 ' pyenv_version_name = true ``` @@ -2850,7 +3111,7 @@ pyenv_version_name = true [python] # Only use the `python3` binary to get the version. -python_binary = "python3" +python_binary = 'python3' ``` ```toml @@ -2869,7 +3130,7 @@ detect_extensions = [] # # Note this will only work when the venv is inside the project and it will only # work in the directory that contains the venv dir but maybe this is ok? -python_binary = ["./venv/bin/python", "python", "python3", "python2"] +python_binary = ['./venv/bin/python', 'python', 'python3', 'python2'] ``` ## R @@ -2888,13 +3149,13 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"📐"` | A format string representing the symbol of R. | -| `style` | `"blue bold"` | The style for the module. | -| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module | -| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module | -| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'📐'` | A format string representing the symbol of R. | +| `style` | `'blue bold'` | The style for the module. | +| `detect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | Which extensions should trigger this module | +| `detect_files` | `['.Rprofile']` | Which filenames should trigger this module | +| `detect_folders` | `['.Rproj.user']` | Which folders should trigger this module | | `disabled` | `false` | Disables the `r` module. | ### Variables @@ -2903,7 +3164,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | -------- | ------------- | ------------------------------------ | | version | `v4.0.5` | The version of `R` | | symbol | | Mirrors the value of option `symbol` | -| style | `"blue bold"` | Mirrors the value of option `style` | +| style | `'blue bold'` | Mirrors the value of option `style` | ### Example @@ -2911,7 +3172,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr # ~/.config/starship.toml [rlang] -format = "with [📐 $version](blue bold) " +format = 'with [📐 $version](blue bold) ' ``` ## Raku @@ -2925,13 +3186,13 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra | Option | Default | Description | | ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version-$vm_version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦋 "` | The symbol used before displaying the version of Raku | -| `detect_extensions` | `["p6", "pm6", "pod6", "raku", "rakumod"]` | Which extensions should trigger this module. | -| `detect_files` | `["META6.json"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version-$vm_version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦋 '` | The symbol used before displaying the version of Raku | +| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Which extensions should trigger this module. | +| `detect_files` | `['META6.json']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | The style for the module. | +| `style` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `raku` module. | ### Variables @@ -2949,7 +3210,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra # ~/.config/starship.toml [raku] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## Red @@ -2962,13 +3223,13 @@ By default the `red` module shows the currently installed version of [Red](https | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | -| `detect_extensions` | `["red"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🔺 '` | A format string representing the symbol of Red. | +| `detect_extensions` | `['red']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"red bold"` | The style for the module. | +| `style` | `'red bold'` | The style for the module. | | `disabled` | `false` | Disables the `red` module. | ### Variables @@ -2987,7 +3248,7 @@ By default the `red` module shows the currently installed version of [Red](https # ~/.config/starship.toml [red] -symbol = "🔴 " +symbol = '🔴 ' ``` ## Ruby @@ -3005,14 +3266,14 @@ Starship gets the current Ruby version by running `ruby -v`. | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. | -| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💎 '` | A format string representing the symbol of Ruby. | +| `detect_extensions` | `['rb']` | Which extensions should trigger this module. | +| `detect_files` | `['Gemfile', '.ruby-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | -| `style` | `"bold red"` | The style for the module. | +| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Which environment variables should trigger this module. | +| `style` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `ruby` module. | ### Variables @@ -3031,7 +3292,7 @@ Starship gets the current Ruby version by running `ruby -v`. # ~/.config/starship.toml [ruby] -symbol = "🔺 " +symbol = '🔺 ' ``` ## Rust @@ -3045,13 +3306,13 @@ By default the `rust` module shows the currently installed version of [Rust](htt | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. | -| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦀 '` | A format string representing the symbol of Rust | +| `detect_extensions` | `['rs']` | Which extensions should trigger this module. | +| `detect_files` | `['Cargo.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | The style for the module. | +| `style` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -3072,7 +3333,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt # ~/.config/starship.toml [rust] -format = "via [⚙️ $version](red bold)" +format = 'via [⚙️ $version](red bold)' ``` ## Scala @@ -3087,13 +3348,13 @@ The `scala` module shows the currently installed version of [Scala](https://www. | Option | Default | Description | | ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | -| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | -| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | -| `style` | `"red dimmed"` | The style for the module. | +| `format` | `'via [${symbol}(${version} )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. | +| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. | +| `detect_folders` | `['.metals']` | Which folders should trigger this modules. | +| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. | +| `style` | `'red dimmed'` | The style for the module. | | `disabled` | `false` | Disables the `scala` module. | ### Variables @@ -3112,7 +3373,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. # ~/.config/starship.toml [scala] -symbol = "🌟 " +symbol = '🌟 ' ``` ## Shell @@ -3129,19 +3390,19 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `"bsh"` | A format string used to represent bash. | -| `fish_indicator` | `"fsh"` | A format string used to represent fish. | -| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. | -| `powershell_indicator` | `"psh"` | A format string used to represent powershell. | -| `ion_indicator` | `"ion"` | A format string used to represent ion. | -| `elvish_indicator` | `"esh"` | A format string used to represent elvish. | -| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. | -| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. | -| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. | -| `nu_indicator` | `"nu"` | A format string used to represent nu. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `"[$indicator]($style) "` | The format for the module. | -| `style` | `"white bold"` | The style for the module. | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `style` | `'white bold'` | The style for the module. | | `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3159,26 +3420,26 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [shell] -fish_indicator = "" -powershell_indicator = "_" -unknown_indicator = "mystery shell" -style = "cyan bold" +fish_indicator = '' +powershell_indicator = '_' +unknown_indicator = 'mystery shell' +style = 'cyan bold' disabled = false ``` ## SHLVL -The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ('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`. | +| `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. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `true` | Disables the `shlvl` module. | ### Variables @@ -3198,7 +3459,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int [shlvl] disabled = false -format = "$shlvl level(s) down" +format = '$shlvl level(s) down' threshold = 3 ``` @@ -3211,8 +3472,8 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | 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. | +| `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 @@ -3243,9 +3504,9 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | Option | Default | Description | | ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | The number of directories the environment path should be truncated to. `0` means no truncation. Also see the [`directory`](#directory) module. | -| `symbol` | `"🅢 "` | The symbol used before the environment name. | -| `style` | `"bold blue"` | The style for the module. | -| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `symbol` | `'🅢 '` | The symbol used before the environment name. | +| `style` | `'bold blue'` | The style for the module. | +| `format` | `'via [$symbol$environment]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `spack` module. | ### Variables @@ -3264,7 +3525,7 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat # ~/.config/starship.toml [spack] -format = "[$symbol$environment](dimmed blue) " +format = '[$symbol$environment](dimmed blue) ' ``` ## Status @@ -3281,14 +3542,14 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `format` | `"[$symbol$status]($style) "` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `success_symbol` | `""` | The symbol displayed on program success | -| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | -| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | -| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | -| `style` | `"bold red"` | The style for the module. | +| `format` | `'[$symbol$status]($style) '` | The format of the module | +| `symbol` | `'❌'` | The symbol displayed on program error | +| `success_symbol` | `''` | The symbol displayed on program success | +| `not_executable_symbol` | `'🚫'` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `'🔍'` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `'🧱'` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `'⚡'` | The symbol displayed on any signal | +| `style` | `'bold red'` | The style for the module. | | `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code | | `pipestatus` | `false` | Enable pipestatus reporting | @@ -3320,9 +3581,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [status] -style = "bg:blue" -symbol = "🔴 " -success_symbol = "🟢 SUCCESS" +style = 'bg:blue' +symbol = '🔴 ' +success_symbol = '🟢 SUCCESS' format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false @@ -3342,9 +3603,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | --------------- | ------------------------ | ------------------------------------------------------- | -| `format` | `"[as $symbol]($style)"` | The format of the module | -| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached | -| `style` | `"bold blue"` | The style for the module. | +| `format` | `'[as $symbol]($style)'` | The format of the module | +| `symbol` | `'🧙 '` | The symbol displayed when credentials are cached | +| `style` | `'bold blue'` | The style for the module. | | `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | | `disabled` | `true` | Disables the `sudo` module. | @@ -3363,8 +3624,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [sudo] -style = "bold green" -symbol = "👩‍💻 " +style = 'bold green' +symbol = '👩‍💻 ' disabled = false ``` @@ -3388,13 +3649,13 @@ By default the `swift` module shows the currently installed version of [Swift](h | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `detect_extensions` | `["swift"]` | Which extensions should trigger this module. | -| `detect_files` | `["Package.swift"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐦 '` | A format string representing the symbol of Swift | +| `detect_extensions` | `['swift']` | Which extensions should trigger this module. | +| `detect_files` | `['Package.swift']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 202"` | The style for the module. | +| `style` | `'bold 202'` | The style for the module. | | `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -3413,7 +3674,7 @@ By default the `swift` module shows the currently installed version of [Swift](h # ~/.config/starship.toml [swift] -format = "via [🏎 $version](red bold)" +format = 'via [🏎 $version](red bold)' ``` ## Terraform @@ -3435,13 +3696,13 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol$workspace]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💠'` | A format string shown before the terraform workspace. | +| `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | -| `style` | `"bold 105"` | The style for the module. | +| `detect_folders` | `['.terraform']` | Which folders should trigger this module. | +| `style` | `'bold 105'` | The style for the module. | | `disabled` | `false` | Disables the `terraform` module. | ### Variables @@ -3463,7 +3724,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [terraform] -format = "[🏎💨 $version$workspace]($style) " +format = '[🏎💨 $version$workspace]($style) ' ``` #### Without Terraform version @@ -3472,7 +3733,7 @@ format = "[🏎💨 $version$workspace]($style) " # ~/.config/starship.toml [terraform] -format = "[🏎💨 $workspace]($style) " +format = '[🏎💨 $workspace]($style) ' ``` ## Time @@ -3489,15 +3750,15 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | The format string for the module. | +| `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. | +| `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 | +| `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. +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 @@ -3516,9 +3777,9 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de [time] disabled = false format = '🕙[\[ $time \]]($style) ' -time_format = "%T" -utc_time_offset = "-5" -time_range = "10:00:00-14:00:00" +time_format = '%T' +utc_time_offset = '-5' +time_range = '10:00:00-14:00:00' ``` ## Username @@ -3540,9 +3801,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Option | Default | Description | | ------------- | ----------------------- | ------------------------------------------- | -| `style_root` | `"bold red"` | The style used when the user is root/admin. | -| `style_user` | `"bold yellow"` | The style used for non-root users. | -| `format` | `"[$user]($style) in "` | The format for the module. | +| `style_root` | `'bold red'` | The style used when the user is root/admin. | +| `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. | @@ -3550,8 +3811,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | 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. | +| `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 @@ -3559,9 +3820,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` # ~/.config/starship.toml [username] -style_user = "white bold" -style_root = "black bold" -format = "user: [$user]($style) " +style_user = 'white bold' +style_root = 'black bold' +format = 'user: [$user]($style) ' disabled = false show_always = true ``` @@ -3576,13 +3837,13 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'⍱ '` | A format string representing the symbol of Vagrant. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["Vagrantfile"]` | Which filenames should trigger this module. | +| `detect_files` | `['Vagrantfile']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"cyan bold"` | The style for the module. | +| `style` | `'cyan bold'` | The style for the module. | | `disabled` | `false` | Disables the `vagrant` module. | ### Variables @@ -3601,7 +3862,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// # ~/.config/starship.toml [vagrant] -format = "via [⍱ $version](bold white) " +format = 'via [⍱ $version](bold white) ' ``` ## V @@ -3615,13 +3876,13 @@ The `vlang` module shows you your currently installed version of [V](https://vla | Option | Default | Description | | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"V "` | A format string representing the symbol of V | -| `detect_extensions` | `["v"]` | Which extensions should trigger this module. | -| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'V '` | A format string representing the symbol of V | +| `detect_extensions` | `['v']` | Which extensions should trigger this module. | +| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"blue bold"` | The style for the module. | +| `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `vlang` module. | ### Variables @@ -3637,7 +3898,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla ```toml # ~/.config/starship.toml [vlang] -format = "via [V $version](blue bold) " +format = 'via [V $version](blue bold) ' ``` ## VCSH @@ -3648,9 +3909,9 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | Option | Default | Description | | ---------- | -------------------------------- | ------------------------------------------------------ | -| `symbol` | | The symbol used before displaying the repository name. | -| `style` | `"bold yellow"` | The style for the module. | -| `format` | `"vcsh [$symbol$repo]($style) "` | The format for the module. | +| `symbol` | `''` | The symbol used before displaying the repository name. | +| `style` | `'bold yellow'` | The style for the module. | +| `format` | `'vcsh [$symbol$repo]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `vcsh` module. | ### Variables @@ -3669,7 +3930,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v # ~/.config/starship.toml [vcsh] -format = "[🆅 $repo](bold blue) " +format = '[🆅 $repo](bold blue) ' ``` ## Zig @@ -3682,12 +3943,12 @@ By default the the `zig` module shows the currently installed version of [Zig](h | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"↯ "` | 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. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'↯ '` | The symbol used before displaying the version of Zig. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `zig` module. | -| `detect_extensions` | `["zig"]` | Which extensions should trigger this module. | +| `detect_extensions` | `['zig']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -3707,7 +3968,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h # ~/.config/starship.toml [zig] -symbol = "⚡️ " +symbol = '⚡️ ' ``` ## Custom commands @@ -3752,16 +4013,16 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | Option | Default | Description | | ------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `command` | `''` | The command whose output should be printed. The command will be passed on stdin to the shell. | | `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `description` | `""` | The description of the module that is shown when running `starship explain`. | +| `description` | `''` | The description of the module that is shown when running `starship explain`. | | `detect_files` | `[]` | The files that will be searched in the working directory for a match. | | `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. | | `detect_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. | +| `symbol` | `''` | The symbol used before displaying the command output. | +| `style` | `'bold green'` | The style for the module. | +| `format` | `'[$symbol($output )]($style)'` | The format for the module. | | `disabled` | `false` | Disables this `custom` module. | | `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | | `use_stdin` | | An optional boolean value that overrides whether commands should be forwarded to the shell via the standard input or as an argument. If unset standard input is used by default, unless the shell does not support it (cmd, nushell). Setting this disables shell-specific argument handling. | @@ -3784,14 +4045,14 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt - 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. +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 -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. ```toml -shell = ["pwsh", "-Command", "-"] +shell = ['pwsh', '-Command', '-'] ``` ::: warning Make sure your custom shell configuration exits gracefully @@ -3812,19 +4073,19 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -detect_files = ["foo"] # can specify filters but wildcards are not supported -when = """ test "$HOME" = "$PWD" """ -format = " transcending [$output]($style)" +command = 'echo foo' # shows output of command +detect_files = ['foo'] # can specify filters but wildcards are not supported +when = ''' test "$HOME" = "$PWD" ''' +format = ' transcending [$output]($style)' [custom.time] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command', '-'] [custom.time-as-arg] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command'] use_stdin = false ``` diff --git a/docs/pt-PT/guide/README.md b/docs/pt-PT/guide/README.md index b19f4da2..055ba601 100644 --- a/docs/pt-PT/guide/README.md +++ b/docs/pt-PT/guide/README.md @@ -219,7 +219,6 @@ Alternatively, install Starship using any of the following package managers: | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | | Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | -| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | @@ -417,6 +416,14 @@ Please check out these previous works that helped inspire the creation of starsh - **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons. +## ❤️ Sponsors + +Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website. + +**Supporter Tier** + +- [Dimension](https://dimension.dev/) +


Starship rocket icon diff --git a/docs/pt-PT/presets/README.md b/docs/pt-PT/presets/README.md index 26c2314b..cb3dcf1b 100644 --- a/docs/pt-PT/presets/README.md +++ b/docs/pt-PT/presets/README.md @@ -10,6 +10,14 @@ This preset changes the symbols for each module to use Nerd Font symbols. [![Screenshot of Nerd Font Symbols preset](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font) +## [No Nerd Fonts](./no-nerd-font.md) + +This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt. + +::: tip This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). ::: + +[Click to view No Nerd Font preset](./no-nerd-font) + ## [Bracketed Segments](./bracketed-segments.md) This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.). @@ -28,6 +36,12 @@ This preset hides the version of language runtimes. If you work in containers or [![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes) +## [No Empty Icons](./no-empty-icons.md) + +This preset does not show icons if the toolset is not found. + +[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Click to view No Runtime Versions preset")](./no-empty-icons.md) + ## [Pure Prompt](./pure-preset.md) This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). @@ -39,3 +53,9 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship. [![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png "Click to view Pure Prompt preset")](./pastel-powerline) + +## [Tokyo Night](./tokyo-night.md) + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) diff --git a/docs/pt-PT/presets/no-empty-icons.md b/docs/pt-PT/presets/no-empty-icons.md new file mode 100644 index 00000000..7be6867d --- /dev/null +++ b/docs/pt-PT/presets/no-empty-icons.md @@ -0,0 +1,17 @@ +[Return to Presets](./README.md#no-empty-icons) + +# No Empty Icons Preset + +If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. + +![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) + +### Configuration + +```sh +starship preset no-empty-icons > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-empty-icons.toml) + +<<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/pt-PT/presets/no-nerd-font.md b/docs/pt-PT/presets/no-nerd-font.md new file mode 100644 index 00000000..b154a6c0 --- /dev/null +++ b/docs/pt-PT/presets/no-nerd-font.md @@ -0,0 +1,19 @@ +[Return to Presets](./README.md#no-nerd-fonts) + +# No Nerd Fonts Preset + +This preset restricts the use of symbols to those from emoji and powerline sets. + +This means that even without a Nerd Font installed, you should be able to view all module symbols. + +This preset will become the default preset in a future release of starship. + +### Configuration + +```sh +starship preset no-nerd-font > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-nerd-font.toml) + +<<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/pt-PT/presets/tokyo-night.md b/docs/pt-PT/presets/tokyo-night.md new file mode 100644 index 00000000..33f51749 --- /dev/null +++ b/docs/pt-PT/presets/tokyo-night.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#pastel-powerline) + +# Tokyo Night Preset + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) + +### Prerequisites + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal + +### Configuration + +```sh +starship preset tokyo-night > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/tokyo-night.toml) + +<<< @/.vuepress/public/presets/toml/tokyo-night.toml diff --git a/docs/ru-RU/advanced-config/README.md b/docs/ru-RU/advanced-config/README.md index 78672a7f..a7a3011d 100644 --- a/docs/ru-RU/advanced-config/README.md +++ b/docs/ru-RU/advanced-config/README.md @@ -205,7 +205,9 @@ Some shells support a right prompt which renders on the same line as the input. Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](/config/#fill). -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. + +Note: Nushell 0.71.0 or later is required ### Пример @@ -280,5 +282,5 @@ continuation_prompt = "▶▶" Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: - Many terminals disable support for `blink` by default -- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564). +- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). - `strikethrough` is not supported by the default macOS Terminal.app diff --git a/docs/ru-RU/config/README.md b/docs/ru-RU/config/README.md index be5ae2bb..a7e6fe1c 100644 --- a/docs/ru-RU/config/README.md +++ b/docs/ru-RU/config/README.md @@ -15,15 +15,17 @@ mkdir -p ~/.config && touch ~/.config/starship.toml # Inserts a blank line between shell prompts add_newline = true -# Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +# 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 ``` +### Config File Location + You can change default configuration file location with `STARSHIP_CONFIG` environment variable: ```sh @@ -70,6 +72,62 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') По традициям, большинство модулей имеют префикс цвета терминала по умолчанию (например, `через` в "узлах") и пустое пространство как суффикс. +### Strings + +In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. + +The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. + +| Symbol | Type | Notes | +| ------ | ------------------------- | ------------------------------------------------------ | +| `'` | literal string | less escaping | +| `"` | string | more escaping | +| `'''` | multi-line literal string | less escaping | +| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | + +Например: + +```toml +# literal string +format = '☺\☻ ' + +# regular string +format = "☺\\☻ " + +# escaping Starship symbols +format = '\[\$\] ' +``` + +When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: + +```toml +# with literal string +format = ''' + +\$''' + +# with multiline basic string +format = """ + +\\$""" + +# with basic string +format = "\n\\$" +``` + +In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. + +```toml +format = """ +line1\ +line1\ +line1 +line2\ +line2\ +line2 +""" +``` + ### Форматирование строк Формат строк - это формат, с которым модуль печатает все переменные. Большинство модулей имеют запись `формата`, который настраивает формат отображения модуля. Вы можете использовать тексты, переменные и группы текста в строке формата. @@ -80,9 +138,9 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') Например: -- `$version` это строка формата с именем `версии`. -- `$git_branch$git_commit` это строка формата с двумя переменными `git_branch` и `git_commit`. -- `$git_branch $git_commit` имеет две переменные, разделенные пробелом. +- `'$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. #### Группа текста @@ -94,20 +152,20 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') Например: -- `[on](red bold)` будет печатать строку `on` жирным текстом красного цвета. -- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green. -- `[a [b](red) c](green)` будет печатать `a b c` с `b` красного и `a` и `c` зеленого цвета соответсвенно. +- `'[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. #### Строки стиля В Starship, большинство модулей позволяют настроить стили отображения. Это делается записью (обычно называется `style`), которая представляет собой строку, определяющую конфигурацию. Ниже приведены несколько примеров стилей строк, а также, их действия. Подробнее о полном синтаксисе можно прочитать в [расширенном разделе конфигурации](/advanced-config/). -- `"fg:green bg:blue"` устанавливает зеленый текст на синем фоне -- `"bg:blue fg:bright-green"` устанавливает ярко-зеленый текст на синем фоне -- `"bold fg:27"` устанавливает жирный текст с [цветом ANSI](https://i.stack.imgur.com/KTSQa.png) 27 -- `"underline bg:#bf5700"` устанавливает подчёркиваемый текст цвета сожженного апельсина -- `"bold italic fg:purple"` устанавливает жирный фиолетовый текст -- `""` выключает все стили +- `'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 Обратите внимание на то, что, вид стиля зависит от вашего эмулятора терминала. Например, некоторые эмуляторы терминала будут использовать яркие цвета вместо жирного текста, и некоторые цветовые темы используют одинаковые значение для обычных и ярких цветов. Также, чтобы получить курсивный текст, ваш терминал должен поддерживать курсив. @@ -117,43 +175,20 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') Например: -- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. -- `(некоторый текст)` всегда не показывает ничего, поскольку в скобках нет переменных. -- Когда `$all` является ярлыком для `\[$a$b\]`, `($all)` будет показываться только если `$a` и `$b` не являются `None`. Это работает так же, как `(\[$a$b\] )`. - -#### Special characters - -The following symbols have special usage in a format string and must be escaped: `$ \ [ ] ( )`. - -Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). - -Например, когда вы хотите напечатать символ `$` на новой строке, следующие настройки для `формата` эквивалентны: - -```toml -# с базовой строкой -format = "\n\\$" - -# с многолинейной строкой -format = """ - -\\$""" - -# со строкой, состоящей из литералов -format = ''' - -\$''' -``` +- `'(@$region)'` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. +- `'(some text)'` will always show nothing since there are no variables wrapped in the braces. +- When `$combined` is a shortcut for `\[$a$b\]`, `'($combined)'` will show nothing only if `$a` and `$b` are both `None`. This works the same as `'(\[$a$b\] )'`. ### Negative matching -Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched. +Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading '!' character. The presence of _any_ negative indicator in the directory will result in the module not being matched. Extensions are matched against both the characters after the last dot in a filename, and the characters after the first dot in a filename. For example, `foo.bar.tar.gz` will be matched against `bar.tar.gz` and `gz` in the `detect_extensions` variable. Files whose name begins with a dot are not considered to have extensions at all. To see how this works in practice, you could match TypeScript but not MPEG Transport Stream files thus: ```toml -detect_extensions = ["ts", "!video.ts", "!audio.ts"] +detect_extensions = ['ts', '!video.ts', '!audio.ts'] ``` ## Командная строка @@ -165,11 +200,11 @@ detect_extensions = ["ts", "!video.ts", "!audio.ts"] | Параметр | По умолчанию | Описание | | ----------------- | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `format` | [ссылка](#default-prompt-format) | Настройка форматирования оболочки. | -| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | +| `right_format` | `''` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | | `scan_timeout` | `30` | Тайм-аут запуска сканирования файлов (в миллисекундах). | | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Inserts blank line between shell prompts. | -| `palette` | `""` | Sets which color palette from `palettes` to use. | +| `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | ### Пример @@ -177,27 +212,27 @@ detect_extensions = ["ts", "!video.ts", "!audio.ts"] ```toml # ~/.config/starship.toml -# Собственное форматирование оболочки -format = """ +# Use custom format +format = ''' [┌───────────────────>](bold green) [│](bold green)$directory$rust$package -[└─>](bold green) """ +[└─>](bold green) ''' -# Подождите 10 милисекунд пока starship прочитает файлы в этой директории. +# Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 # Disable the blank line at the start of the prompt add_newline = false -# Set "foo" as custom color palette -palette = "foo" +# Set 'foo' as custom color palette +palette = 'foo' # Define custom colors [palettes.foo] # Overwrite existing color -blue = "21" +blue = '21' # Define new color -mustard = "#af8700" +mustard = '#af8700' ``` ### Формат оболочки по умолчанию @@ -205,7 +240,7 @@ mustard = "#af8700" Формат по умолчанию `format` используется для определения формата подсказки (prompt), если `format` пустой или отсутствует. Значение по умолчанию: ```toml -format = "$all" +format = '$all' # Which is equivalent to format = """ @@ -236,7 +271,9 @@ $elixir\ $elm\ $erlang\ $golang\ +$guix_shell\ $haskell\ +$haxe\ $helm\ $java\ $julia\ @@ -245,6 +282,7 @@ $lua\ $nim\ $nodejs\ $ocaml\ +$opa\ $perl\ $php\ $pulumi\ @@ -281,6 +319,7 @@ $jobs\ $battery\ $time\ $status\ +$os\ $container\ $shell\ $character""" @@ -290,7 +329,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format = "$all$directory$character" +format = '$all$directory$character' ``` ## AWS @@ -305,15 +344,17 @@ When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. +When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. + ### Опции | Параметр | По умолчанию | Описание | | ------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | Формат модуля. | -| `symbol` | `"☁️ "` | Символ перед отображением текущего профиля AWS. | -| `region_aliases` | | Таблица региона псевдонимов, отображаемая вместе с именем AWS. | -| `profile_aliases` | | Table of profile aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | Стиль модуля. | +| `symbol` | `'☁️ '` | Символ перед отображением текущего профиля AWS. | +| `region_aliases` | `{}` | Таблица региона псевдонимов, отображаемая вместе с именем AWS. | +| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | +| `style` | `'bold yellow'` | Стиль модуля. | | `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Отключение модуля `AWS`. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -339,11 +380,11 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL [aws] format = 'on [$symbol($profile )(\($region\) )]($style)' -style = "bold blue" -symbol = "🅰 " +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' [aws.profile_aliases] CompanyGroupFrobozzOnCallAccess = 'Frobozz' ``` @@ -354,12 +395,12 @@ CompanyGroupFrobozzOnCallAccess = 'Frobozz' # ~/.config/starship.toml [aws] -format = "on [$symbol$region]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$region]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' ``` #### Отобразить профиль @@ -368,34 +409,48 @@ us-east-1 = "va" # ~/.config/starship.toml [aws] -format = "on [$symbol$profile]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$profile]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.profile_aliases] Enterprise_Naming_Scheme-voidstars = 'void**' ``` ## Azure -The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription, as defined in the `~/.azure/azureProfile.json` file. +The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription or the username, as defined in the `~/.azure/azureProfile.json` file. ### Опции | Переменная | По умолчанию | Описание | | ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `"on [$symbol($subscription)]($style) "` | The format for the Azure module to render. | -| `symbol` | `"ﴃ "` | The symbol used in the format. | -| `style` | `"blue bold"` | The style used in the format. | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'ﴃ '` | The symbol used in the format. | +| `style` | `'blue bold'` | The style used in the format. | | `disabled` | `true` | Disables the `azure` module. | -### Пример +### Примеры + +#### Display Subscription Name ```toml # ~/.config/starship.toml [azure] disabled = false -format = "on [$symbol($subscription)]($style) " +format = 'on [$symbol($subscription)]($style) ' +symbol = 'ﴃ ' +style = 'blue bold' +``` + +#### Display Username + +```toml +# ~/.config/starship.toml + +[azure] +disabled = false +format = "on [$symbol($username)]($style) " symbol = "ﴃ " style = "blue bold" ``` @@ -408,12 +463,12 @@ style = "blue bold" | Параметр | По умолчанию | Описание | | -------------------- | --------------------------------- | ------------------------------------------------------- | -| `full_symbol` | `" "` | Символ, отображаемый при полной батарее. | -| `charging_symbol` | `" "` | Символ, показываемый при зарядке аккумулятора. | -| `discharging_symbol` | `" "` | Символ, показываемый при разрядке аккумулятора. | -| `unknown_symbol` | `" "` | Символ, отображаемый при неизвестном состоянии батареи. | -| `empty_symbol` | `" "` | Символ, отображаемый при пустом состоянии батареи. | -| `format` | `"[$symbol$percentage]($style) "` | Формат модуля. | +| `full_symbol` | `' '` | Символ, отображаемый при полной батарее. | +| `charging_symbol` | `' '` | Символ, показываемый при зарядке аккумулятора. | +| `discharging_symbol` | `' '` | Символ, показываемый при разрядке аккумулятора. | +| `unknown_symbol` | `' '` | Символ, отображаемый при неизвестном состоянии батареи. | +| `empty_symbol` | `' '` | Символ, отображаемый при пустом состоянии батареи. | +| `format` | `'[$symbol$percentage]($style) '` | Формат модуля. | | `display` | [ссылка](#battery-display) | Порог отображения и стиль для модуля. | | `disabled` | `false` | Отключает модуль `battery`. | @@ -423,9 +478,9 @@ style = "blue bold" # ~/.config/starship.toml [battery] -full_symbol = "🔋 " -charging_symbol = "⚡️ " -discharging_symbol = "💀 " +full_symbol = '🔋 ' +charging_symbol = '⚡️ ' +discharging_symbol = '💀 ' ``` ### Отображение батареи @@ -435,7 +490,7 @@ The `display` configuration option is used to define when the battery indicator ```toml [[battery.display]] threshold = 10 -style = "bold red" +style = 'bold red' ``` The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. @@ -447,21 +502,21 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r | Параметр | По умолчанию | Описание | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | | `threshold` | `10` | Верхняя граница опции отображения. | -| `style` | `"red bold"` | Используемый стиль, если используется опция отображения. | +| `style` | `'red bold'` | Используемый стиль, если используется опция отображения. | | `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. | | `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. | #### Пример ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% threshold = 10 -style = "bold red" +style = 'bold red' -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% threshold = 30 -style = "bold yellow" -discharging_symbol = "💦" +style = 'bold yellow' +discharging_symbol = '💦' # when capacity is over 30%, the battery indicator will not be displayed ``` @@ -477,13 +532,13 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil | Параметр | По умолчанию | Описание | | ------------------- | ----------------------------------------------- | ----------------------------------------------------- | -| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. | -| `version_format` | `"v${raw}"` | The version format. | -| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. | +| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. | +| `version_format` | `'v${raw}'` | The version format. | +| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | -| `style` | `"bold blue"` | Стиль модуля. | +| `style` | `'bold blue'` | Стиль модуля. | | `disabled` | `false` | Отключает модуль `elixir`. | ### Переменные @@ -502,7 +557,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil # ~/.config/starship.toml [buf] -symbol = "🦬 " +symbol = '🦬 ' ``` ## Bun @@ -516,13 +571,13 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🍞 "` | A format string representing the symbol of Node.js. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["bun.lockb", "bunfig.toml"]` | Which filenames should trigger this module. | +| `detect_files` | `['bun.lockb', 'bunfig.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | Стиль модуля. | +| `style` | `'bold red'` | Стиль модуля. | | `disabled` | `false` | Disables the `bun` module. | ### Переменные @@ -541,7 +596,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. # ~/.config/starship.toml [bun] -format = "via [🍔 $version](bold green) " +format = 'via [🍔 $version](bold green) ' ``` ## C @@ -552,14 +607,14 @@ The `c` module shows some information about your C compiler. By default the modu | Параметр | По умолчанию | Описание | | ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version(-$name) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"C "` | The symbol used before displaying the compiler details | -| `detect_extensions` | `["c", "h"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ "cc", "--version" ], [ "gcc", "--version" ], [ "clang", "--version" ] ] | How to detect what the compiler is | -| `style` | `"bold 149"` | Стиль модуля. | +| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | +| `style` | `'bold 149'` | Стиль модуля. | | `disabled` | `false` | Disables the `c` module. | ### Переменные @@ -577,7 +632,7 @@ NB that `version` is not in the default format. The `commands` option accepts a list of commands to determine the compiler version and name. -Each command is represented as a list of the executable name, followed by its arguments, usually something like `["mycc", "--version"]`. Starship will try executing each command until it gets a result on STDOUT. +Each command is represented as a list of the executable name, followed by its arguments, usually something like `['mycc', '--version']`. Starship will try executing each command until it gets a result on STDOUT. If a C compiler is not supported by this module, you can request it by [raising an issue on GitHub](https://github.com/starship/starship/). @@ -587,7 +642,7 @@ If a C compiler is not supported by this module, you can request it by [raising # ~/.config/starship.toml [c] -format = "via [$name $version]($style)" +format = 'via [$name $version]($style)' ``` ## Символ @@ -611,13 +666,13 @@ By default it only changes color. If you also want to change its shape take a lo | Параметр | По умолчанию | Описание | | --------------------------- | -------------------- | --------------------------------------------------------------------------------------- | -| `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. | -| `vimcmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | -| `vimcmd_replace_one_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim `replace_one` mode. | -| `vimcmd_replace_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim replace mode. | -| `vimcmd_visual_symbol` | `"[❮](bold yellow)"` | The format string used before the text input if the shell is in vim replace mode. | +| `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. | +| `vimcmd_symbol` | `'[❮](bold green)'` | The format string used before the text input if the shell is in vim normal mode. | +| `vimcmd_replace_one_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim `replace_one` mode. | +| `vimcmd_replace_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim replace mode. | +| `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | | `disabled` | `false` | Отключает модуль `character`. | ### Переменные @@ -634,8 +689,8 @@ By default it only changes color. If you also want to change its shape take a lo # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[✗](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[✗](bold red) ' ``` #### Without custom error shape @@ -644,8 +699,8 @@ error_symbol = "[✗](bold red) " # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[➜](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[➜](bold red) ' ``` #### With custom vim shape @@ -654,7 +709,7 @@ error_symbol = "[➜](bold red) " # ~/.config/starship.toml [character] -vicmd_symbol = "[V](bold green) " +vicmd_symbol = '[V](bold green) ' ``` ## CMake @@ -668,13 +723,13 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | Параметр | По умолчанию | Описание | | ------------------- | -------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"△ "` | The symbol used before the version of cmake. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'△ '` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this module | -| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | +| `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | -| `style` | `"bold blue"` | Стиль модуля. | +| `style` | `'bold blue'` | Стиль модуля. | | `disabled` | `false` | Disables the `cmake` module. | ### Переменные @@ -698,11 +753,11 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold blue"` | Стиль модуля. | -| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Which extensions should trigger this module. | +| `symbol` | `'⚙️ '` | The symbol used before displaying the version of COBOL. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold blue'` | Стиль модуля. | +| `detect_extensions` | `['cbl', 'cob', 'CBL', 'COB']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `cobol` module. | @@ -735,8 +790,8 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `min_time` | `2_000` | Кратчайшая продолжительность для показа времени (в миллисекундах). | | `show_milliseconds` | `false` | Показывать миллисекунды в дополнение к секундам в продолжительности. | -| `format` | `"took [$duration]($style) "` | Формат модуля. | -| `style` | `"bold yellow"` | Стиль модуля. | +| `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). | @@ -758,14 +813,14 @@ The `cobol` module shows the currently installed version of COBOL. By default, t [cmd_duration] min_time = 500 -format = "underwent [$duration](bold yellow)" +format = 'underwent [$duration](bold yellow)' ``` ## Конда The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set. -::: tip Подсказка +::: tip Это не подавляет модификатор командной строки самой conda. Возможно, вы захотите запустить `conda config --set changeps1 False`. @@ -776,9 +831,9 @@ The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) e | Параметр | По умолчанию | Описание | | ------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `truncation_length` | `1` | Количество каталогов, в которых путь к окружению должен быть усечен, если окружение было создано через `conda create -p [path]`. `0` означает без усечения. Также смотрите модуль [`directory`](#directory). | -| `symbol` | `"🅒 "` | Символ перед названием окружения. | -| `style` | `"bold green"` | Стиль модуля. | -| `format` | `"via [$symbol$environment]($style) "` | Формат модуля. | +| `symbol` | `'🅒 '` | Символ перед названием окружения. | +| `style` | `'bold green'` | Стиль модуля. | +| `format` | `'via [$symbol$environment]($style) '` | Формат модуля. | | `ignore_base` | `true` | Ignores `base` environment when activated. | | `disabled` | `false` | Отключает модуль `conda`. | @@ -798,7 +853,7 @@ The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) e # ~/.config/starship.toml [conda] -format = "[$symbol$environment](dimmed green) " +format = '[$symbol$environment](dimmed green) ' ``` ## Container @@ -809,8 +864,8 @@ The `container` module displays a symbol and container name, if inside a contain | Параметр | По умолчанию | Описание | | ---------- | ---------------------------------- | ----------------------------------------- | -| `symbol` | `"⬢"` | The symbol shown, when inside a container | -| `style` | `"bold red dimmed"` | Стиль модуля. | +| `symbol` | `'⬢'` | The symbol shown, when inside a container | +| `style` | `'bold red dimmed'` | Стиль модуля. | | `format` | `'[$symbol \[$name\]]($style) '` | Формат модуля. | | `disabled` | `false` | Disables the `container` module. | @@ -844,12 +899,12 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"🔮 "` | Символ, используемый перед отображением версии crystal. | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold red"` | Стиль модуля. | -| `detect_extensions` | `["cr"]` | Which extensions should trigger this module. | -| `detect_files` | `["shard.yml"]` | Which filenames should trigger this module. | +| `symbol` | `'🔮 '` | Символ, используемый перед отображением версии crystal. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold red'` | Стиль модуля. | +| `detect_extensions` | `['cr']` | Which extensions should trigger this module. | +| `detect_files` | `['shard.yml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Отключает модуль `crystal`. | @@ -869,7 +924,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// # ~/.config/starship.toml [crystal] -format = "via [✨ $version](bold blue) " +format = 'via [✨ $version](bold blue) ' ``` ## Daml @@ -882,12 +937,12 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"Λ "` | A format string representing the symbol of Daml | -| `style` | `"bold cyan"` | Стиль модуля. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'Λ '` | A format string representing the symbol of Daml | +| `style` | `'bold cyan'` | Стиль модуля. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['daml.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `daml` module. | @@ -907,7 +962,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d # ~/.config/starship.toml [daml] -format = "via [D $version](bold bright-green) " +format = 'via [D $version](bold bright-green) ' ``` ## Dart @@ -922,13 +977,13 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `detect_extensions` | `["dart"]` | Which extensions should trigger this module. | -| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".dart_tool"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | Стиль модуля. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🎯 '` | A format string representing the symbol of Dart | +| `detect_extensions` | `['dart']` | Which extensions should trigger this module. | +| `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | Which filenames should trigger this module. | +| `detect_folders` | `['.dart_tool']` | Which folders should trigger this module. | +| `style` | `'bold blue'` | Стиль модуля. | | `disabled` | `false` | Disables the `dart` module. | ### Переменные @@ -947,7 +1002,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d # ~/.config/starship.toml [dart] -format = "via [🔰 $version](bold red) " +format = 'via [🔰 $version](bold red) ' ``` ## Deno @@ -960,13 +1015,13 @@ The `deno` module shows you your currently installed version of [Deno](https://d | Параметр | По умолчанию | Описание | | ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦕 "` | A format string representing the symbol of Deno | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦕 '` | A format string representing the symbol of Deno | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["deno.json", "deno.jsonc", "mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. | +| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"green bold"` | Стиль модуля. | +| `style` | `'green bold'` | Стиль модуля. | | `disabled` | `false` | Disables the `deno` module. | ### Переменные @@ -983,7 +1038,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d # ~/.config/starship.toml [deno] -format = "via [🦕 $version](green bold) " +format = 'via [🦕 $version](green bold) ' ``` ## Каталог @@ -996,20 +1051,21 @@ format = "via [🦕 $version](green bold) " ### Опции -| Параметр | По умолчанию | Описание | -| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `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: "…/" | -| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | -| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) | +| Параметр | По умолчанию | Описание | +| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `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: '…/' | +| `before_repo_root_style` | | The style for the path segment above the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `'[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) '` | The format of a git repo when `before_repo_root_style` and `repo_root_style` is defined. | +| `home_symbol` | `'~'` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |

Этот модуль имеет несколько расширенных опций конфигурации, которые контролируют отображение каталога. @@ -1024,8 +1080,8 @@ format = "via [🦕 $version](green bold) " ```toml [directory.substitutions] -"/Volumes/network/path" = "/net" -"src/com/long/java/path" = "mypath" +'/Volumes/network/path' = '/net' +'src/com/long/java/path' = 'mypath' ``` `fish_style_pwd_dir_length` взаимодействует со стандартными параметрами усечения, которые могут сначала показаться странными: если он не равен нулю, элементы пути, который обычно усекается, вместо этого отображаются с указанным количеством символов. 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`. @@ -1036,8 +1092,8 @@ format = "via [🦕 $version](green bold) " | Переменная | Пример | Описание | | ---------- | --------------------- | ----------------------------------- | -| path | `"D:/Projects"` | The current directory path | -| style\* | `"black bold dimmed"` | Отражает значение параметра `style` | +| path | `'D:/Projects'` | The current directory path | +| style\* | `'black bold dimmed'` | Отражает значение параметра `style` | *: Эта переменная может использоваться только в качестве части строки style @@ -1048,11 +1104,11 @@ Let us consider the path `/path/to/home/git_repo/src/lib` | Переменная | Пример | Описание | | ------------------ | --------------------- | --------------------------------------- | -| before_root_path | `"/path/to/home/"` | The path before git root directory path | -| repo_root | `"git_repo"` | The git root directory name | -| path | `"/src/lib"` | The remaining path | -| style | `"black bold dimmed"` | Отражает значение параметра `style` | -| repo_root_style | `"underline white"` | Style for git root directory name | +| before_root_path | `'/path/to/home/'` | The path before git root directory path | +| repo_root | `'git_repo'` | The git root directory name | +| path | `'/src/lib'` | The remaining path | +| style | `'black bold dimmed'` | Отражает значение параметра `style` | +| repo_root_style | `'underline white'` | Style for git root directory name |
@@ -1063,7 +1119,7 @@ Let us consider the path `/path/to/home/git_repo/src/lib` [directory] truncation_length = 8 -truncation_symbol = "…/" +truncation_symbol = '…/' ``` ## Контекст Docker @@ -1074,13 +1130,13 @@ The `docker_context` module shows the currently active [Docker context](https:// | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | Формат модуля. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `format` | `'via [$symbol$context]($style) '` | Формат модуля. | +| `symbol` | `'🐳 '` | The symbol used before displaying the Docker context. | | `only_with_files` | `true` | Only show when there's a match | | `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | +| `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | Which filenames should trigger this module (needs `only_with_files` to be true). | | `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | -| `style` | `"blue bold"` | Стиль модуля. | +| `style` | `'blue bold'` | Стиль модуля. | | `disabled` | `false` | Disables the `docker_context` module. | ### Переменные @@ -1099,7 +1155,7 @@ The `docker_context` module shows the currently active [Docker context](https:// # ~/.config/starship.toml [docker_context] -format = "via [🐋 $context](blue bold)" +format = 'via [🐋 $context](blue bold)' ``` ## Dotnet @@ -1127,14 +1183,14 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$var_cluster" +'dev.local.cluster.k8s' = 'dev' +'.*/openshift-cluster/.*' = 'openshift' +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' [kubernetes.user_aliases] -"dev.local.cluster.k8s" = "dev" -"root/.*" = "root" +'dev.local.cluster.k8s' = 'dev' +'root/.*' = 'root' ``` Only show the module in directories that contain a `k8s` file. @@ -2121,17 +2249,17 @@ Long and automatically generated cluster names can be identified and shortened u ```toml [kubernetes.context_aliases] # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -".*/openshift-cluster/.*" = "openshift" +'.*/openshift-cluster/.*' = 'openshift' # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$var_cluster" +'.*/(?P[\\w-]+)/.*' = '$var_cluster' # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' ``` -## Перевод Строки +## Разрыв Строки Модуль `line_break` разделяет командную строку на две строки. @@ -2159,8 +2287,8 @@ The `localip` module shows the IPv4 address of the primary network interface. | Параметр | По умолчанию | Описание | | ---------- | ------------------------- | ------------------------------------------------------ | | `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | Формат модуля. | -| `style` | `"bold yellow"` | Стиль модуля. | +| `format` | `'[$localipv4]($style) '` | Формат модуля. | +| `style` | `'bold yellow'` | Стиль модуля. | | `disabled` | `true` | Disables the `localip` module. | ### Переменные @@ -2179,7 +2307,7 @@ The `localip` module shows the IPv4 address of the primary network interface. [localip] ssh_only = false -format = "@[$localipv4](bold red) " +format = '@[$localipv4](bold red) ' disabled = false ``` @@ -2195,14 +2323,14 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------ | -------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | -| `detect_extensions` | `["lua"]` | Which extensions should trigger this module. | -| `detect_files` | `[".lua-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["lua"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | Стиль модуля. | -| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🌙 '` | A format string representing the symbol of Lua. | +| `detect_extensions` | `['lua']` | Which extensions should trigger this module. | +| `detect_files` | `['.lua-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['lua']` | Which folders should trigger this module. | +| `style` | `'bold blue'` | Стиль модуля. | +| `lua_binary` | `'lua'` | Configures the lua binary that Starship executes when getting the version. | | `disabled` | `false` | Disables the `lua` module. | ### Переменные @@ -2221,7 +2349,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o # ~/.config/starship.toml [lua] -format = "via [🌕 $version](bold blue) " +format = 'via [🌕 $version](bold blue) ' ``` ## Использование памяти @@ -2230,7 +2358,7 @@ format = "via [🌕 $version](bold blue) " По умолчанию использование подкачки отображается, если общая сумма подкачки системы не равна нулю. -::: tip Подсказка +::: tip По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации. @@ -2241,9 +2369,9 @@ format = "via [🌕 $version](bold blue) " | Параметр | По умолчанию | Описание | | ----------- | ----------------------------------------------- | ------------------------------------------------------------------ | | `threshold` | `75` | Скрывать использование памяти, если она не превышает этот процент. | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | Формат модуля. | -| `symbol` | `"🐏"` | Символ, используемый перед отображением использования памяти. | -| `style` | `"bold dimmed white"` | Стиль модуля. | +| `format` | `'via $symbol [${ram}( \| ${swap})]($style) '` | Формат модуля. | +| `symbol` | `'🐏'` | Символ, используемый перед отображением использования памяти. | +| `style` | `'bold dimmed white'` | Стиль модуля. | | `disabled` | `true` | Отключает модуль `memory_usage`. | ### Переменные @@ -2267,8 +2395,8 @@ format = "via [🌕 $version](bold blue) " [memory_usage] disabled = false threshold = -1 -symbol = " " -style = "bold dimmed green" +symbol = ' ' +style = 'bold dimmed green' ``` ## Meson @@ -2282,10 +2410,10 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. | Параметр | По умолчанию | Описание | | ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- | | `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | -| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. | -| `format` | `"via [$symbol$project]($style) "` | Формат модуля. | -| `symbol` | `"⬢ "` | The symbol used before displaying the project name. | -| `style` | `"blue bold"` | Стиль модуля. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | +| `format` | `'via [$symbol$project]($style) '` | Формат модуля. | +| `symbol` | `'⬢ '` | The symbol used before displaying the project name. | +| `style` | `'blue bold'` | Стиль модуля. | | `disabled` | `false` | Disables the `meson` module. | ### Переменные @@ -2305,9 +2433,9 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. [meson] disabled = false -truncation_symbol = "--" -symbol = " " -style = "bold dimmed green" +truncation_symbol = '--' +symbol = ' ' +style = 'bold dimmed green' ``` ## Ветвь Mercurial @@ -2318,11 +2446,11 @@ style = "bold dimmed green" | Параметр | По умолчанию | Описание | | ------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- | -| `symbol` | `" "` | Символ, используемый перед закладкой hg или именем ветви репозитория в текущем каталоге. | -| `style` | `"bold purple"` | Стиль модуля. | -| `format` | `"on [$symbol$branch]($style) "` | Формат модуля. | +| `symbol` | `' '` | Символ, используемый перед закладкой hg или именем ветви репозитория в текущем каталоге. | +| `style` | `'bold purple'` | Стиль модуля. | +| `format` | `'on [$symbol$branch]($style) '` | Формат модуля. | | `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | -| `truncation_symbol` | `"…"` | Символ, используемый для обозначения усечения названия ветки. | +| `truncation_symbol` | `'…'` | Символ, используемый для обозначения усечения названия ветки. | | `disabled` | `true` | Отключает модуль `hg_branch`. | ### Переменные @@ -2341,9 +2469,9 @@ style = "bold dimmed green" # ~/.config/starship.toml [hg_branch] -format = "on [🌱 $branch](bold purple)" +format = 'on [🌱 $branch](bold purple)' truncation_length = 4 -truncation_symbol = "" +truncation_symbol = '' ``` ## Nim @@ -2359,13 +2487,13 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | -| `detect_extensions` | `["nim", "nims", "nimble"]` | Which extensions should trigger this module. | -| `detect_files` | `["nim.cfg"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'👑 '` | The symbol used before displaying the version of Nim. | +| `detect_extensions` | `['nim', 'nims', 'nimble']` | Which extensions should trigger this module. | +| `detect_files` | `['nim.cfg']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | Стиль модуля. | +| `style` | `'bold yellow'` | Стиль модуля. | | `disabled` | `false` | Disables the `nim` module. | ### Переменные @@ -2384,8 +2512,8 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang # ~/.config/starship.toml [nim] -style = "yellow" -symbol = "🎣 " +style = 'yellow' +symbol = '🎣 ' ``` ## Nix-shell @@ -2397,10 +2525,10 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | Параметр | По умолчанию | Описание | | ------------ | ---------------------------------------------- | ----------------------------------------------------- | | `format` | `'via [$symbol$state( \($name\))]($style) '` | Формат модуля. | -| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | -| `style` | `"bold blue"` | Стиль модуля. | -| `impure_msg` | `"impure"` | A format string shown when the shell is impure. | -| `pure_msg` | `"pure"` | A format string shown when the shell is pure. | +| `symbol` | `'❄️ '` | A format string representing the symbol of nix-shell. | +| `style` | `'bold blue'` | Стиль модуля. | +| `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` | Отключает модуль `nix_shell`. | ### Переменные @@ -2421,8 +2549,8 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ [nix_shell] disabled = true -impure_msg = "[impure shell](bold red)" -pure_msg = "[pure shell](bold green)" +impure_msg = '[impure shell](bold red)' +pure_msg = '[pure shell](bold green)' format = 'via [☃️ $state( \($name\))](bold blue) ' ``` @@ -2441,13 +2569,13 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string representing the symbol of Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts", "mts", "cts"]` | Which extensions should trigger this module. | -| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | -| `style` | `"bold green"` | Стиль модуля. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string representing the symbol of Node.js. | +| `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Which extensions should trigger this module. | +| `detect_files` | `['package.json', '.node-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['node_modules']` | Which folders should trigger this module. | +| `style` | `'bold green'` | Стиль модуля. | | `disabled` | `false` | Отключает модуль `nodejs`. | | `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | @@ -2467,7 +2595,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n # ~/.config/starship.toml [nodejs] -format = "via [🤖 $version](bold green) " +format = 'via [🤖 $version](bold green) ' ``` ## OCaml @@ -2485,15 +2613,15 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | Параметр | По умолчанию | Описание | | ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | -| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | -| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | -| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Which extensions should trigger this module. | -| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Which filenames should trigger this module. | -| `detect_folders` | `["_opam", "esy.lock"]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | Стиль модуля. | +| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐫 '` | The symbol used before displaying the version of OCaml. | +| `global_switch_indicator` | `''` | The format string used to represent global OPAM switch. | +| `local_switch_indicator` | `'*'` | The format string used to represent local OPAM switch. | +| `detect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | Which extensions should trigger this module. | +| `detect_files` | `['dune', 'dune-project', 'jbuild', 'jbuild-ignore', '.merlin']` | Which filenames should trigger this module. | +| `detect_folders` | `['_opam', 'esy.lock']` | Which folders should trigger this module. | +| `style` | `'bold yellow'` | Стиль модуля. | | `disabled` | `false` | Disables the `ocaml` module. | ### Переменные @@ -2514,7 +2642,43 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam # ~/.config/starship.toml [ocaml] -format = "via [🐪 $version]($style) " +format = 'via [🐪 $version]($style) ' +``` + +## Open Policy Agent + +The `opa` module shows the currently installed version of the OPA tool. By default the module will be shown if the current directory contains a `.rego` file. + +### Опции + +| Параметр | По умолчанию | Описание | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | +| `detect_extensions` | `['rego']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'bold blue'` | Стиль модуля. | +| `disabled` | `false` | Disables the `opa` module. | + +### Переменные + +| Переменная | Пример | Описание | +| ---------- | --------- | ------------------------------------ | +| version | `v0.44.0` | The version of `opa` | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | + +*: Эта переменная может использоваться только в качестве части строки style + +### Пример + +```toml +# ~/.config/starship.toml + +[opa] +format = 'via [⛑️ $version](bold red) ' ``` ## OpenStack @@ -2526,8 +2690,8 @@ The `openstack` module shows the current OpenStack cloud and project. The module | Параметр | По умолчанию | Описание | | ---------- | ----------------------------------------------- | -------------------------------------------------------------- | | `format` | `'on [$symbol$cloud(\($project\))]($style) '` | Формат модуля. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | -| `style` | `"bold yellow"` | Стиль модуля. | +| `symbol` | `'☁️ '` | The symbol used before displaying the current OpenStack cloud. | +| `style` | `'bold yellow'` | Стиль модуля. | | `disabled` | `false` | Disables the `openstack` module. | ### Переменные @@ -2548,8 +2712,105 @@ The `openstack` module shows the current OpenStack cloud and project. The module [openstack] format = 'on [$symbol$cloud(\($project\))]($style) ' -style = "bold yellow" -symbol = "☁️ " +style = 'bold yellow' +symbol = '☁️ ' +``` + +## OS + +The `os` module shows the current operating system. OS information is detected via the [os_info](https://lib.rs/crates/os_info) crate. + +::: warning + +The [os_info](https://lib.rs/crates/os_info) crate used by this module is known to be inaccurate on some systems. + +::: + +::: tip + +По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации. + +::: + +### Опции + +| Параметр | По умолчанию | Описание | +| ---------- | --------------------- | ------------------------------------------------------ | +| `format` | `"[$symbol]($style)"` | Формат модуля. | +| `style` | `"bold white"` | Стиль модуля. | +| `disabled` | `true` | Disables the `os` module. | +| `symbols` | | A table that maps each operating system to its symbol. | + +`symbols` allows you to define arbitrary symbols to display for each operating system type. Operating system types not defined by your configuration use the default symbols table below. All operating systems currently supported by the module are listed below. If you would like an operating system to be added, feel free to open a [feature request](https://github.com/starship/starship/issues/new/choose). + +```toml +# This is the default symbols table. +[os.symbols] +Alpine = "🏔️ " +Amazon = "🙂 " +Android = "🤖 " +Arch = "🎗️ " +CentOS = "💠 " +Debian = "🌀 " +DragonFly = "🐉 " +Emscripten = "🔗 " +EndeavourOS = "🚀 " +Fedora = "🎩 " +FreeBSD = "😈 " +Garuda = "🦅 " +Gentoo = "🗜️ " +HardenedBSD = "🛡️ " +Illumos = "🐦 " +Linux = "🐧 " +Macos = "🍎 " +Manjaro = "🥭 " +Mariner = "🌊 " +MidnightBSD = "🌘 " +Mint = "🌿 " +NetBSD = "🚩 " +NixOS = "❄️ " +OpenBSD = "🐡 " +openSUSE = "🦎 " +OracleLinux = "🦴 " +Pop = "🍭 " +Raspbian = "🍓 " +Redhat = "🎩 " +RedHatEnterprise = "🎩 " +Redox = "🧪 " +Solus = "⛵ " +SUSE = "🦎 " +Ubuntu = "🎯 " +Unknown = "❓ " +Windows = "🪟 " +``` + +### Переменные + +| Переменная | Пример | Описание | +| ---------- | ------------ | ------------------------------------------------------------------ | +| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | +| name | `Arch Linux` | The current operating system name | +| type | `Arch` | The current operating system type | +| codename | | The current operating system codename, if applicable | +| edition | | The current operating system edition, if applicable | +| version | | The current operating system version, if applicable | +| style\* | | Отражает значение параметра `style` | + +*: Эта переменная может использоваться только в качестве части строки style + +### Пример + +```toml +# ~/.config/starship.toml + +[os] +format = "on [($name )]($style)" +style = "bold blue" +disabled = false + +[os.symbols] +Windows = " " +Arch = "Arch is the best! " ``` ## Версия пакета @@ -2580,10 +2841,10 @@ symbol = "☁️ " | Параметр | По умолчанию | Описание | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"is [$symbol$version]($style) "` | Формат модуля. | -| `symbol` | `"📦 "` | Символ, используемый перед отображением версии пакета. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold 208"` | Стиль модуля. | +| `format` | `'is [$symbol$version]($style) '` | Формат модуля. | +| `symbol` | `'📦 '` | Символ, используемый перед отображением версии пакета. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold 208'` | Стиль модуля. | | `display_private` | `false` | Enable displaying version for packages marked as private. | | `disabled` | `false` | Отключает модуль `package`. | @@ -2603,7 +2864,7 @@ symbol = "☁️ " # ~/.config/starship.toml [package] -format = "via [🎁 $version](208 bold) " +format = 'via [🎁 $version](208 bold) ' ``` ## Perl @@ -2620,13 +2881,13 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe | Параметр | По умолчанию | Описание | | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | -| `detect_extensions` | `["pl", "pm", "pod"]` | Which extensions should trigger this module. | -| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | +| `detect_extensions` | `['pl', 'pm', 'pod']` | Which extensions should trigger this module. | +| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | Стиль модуля. | +| `style` | `'bold 149'` | Стиль модуля. | | `disabled` | `false` | Disables the `perl` module. | ### Переменные @@ -2643,7 +2904,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe # ~/.config/starship.toml [perl] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## PHP @@ -2658,13 +2919,13 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | Символ, используемый перед отображением версии PHP. | -| `detect_extensions` | `["php"]` | Which extensions should trigger this module. | -| `detect_files` | `["composer.json", ".php-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐘 '` | Символ, используемый перед отображением версии PHP. | +| `detect_extensions` | `['php']` | Which extensions should trigger this module. | +| `detect_files` | `['composer.json', '.php-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"147 bold"` | Стиль модуля. | +| `style` | `'147 bold'` | Стиль модуля. | | `disabled` | `false` | Отключает модуль `php`. | ### Переменные @@ -2683,14 +2944,14 @@ The `php` module shows the currently installed version of [PHP](https://www.php. # ~/.config/starship.toml [php] -format = "via [🔹 $version](147 bold) " +format = 'via [🔹 $version](147 bold) ' ``` ## Pulumi The `pulumi` module shows the current username, selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/), and version. -::: tip Подсказка +::: tip By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). @@ -2705,10 +2966,10 @@ By default the module will be shown if any of the following conditions are met: | Параметр | По умолчанию | Описание | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string shown before the Pulumi stack. | -| `style` | `"bold 5"` | Стиль модуля. | +| `format` | `'via [$symbol($username@)$stack]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string shown before the Pulumi stack. | +| `style` | `'bold 5'` | Стиль модуля. | | `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | | `disabled` | `false` | Disables the `pulumi` module. | @@ -2732,7 +2993,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [pulumi] -format = "[🛥 ($version )$stack]($style) " +format = '[🛥 ($version )$stack]($style) ' ``` #### Without Pulumi version @@ -2740,8 +3001,8 @@ format = "[🛥 ($version )$stack]($style) " ```toml # ~/.config/starship.toml [pulumi] -symbol = "🛥 " -format = "[$symbol$stack]($style) " +symbol = '🛥 ' +format = '[$symbol$stack]($style) ' ``` ## PureScript @@ -2755,13 +3016,13 @@ The `purescript` module shows the currently installed version of [PureScript](ht | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | -| `detect_extensions` | `["purs"]` | Which extensions should trigger this module. | -| `detect_files` | `["spago.dhall"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'<=> '` | The symbol used before displaying the version of PureScript. | +| `detect_extensions` | `['purs']` | Which extensions should trigger this module. | +| `detect_files` | `['spago.dhall']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold white"` | Стиль модуля. | +| `style` | `'bold white'` | Стиль модуля. | | `disabled` | `false` | Disables the `purescript` module. | ### Переменные @@ -2780,7 +3041,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht # ~/.config/starship.toml [purescript] -format = "via [$symbol$version](bold white)" +format = 'via [$symbol$version](bold white)' ``` ## Python @@ -2806,22 +3067,22 @@ By default the module will be shown if any of the following conditions are met: | Параметр | По умолчанию | Описание | | -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | | `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | Стиль модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐍 '` | A format string representing the symbol of Python | +| `style` | `'yellow bold'` | Стиль модуля. | | `pyenv_version_name` | `false` | Использовать pyenv для получения версии Python | | `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | -| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `detect_extensions` | `["py"]` | Which extensions should trigger this module | -| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module | +| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | +| `detect_extensions` | `['py']` | Which extensions should trigger this module | +| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | | `disabled` | `false` | Disables the `python` module. | -::: tip Подсказка +::: 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. +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. ::: @@ -2829,11 +3090,11 @@ The default values and order for `python_binary` was chosen to first identify th | Переменная | Пример | Описание | | ------------ | --------------- | ------------------------------------------ | -| version | `"v3.8.1"` | The version of `python` | -| symbol | `"🐍 "` | Отражает значение параметра `symbol` | -| style | `"yellow bold"` | Отражает значение параметра `style` | -| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | -| virtualenv | `"venv"` | The current `virtualenv` name | +| version | `'v3.8.1'` | The version of `python` | +| symbol | `'🐍 '` | Отражает значение параметра `symbol` | +| style | `'yellow bold'` | Отражает значение параметра `style` | +| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` | +| virtualenv | `'venv'` | The current `virtualenv` name | ### Пример @@ -2841,7 +3102,7 @@ The default values and order for `python_binary` was chosen to first identify th # ~/.config/starship.toml [python] -symbol = "👾 " +symbol = '👾 ' pyenv_version_name = true ``` @@ -2850,7 +3111,7 @@ pyenv_version_name = true [python] # Only use the `python3` binary to get the version. -python_binary = "python3" +python_binary = 'python3' ``` ```toml @@ -2869,7 +3130,7 @@ detect_extensions = [] # # Note this will only work when the venv is inside the project and it will only # work in the directory that contains the venv dir but maybe this is ok? -python_binary = ["./venv/bin/python", "python", "python3", "python2"] +python_binary = ['./venv/bin/python', 'python', 'python3', 'python2'] ``` ## R @@ -2888,13 +3149,13 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"📐"` | A format string representing the symbol of R. | -| `style` | `"blue bold"` | Стиль модуля. | -| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module | -| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module | -| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'📐'` | A format string representing the symbol of R. | +| `style` | `'blue bold'` | Стиль модуля. | +| `detect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | Which extensions should trigger this module | +| `detect_files` | `['.Rprofile']` | Which filenames should trigger this module | +| `detect_folders` | `['.Rproj.user']` | Which folders should trigger this module | | `disabled` | `false` | Disables the `r` module. | ### Переменные @@ -2903,7 +3164,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | ---------- | ------------- | ------------------------------------ | | version | `v4.0.5` | The version of `R` | | symbol | | Отражает значение параметра `symbol` | -| style | `"blue bold"` | Отражает значение параметра `style` | +| style | `'blue bold'` | Отражает значение параметра `style` | ### Пример @@ -2911,7 +3172,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr # ~/.config/starship.toml [rlang] -format = "with [📐 $version](blue bold) " +format = 'with [📐 $version](blue bold) ' ``` ## Raku @@ -2925,13 +3186,13 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version-$vm_version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦋 "` | The symbol used before displaying the version of Raku | -| `detect_extensions` | `["p6", "pm6", "pod6", "raku", "rakumod"]` | Which extensions should trigger this module. | -| `detect_files` | `["META6.json"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version-$vm_version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦋 '` | The symbol used before displaying the version of Raku | +| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Which extensions should trigger this module. | +| `detect_files` | `['META6.json']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | Стиль модуля. | +| `style` | `'bold 149'` | Стиль модуля. | | `disabled` | `false` | Disables the `raku` module. | ### Переменные @@ -2949,7 +3210,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra # ~/.config/starship.toml [raku] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## Red @@ -2962,13 +3223,13 @@ By default the `red` module shows the currently installed version of [Red](https | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | -| `detect_extensions` | `["red"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🔺 '` | A format string representing the symbol of Red. | +| `detect_extensions` | `['red']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"red bold"` | Стиль модуля. | +| `style` | `'red bold'` | Стиль модуля. | | `disabled` | `false` | Disables the `red` module. | ### Переменные @@ -2987,7 +3248,7 @@ By default the `red` module shows the currently installed version of [Red](https # ~/.config/starship.toml [red] -symbol = "🔴 " +symbol = '🔴 ' ``` ## Ruby @@ -3005,14 +3266,14 @@ Starship gets the current Ruby version by running `ruby -v`. | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. | -| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💎 '` | A format string representing the symbol of Ruby. | +| `detect_extensions` | `['rb']` | Which extensions should trigger this module. | +| `detect_files` | `['Gemfile', '.ruby-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | -| `style` | `"bold red"` | Стиль модуля. | +| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Which environment variables should trigger this module. | +| `style` | `'bold red'` | Стиль модуля. | | `disabled` | `false` | Отключает модуль `ruby`. | ### Переменные @@ -3031,7 +3292,7 @@ Starship gets the current Ruby version by running `ruby -v`. # ~/.config/starship.toml [ruby] -symbol = "🔺 " +symbol = '🔺 ' ``` ## Rust @@ -3045,13 +3306,13 @@ By default the `rust` module shows the currently installed version of [Rust](htt | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. | -| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦀 '` | A format string representing the symbol of Rust | +| `detect_extensions` | `['rs']` | Which extensions should trigger this module. | +| `detect_files` | `['Cargo.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | Стиль модуля. | +| `style` | `'bold red'` | Стиль модуля. | | `disabled` | `false` | Отключает модуль `rust`. | ### Переменные @@ -3072,7 +3333,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt # ~/.config/starship.toml [rust] -format = "via [⚙️ $version](red bold)" +format = 'via [⚙️ $version](red bold)' ``` ## Scala @@ -3087,13 +3348,13 @@ The `scala` module shows the currently installed version of [Scala](https://www. | Параметр | По умолчанию | Описание | | ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [${symbol}(${version} )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | -| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | -| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | -| `style` | `"red dimmed"` | Стиль модуля. | +| `format` | `'via [${symbol}(${version} )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. | +| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. | +| `detect_folders` | `['.metals']` | Which folders should trigger this modules. | +| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. | +| `style` | `'red dimmed'` | Стиль модуля. | | `disabled` | `false` | Disables the `scala` module. | ### Переменные @@ -3112,14 +3373,14 @@ The `scala` module shows the currently installed version of [Scala](https://www. # ~/.config/starship.toml [scala] -symbol = "🌟 " +symbol = '🌟 ' ``` ## Shell The `shell` module shows an indicator for currently used shell. -::: tip Подсказка +::: tip По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации. @@ -3129,19 +3390,19 @@ The `shell` module shows an indicator for currently used shell. | Параметр | По умолчанию | Описание | | ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `"bsh"` | A format string used to represent bash. | -| `fish_indicator` | `"fsh"` | A format string used to represent fish. | -| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. | -| `powershell_indicator` | `"psh"` | A format string used to represent powershell. | -| `ion_indicator` | `"ion"` | A format string used to represent ion. | -| `elvish_indicator` | `"esh"` | A format string used to represent elvish. | -| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. | -| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. | -| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. | -| `nu_indicator` | `"nu"` | A format string used to represent nu. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `"[$indicator]($style) "` | Формат модуля. | -| `style` | `"white bold"` | Стиль модуля. | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | Формат модуля. | +| `style` | `'white bold'` | Стиль модуля. | | `disabled` | `true` | Disables the `shell` module. | ### Переменные @@ -3159,26 +3420,26 @@ The `shell` module shows an indicator for currently used shell. # ~/.config/starship.toml [shell] -fish_indicator = "" -powershell_indicator = "_" -unknown_indicator = "mystery shell" -style = "cyan bold" +fish_indicator = '' +powershell_indicator = '_' +unknown_indicator = 'mystery shell' +style = 'cyan bold' disabled = false ``` ## SHLVL -The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ('shell level') environment variable, if it is set to a number and meets or exceeds the specified threshold. ### Опции | Параметр | По умолчанию | Описание | | ----------- | ---------------------------- | ------------------------------------------------------------- | | `threshold` | `2` | Display threshold. | -| `format` | `"[$symbol$shlvl]($style) "` | Формат модуля. | -| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. | +| `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"` | Стиль модуля. | +| `style` | `'bold yellow'` | Стиль модуля. | | `disabled` | `true` | Disables the `shlvl` module. | ### Переменные @@ -3198,7 +3459,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int [shlvl] disabled = false -format = "$shlvl level(s) down" +format = '$shlvl level(s) down' threshold = 3 ``` @@ -3211,8 +3472,8 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | Параметр | По умолчанию | Описание | | ---------- | -------------------------------- | ------------------------------------------------ | | `format` | `'[$symbol\[$env\]]($style) '` | Формат модуля. | -| `symbol` | `""` | A format string displayed before the image name. | -| `style` | `"bold dimmed blue"` | Стиль модуля. | +| `symbol` | `''` | A format string displayed before the image name. | +| `style` | `'bold dimmed blue'` | Стиль модуля. | | `disabled` | `false` | Disables the `singularity` module. | ### Переменные @@ -3243,9 +3504,9 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | Параметр | По умолчанию | Описание | | ------------------- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | The number of directories the environment path should be truncated to. `0` означает без усечения. Также смотрите модуль [`directory`](#directory). | -| `symbol` | `"🅢 "` | Символ перед названием окружения. | -| `style` | `"bold blue"` | Стиль модуля. | -| `format` | `"via [$symbol$environment]($style) "` | Формат модуля. | +| `symbol` | `'🅢 '` | Символ перед названием окружения. | +| `style` | `'bold blue'` | Стиль модуля. | +| `format` | `'via [$symbol$environment]($style) '` | Формат модуля. | | `disabled` | `false` | Disables the `spack` module. | ### Переменные @@ -3264,14 +3525,14 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat # ~/.config/starship.toml [spack] -format = "[$symbol$environment](dimmed blue) " +format = '[$symbol$environment](dimmed blue) ' ``` ## Status The `status` module displays the exit code of the previous command. If $success_symbol is empty (default), the module will be shown only if the exit code is not `0`. The status code will cast to a signed 32-bit integer. -::: tip Подсказка +::: tip По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации. @@ -3281,14 +3542,14 @@ The `status` module displays the exit code of the previous command. If $success_ | Параметр | По умолчанию | Описание | | --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `format` | `"[$symbol$status]($style) "` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `success_symbol` | `""` | The symbol displayed on program success | -| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | -| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | -| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | -| `style` | `"bold red"` | Стиль модуля. | +| `format` | `'[$symbol$status]($style) '` | The format of the module | +| `symbol` | `'❌'` | The symbol displayed on program error | +| `success_symbol` | `''` | The symbol displayed on program success | +| `not_executable_symbol` | `'🚫'` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `'🔍'` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `'🧱'` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `'⚡'` | The symbol displayed on any signal | +| `style` | `'bold red'` | Стиль модуля. | | `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code | | `pipestatus` | `false` | Enable pipestatus reporting | @@ -3320,9 +3581,9 @@ The `status` module displays the exit code of the previous command. If $success_ # ~/.config/starship.toml [status] -style = "bg:blue" -symbol = "🔴 " -success_symbol = "🟢 SUCCESS" +style = 'bg:blue' +symbol = '🔴 ' +success_symbol = '🟢 SUCCESS' format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false @@ -3332,7 +3593,7 @@ disabled = false The `sudo` module displays if sudo credentials are currently cached. The module will only be shown if credentials are cached. -::: tip Подсказка +::: tip По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации. @@ -3342,9 +3603,9 @@ The `sudo` module displays if sudo credentials are currently cached. The module | Параметр | По умолчанию | Описание | | --------------- | ------------------------ | ------------------------------------------------------- | -| `format` | `"[as $symbol]($style)"` | The format of the module | -| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached | -| `style` | `"bold blue"` | Стиль модуля. | +| `format` | `'[as $symbol]($style)'` | The format of the module | +| `symbol` | `'🧙 '` | The symbol displayed when credentials are cached | +| `style` | `'bold blue'` | Стиль модуля. | | `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | | `disabled` | `true` | Disables the `sudo` module. | @@ -3363,8 +3624,8 @@ The `sudo` module displays if sudo credentials are currently cached. The module # ~/.config/starship.toml [sudo] -style = "bold green" -symbol = "👩‍💻 " +style = 'bold green' +symbol = '👩‍💻 ' disabled = false ``` @@ -3388,13 +3649,13 @@ By default the `swift` module shows the currently installed version of [Swift](h | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `detect_extensions` | `["swift"]` | Which extensions should trigger this module. | -| `detect_files` | `["Package.swift"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐦 '` | A format string representing the symbol of Swift | +| `detect_extensions` | `['swift']` | Which extensions should trigger this module. | +| `detect_files` | `['Package.swift']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 202"` | Стиль модуля. | +| `style` | `'bold 202'` | Стиль модуля. | | `disabled` | `false` | Disables the `swift` module. | ### Переменные @@ -3413,14 +3674,14 @@ By default the `swift` module shows the currently installed version of [Swift](h # ~/.config/starship.toml [swift] -format = "via [🏎 $version](red bold)" +format = 'via [🏎 $version](red bold)' ``` ## Terraform The `terraform` module shows the currently selected [Terraform workspace](https://www.terraform.io/docs/language/state/workspaces.html) and version. -::: tip Подсказка +::: tip By default the Terraform version is not shown, since this is slow for 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-terraform-version). @@ -3435,13 +3696,13 @@ By default the module will be shown if any of the following conditions are met: | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol$workspace]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💠'` | A format string shown before the terraform workspace. | +| `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | -| `style` | `"bold 105"` | Стиль модуля. | +| `detect_folders` | `['.terraform']` | Which folders should trigger this module. | +| `style` | `'bold 105'` | Стиль модуля. | | `disabled` | `false` | Отключает модуль `terraform`. | ### Переменные @@ -3463,7 +3724,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [terraform] -format = "[🏎💨 $version$workspace]($style) " +format = '[🏎💨 $version$workspace]($style) ' ``` #### Without Terraform version @@ -3472,14 +3733,14 @@ format = "[🏎💨 $version$workspace]($style) " # ~/.config/starship.toml [terraform] -format = "[🏎💨 $workspace]($style) " +format = '[🏎💨 $workspace]($style) ' ``` ## Время Модуль `time` показывает текущее **локальное** время. Значение конфигурации `format` используется пакетом [`chrono`](https://crates.io/crates/chrono) для контроля того, как отображается время. Ознакомьтесь с [документацией chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html), чтобы увидеть доступные параметры. -::: tip Подсказка +::: tip По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации. @@ -3489,15 +3750,15 @@ format = "[🏎💨 $workspace]($style) " | Параметр | По умолчанию | Описание | | ----------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | The format string for the module. | +| `format` | `'at [$time]($style) '` | The format string for the module. | | `use_12hr` | `false` | Включить 12-часовое форматирование | | `time_format` | см. ниже | [Строка формата chrono](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html), используемая для форматирования времени. | -| `style` | `"bold yellow"` | Стиль модуля времени | -| `utc_time_offset` | `"local"` | Устанавливает смещение UTC. Range from -24 < x < 24. Разрешает числам с плавающей точкой встраивать 30/45-минутное смещение временной зоны. | +| `style` | `'bold yellow'` | Стиль модуля времени | +| `utc_time_offset` | `'local'` | Устанавливает смещение UTC. Range from -24 < x < 24. Разрешает числам с плавающей точкой встраивать 30/45-минутное смещение временной зоны. | | `disabled` | `true` | Отключает модуль `time`. | -| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | +| `time_range` | `'-'` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | -If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Иначе, принимается значение `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. +If `use_12hr` is `true`, then `time_format` defaults to `'%r'`. Otherwise, it defaults to `'%T'`. Manually setting `time_format` will override the `use_12hr` setting. ### Переменные @@ -3516,9 +3777,9 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Иначе, пр [time] disabled = false format = '🕙[\[ $time \]]($style) ' -time_format = "%T" -utc_time_offset = "-5" -time_range = "10:00:00-14:00:00" +time_format = '%T' +utc_time_offset = '-5' +time_range = '10:00:00-14:00:00' ``` ## Имя пользователя @@ -3530,7 +3791,7 @@ time_range = "10:00:00-14:00:00" - Пользователь подключен к SSH-сессии - Переменная `show_always` равна true -::: tip Подсказка +::: 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. @@ -3540,9 +3801,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Параметр | По умолчанию | Описание | | ------------- | ----------------------- | ------------------------------------------------------- | -| `style_root` | `"bold red"` | The style used when the user is root/admin. | -| `style_user` | `"bold yellow"` | Стиль, используемый для всех пользователей, кроме root. | -| `format` | `"[$user]($style) in "` | Формат модуля. | +| `style_root` | `'bold red'` | The style used when the user is root/admin. | +| `style_user` | `'bold yellow'` | Стиль, используемый для всех пользователей, кроме root. | +| `format` | `'[$user]($style) in '` | Формат модуля. | | `show_always` | `false` | Всегда показывать модуль `username`. | | `disabled` | `false` | Отключает модуль `username`. | @@ -3550,8 +3811,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Переменная | Пример | Описание | | ---------- | ------------ | ------------------------------------------------------------------------------------------- | -| `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. | +| `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. | ### Пример @@ -3559,9 +3820,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` # ~/.config/starship.toml [username] -style_user = "white bold" -style_root = "black bold" -format = "user: [$user]($style) " +style_user = 'white bold' +style_root = 'black bold' +format = 'user: [$user]($style) ' disabled = false show_always = true ``` @@ -3576,13 +3837,13 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'⍱ '` | A format string representing the symbol of Vagrant. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["Vagrantfile"]` | Which filenames should trigger this module. | +| `detect_files` | `['Vagrantfile']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"cyan bold"` | Стиль модуля. | +| `style` | `'cyan bold'` | Стиль модуля. | | `disabled` | `false` | Disables the `vagrant` module. | ### Переменные @@ -3601,7 +3862,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// # ~/.config/starship.toml [vagrant] -format = "via [⍱ $version](bold white) " +format = 'via [⍱ $version](bold white) ' ``` ## V @@ -3615,13 +3876,13 @@ The `vlang` module shows you your currently installed version of [V](https://vla | Параметр | По умолчанию | Описание | | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"V "` | A format string representing the symbol of V | -| `detect_extensions` | `["v"]` | Which extensions should trigger this module. | -| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'V '` | A format string representing the symbol of V | +| `detect_extensions` | `['v']` | Which extensions should trigger this module. | +| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"blue bold"` | Стиль модуля. | +| `style` | `'blue bold'` | Стиль модуля. | | `disabled` | `false` | Disables the `vlang` module. | ### Переменные @@ -3637,7 +3898,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla ```toml # ~/.config/starship.toml [vlang] -format = "via [V $version](blue bold) " +format = 'via [V $version](blue bold) ' ``` ## VCSH @@ -3648,9 +3909,9 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | Параметр | По умолчанию | Описание | | ---------- | -------------------------------- | ------------------------------------------------------ | -| `symbol` | | The symbol used before displaying the repository name. | -| `style` | `"bold yellow"` | Стиль модуля. | -| `format` | `"vcsh [$symbol$repo]($style) "` | Формат модуля. | +| `symbol` | `''` | The symbol used before displaying the repository name. | +| `style` | `'bold yellow'` | Стиль модуля. | +| `format` | `'vcsh [$symbol$repo]($style) '` | Формат модуля. | | `disabled` | `false` | Disables the `vcsh` module. | ### Переменные @@ -3669,7 +3930,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v # ~/.config/starship.toml [vcsh] -format = "[🆅 $repo](bold blue) " +format = '[🆅 $repo](bold blue) ' ``` ## Zig @@ -3682,12 +3943,12 @@ By default the the `zig` module shows the currently installed version of [Zig](h | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | Стиль модуля. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'↯ '` | The symbol used before displaying the version of Zig. | +| `style` | `'bold yellow'` | Стиль модуля. | | `disabled` | `false` | Disables the `zig` module. | -| `detect_extensions` | `["zig"]` | Which extensions should trigger this module. | +| `detect_extensions` | `['zig']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -3707,7 +3968,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h # ~/.config/starship.toml [zig] -symbol = "⚡️ " +symbol = '⚡️ ' ``` ## Custom commands @@ -3722,19 +3983,19 @@ These modules will be shown if any of the following conditions are met: - The `when` command returns 0 - The current Operating System (std::env::consts::OS) matches with `os` field if defined. -::: tip Подсказка +::: tip Multiple custom modules can be defined by using a `.`. ::: -::: tip Подсказка +::: 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 Подсказка +::: 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! @@ -3752,16 +4013,16 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `command` | `''` | The command whose output should be printed. The command will be passed on stdin to the shell. | | `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `описание` | `""` | The description of the module that is shown when running `starship explain`. | +| `описание` | `''` | The description of the module that is shown when running `starship explain`. | | `detect_files` | `[]` | The files that will be searched in the working directory for a match. | | `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. | | `detect_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)"` | Формат модуля. | +| `symbol` | `''` | The symbol used before displaying the command output. | +| `style` | `'bold green'` | Стиль модуля. | +| `format` | `'[$symbol($output )]($style)'` | Формат модуля. | | `disabled` | `false` | Disables this `custom` module. | | `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | | `use_stdin` | | An optional boolean value that overrides whether commands should be forwarded to the shell via the standard input or as an argument. If unset standard input is used by default, unless the shell does not support it (cmd, nushell). Setting this disables shell-specific argument handling. | @@ -3784,14 +4045,14 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt - 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. +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 -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. ```toml -shell = ["pwsh", "-Command", "-"] +shell = ['pwsh', '-Command', '-'] ``` ::: warning Make sure your custom shell configuration exits gracefully @@ -3812,19 +4073,19 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -detect_files = ["foo"] # can specify filters but wildcards are not supported -when = """ test "$HOME" = "$PWD" """ -format = " transcending [$output]($style)" +command = 'echo foo' # shows output of command +detect_files = ['foo'] # can specify filters but wildcards are not supported +when = ''' test "$HOME" = "$PWD" ''' +format = ' transcending [$output]($style)' [custom.time] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command', '-'] [custom.time-as-arg] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command'] use_stdin = false ``` diff --git a/docs/ru-RU/guide/README.md b/docs/ru-RU/guide/README.md index 606afcd8..55942eef 100644 --- a/docs/ru-RU/guide/README.md +++ b/docs/ru-RU/guide/README.md @@ -219,7 +219,6 @@ Alternatively, install Starship using any of the following package managers: | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | | Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | -| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | @@ -417,6 +416,14 @@ If you're looking to further customize Starship: - **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons. +## ❤️ Sponsors + +Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website. + +**Supporter Tier** + +- [Dimension](https://dimension.dev/) +


Иконка ракеты Starship diff --git a/docs/ru-RU/presets/README.md b/docs/ru-RU/presets/README.md index 5c66c31e..b34a9c4e 100644 --- a/docs/ru-RU/presets/README.md +++ b/docs/ru-RU/presets/README.md @@ -10,6 +10,14 @@ This preset changes the symbols for each module to use Nerd Font symbols. [![Скриншот предустановки Nerd Font Symbols](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font) +## [No Nerd Fonts](./no-nerd-font.md) + +This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt. + +::: tip This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). ::: + +[Click to view No Nerd Font preset](./no-nerd-font) + ## [Bracketed Segments](./bracketed-segments.md) This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.). @@ -28,6 +36,12 @@ This preset hides the version of language runtimes. If you work in containers or [![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes) +## [No Empty Icons](./no-empty-icons.md) + +This preset does not show icons if the toolset is not found. + +[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Click to view No Runtime Versions preset")](./no-empty-icons.md) + ## [Pure Prompt](./pure-preset.md) This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). @@ -39,3 +53,9 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship. [![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png "Click to view Pure Prompt preset")](./pastel-powerline) + +## [Tokyo Night](./tokyo-night.md) + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) diff --git a/docs/ru-RU/presets/no-empty-icons.md b/docs/ru-RU/presets/no-empty-icons.md new file mode 100644 index 00000000..929dce1c --- /dev/null +++ b/docs/ru-RU/presets/no-empty-icons.md @@ -0,0 +1,17 @@ +[Return to Presets](./README.md#no-empty-icons) + +# No Empty Icons Preset + +If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. + +![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) + +### Конфигурация + +```sh +starship preset no-empty-icons > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-empty-icons.toml) + +<<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/ru-RU/presets/no-nerd-font.md b/docs/ru-RU/presets/no-nerd-font.md new file mode 100644 index 00000000..e2b81f06 --- /dev/null +++ b/docs/ru-RU/presets/no-nerd-font.md @@ -0,0 +1,19 @@ +[Return to Presets](./README.md#no-nerd-fonts) + +# No Nerd Fonts Preset + +This preset restricts the use of symbols to those from emoji and powerline sets. + +This means that even without a Nerd Font installed, you should be able to view all module symbols. + +This preset will become the default preset in a future release of starship. + +### Конфигурация + +```sh +starship preset no-nerd-font > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-nerd-font.toml) + +<<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/ru-RU/presets/tokyo-night.md b/docs/ru-RU/presets/tokyo-night.md new file mode 100644 index 00000000..1da21ad5 --- /dev/null +++ b/docs/ru-RU/presets/tokyo-night.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#pastel-powerline) + +# Tokyo Night Preset + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) + +### Обязательные требования + +- Установленный и включенный шрифт [Nerd Font](https://www.nerdfonts.com/) в вашем терминале + +### Конфигурация + +```sh +starship preset tokyo-night > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/tokyo-night.toml) + +<<< @/.vuepress/public/presets/toml/tokyo-night.toml diff --git a/docs/tr-TR/advanced-config/README.md b/docs/tr-TR/advanced-config/README.md index d4b633cd..f4de2506 100644 --- a/docs/tr-TR/advanced-config/README.md +++ b/docs/tr-TR/advanced-config/README.md @@ -204,7 +204,9 @@ Some shells support a right prompt which renders on the same line as the input. Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](/config/#fill). -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. + +Note: Nushell 0.71.0 or later is required ### Example @@ -279,5 +281,5 @@ If multiple colors are specified for foreground/background, the last one in the Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: - Many terminals disable support for `blink` by default -- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564). +- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). - `strikethrough` is not supported by the default macOS Terminal.app diff --git a/docs/tr-TR/config/README.md b/docs/tr-TR/config/README.md index 18cb513f..a67909fe 100644 --- a/docs/tr-TR/config/README.md +++ b/docs/tr-TR/config/README.md @@ -15,15 +15,17 @@ All configuration for starship is done in this [TOML](https://github.com/toml-la # Inserts a blank line between shell prompts add_newline = true -# Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +# 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 ``` +### Config File Location + You can change default configuration file location with `STARSHIP_CONFIG` environment variable: ```sh @@ -70,6 +72,62 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. +### Strings + +In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. + +The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. + +| Symbol | Type | Notes | +| ------ | ------------------------- | ------------------------------------------------------ | +| `'` | literal string | less escaping | +| `"` | string | more escaping | +| `'''` | multi-line literal string | less escaping | +| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | + +For example: + +```toml +# literal string +format = '☺\☻ ' + +# regular string +format = "☺\\☻ " + +# escaping Starship symbols +format = '\[\$\] ' +``` + +When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: + +```toml +# with literal string +format = ''' + +\$''' + +# with multiline basic string +format = """ + +\\$""" + +# with basic string +format = "\n\\$" +``` + +In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. + +```toml +format = """ +line1\ +line1\ +line1 +line2\ +line2\ +line2 +""" +``` + ### Format Strings Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. @@ -80,9 +138,9 @@ A variable contains a `$` symbol followed by the name of the variable. The name 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. +- `'$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 @@ -94,20 +152,20 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri 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. +- `'[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 +- `'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. @@ -117,43 +175,20 @@ A conditional format string wrapped in `(` and `)` will not render if all variab For example: -- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. -- `(some text)` will always show nothing since there are no variables wrapped in the braces. -- 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\] )`. - -#### Special characters - -The following symbols have special usage in a format string and must be escaped: `$ \ [ ] ( )`. - -Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). - -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 = ''' - -\$''' -``` +- `'(@$region)'` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. +- `'(some text)'` will always show nothing since there are no variables wrapped in the braces. +- When `$combined` is a shortcut for `\[$a$b\]`, `'($combined)'` will show nothing only if `$a` and `$b` are both `None`. This works the same as `'(\[$a$b\] )'`. ### Negative matching -Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched. +Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading '!' character. The presence of _any_ negative indicator in the directory will result in the module not being matched. Extensions are matched against both the characters after the last dot in a filename, and the characters after the first dot in a filename. For example, `foo.bar.tar.gz` will be matched against `bar.tar.gz` and `gz` in the `detect_extensions` variable. Files whose name begins with a dot are not considered to have extensions at all. To see how this works in practice, you could match TypeScript but not MPEG Transport Stream files thus: ```toml -detect_extensions = ["ts", "!video.ts", "!audio.ts"] +detect_extensions = ['ts', '!video.ts', '!audio.ts'] ``` ## Prompt @@ -165,11 +200,11 @@ This is the list of prompt-wide configuration options. | Option | Default | Description | | ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `format` | [link](#default-prompt-format) | Configure the format of the prompt. | -| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | +| `right_format` | `''` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | | `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Inserts blank line between shell prompts. | -| `palette` | `""` | Sets which color palette from `palettes` to use. | +| `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | ### Example @@ -178,10 +213,10 @@ This is the list of prompt-wide configuration options. # ~/.config/starship.toml # Use custom format -format = """ +format = ''' [┌───────────────────>](bold green) [│](bold green)$directory$rust$package -[└─>](bold green) """ +[└─>](bold green) ''' # Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 @@ -189,15 +224,15 @@ scan_timeout = 10 # Disable the blank line at the start of the prompt add_newline = false -# Set "foo" as custom color palette -palette = "foo" +# Set 'foo' as custom color palette +palette = 'foo' # Define custom colors [palettes.foo] # Overwrite existing color -blue = "21" +blue = '21' # Define new color -mustard = "#af8700" +mustard = '#af8700' ``` ### Default Prompt Format @@ -205,7 +240,7 @@ mustard = "#af8700" 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" +format = '$all' # Which is equivalent to format = """ @@ -236,7 +271,9 @@ $elixir\ $elm\ $erlang\ $golang\ +$guix_shell\ $haskell\ +$haxe\ $helm\ $java\ $julia\ @@ -245,6 +282,7 @@ $lua\ $nim\ $nodejs\ $ocaml\ +$opa\ $perl\ $php\ $pulumi\ @@ -281,6 +319,7 @@ $jobs\ $battery\ $time\ $status\ +$os\ $container\ $shell\ $character""" @@ -290,7 +329,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format = "$all$directory$character" +format = '$all$directory$character' ``` ## AWS @@ -305,15 +344,17 @@ When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. +When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. + ### Options | Option | Default | Description | | ------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | -| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | -| `profile_aliases` | | Table of profile aliases to display in addition to the AWS name. | -| `stil` | `"bold yellow"` | The style 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. | +| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | +| `stil` | `'bold yellow'` | The style for the module. | | `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Disables the `AWS` module. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -339,11 +380,11 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL [aws] format = 'on [$symbol($profile )(\($region\) )]($style)' -style = "bold blue" -symbol = "🅰 " +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' [aws.profile_aliases] CompanyGroupFrobozzOnCallAccess = 'Frobozz' ``` @@ -354,12 +395,12 @@ CompanyGroupFrobozzOnCallAccess = 'Frobozz' # ~/.config/starship.toml [aws] -format = "on [$symbol$region]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$region]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' ``` #### Display profile @@ -368,34 +409,48 @@ us-east-1 = "va" # ~/.config/starship.toml [aws] -format = "on [$symbol$profile]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$profile]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.profile_aliases] Enterprise_Naming_Scheme-voidstars = 'void**' ``` ## Azure -The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription, as defined in the `~/.azure/azureProfile.json` file. +The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription or the username, as defined in the `~/.azure/azureProfile.json` file. ### Options | Variable | Default | Description | | ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `"on [$symbol($subscription)]($style) "` | The format for the Azure module to render. | -| `symbol` | `"ﴃ "` | The symbol used in the format. | -| `stil` | `"blue bold"` | The style used in the format. | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'ﴃ '` | The symbol used in the format. | +| `stil` | `'blue bold'` | The style used in the format. | | `disabled` | `true` | Disables the `azure` module. | -### Example +### Examples + +#### Display Subscription Name ```toml # ~/.config/starship.toml [azure] disabled = false -format = "on [$symbol($subscription)]($style) " +format = 'on [$symbol($subscription)]($style) ' +symbol = 'ﴃ ' +style = 'blue bold' +``` + +#### Display Username + +```toml +# ~/.config/starship.toml + +[azure] +disabled = false +format = "on [$symbol($username)]($style) " symbol = "ﴃ " style = "blue bold" ``` @@ -408,12 +463,12 @@ The `battery` module shows how charged the device's battery is and its current c | 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. | +| `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. | @@ -423,9 +478,9 @@ The `battery` module shows how charged the device's battery is and its current c # ~/.config/starship.toml [battery] -full_symbol = "🔋 " -charging_symbol = "⚡️ " -discharging_symbol = "💀 " +full_symbol = '🔋 ' +charging_symbol = '⚡️ ' +discharging_symbol = '💀 ' ``` ### Battery Display @@ -435,7 +490,7 @@ The `display` configuration option is used to define when the battery indicator ```toml [[battery.display]] threshold = 10 -style = "bold red" +style = 'bold red' ``` The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. @@ -447,21 +502,21 @@ The `display` option is an array of the following table. | Option | Default | Description | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | | `threshold` | `10` | The upper bound for the display option. | -| `stil` | `"red bold"` | The style used if the display option is in use. | +| `stil` | `'red bold'` | The style used if the display option is in use. | | `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. | | `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. | #### Example ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% threshold = 10 -style = "bold red" +style = 'bold red' -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% threshold = 30 -style = "bold yellow" -discharging_symbol = "💦" +style = 'bold yellow' +discharging_symbol = '💦' # when capacity is over 30%, the battery indicator will not be displayed ``` @@ -477,13 +532,13 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil | Option | Default | Description | | ------------------- | ----------------------------------------------- | ----------------------------------------------------- | -| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. | -| `version_format` | `"v${raw}"` | The version format. | -| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. | +| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. | +| `version_format` | `'v${raw}'` | The version format. | +| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | -| `stil` | `"bold blue"` | The style for the module. | +| `stil` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `elixir` module. | ### Variables @@ -502,7 +557,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil # ~/.config/starship.toml [buf] -symbol = "🦬 " +symbol = '🦬 ' ``` ## Bun @@ -516,13 +571,13 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🍞 "` | A format string representing the symbol of Node.js. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["bun.lockb", "bunfig.toml"]` | Which filenames should trigger this module. | +| `detect_files` | `['bun.lockb', 'bunfig.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `stil` | `"bold red"` | The style for the module. | +| `stil` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `bun` module. | ### Variables @@ -541,7 +596,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. # ~/.config/starship.toml [bun] -format = "via [🍔 $version](bold green) " +format = 'via [🍔 $version](bold green) ' ``` ## C @@ -552,14 +607,14 @@ The `c` module shows some information about your C compiler. By default the modu | Option | Default | Description | | ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version(-$name) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"C "` | The symbol used before displaying the compiler details | -| `detect_extensions` | `["c", "h"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ "cc", "--version" ], [ "gcc", "--version" ], [ "clang", "--version" ] ] | How to detect what the compiler is | -| `stil` | `"bold 149"` | The style for the module. | +| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | +| `stil` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `c` module. | ### Variables @@ -577,7 +632,7 @@ NB that `version` is not in the default format. The `commands` option accepts a list of commands to determine the compiler version and name. -Each command is represented as a list of the executable name, followed by its arguments, usually something like `["mycc", "--version"]`. Starship will try executing each command until it gets a result on STDOUT. +Each command is represented as a list of the executable name, followed by its arguments, usually something like `['mycc', '--version']`. Starship will try executing each command until it gets a result on STDOUT. If a C compiler is not supported by this module, you can request it by [raising an issue on GitHub](https://github.com/starship/starship/). @@ -587,7 +642,7 @@ If a C compiler is not supported by this module, you can request it by [raising # ~/.config/starship.toml [c] -format = "via [$name $version]($style)" +format = 'via [$name $version]($style)' ``` ## Character @@ -611,13 +666,13 @@ By default it only changes color. If you also want to change its shape take a lo | 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. | -| `vimcmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | -| `vimcmd_replace_one_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim `replace_one` mode. | -| `vimcmd_replace_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim replace mode. | -| `vimcmd_visual_symbol` | `"[❮](bold yellow)"` | The format string used before the text input if the shell is in vim replace mode. | +| `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. | +| `vimcmd_symbol` | `'[❮](bold green)'` | The format string used before the text input if the shell is in vim normal mode. | +| `vimcmd_replace_one_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim `replace_one` mode. | +| `vimcmd_replace_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim replace mode. | +| `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | | `disabled` | `false` | Disables the `character` module. | ### Variables @@ -634,8 +689,8 @@ By default it only changes color. If you also want to change its shape take a lo # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[✗](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[✗](bold red) ' ``` #### Without custom error shape @@ -644,8 +699,8 @@ error_symbol = "[✗](bold red) " # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[➜](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[➜](bold red) ' ``` #### With custom vim shape @@ -654,7 +709,7 @@ error_symbol = "[➜](bold red) " # ~/.config/starship.toml [character] -vicmd_symbol = "[V](bold green) " +vicmd_symbol = '[V](bold green) ' ``` ## CMake @@ -668,13 +723,13 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | Option | Default | Description | | ------------------- | -------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"△ "` | The symbol used before the version of cmake. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'△ '` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this module | -| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | +| `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | -| `stil` | `"bold blue"` | The style for the module. | +| `stil` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -698,11 +753,11 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `stil` | `"bold blue"` | The style for the module. | -| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Which extensions should trigger this module. | +| `symbol` | `'⚙️ '` | The symbol used before displaying the version of COBOL. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `stil` | `'bold blue'` | The style for the module. | +| `detect_extensions` | `['cbl', 'cob', 'CBL', 'COB']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `cobol` module. | @@ -735,8 +790,8 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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. | -| `stil` | `"bold yellow"` | The style for the module. | +| `format` | `'took [$duration]($style) '` | The format for the module. | +| `stil` | `'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). | @@ -758,7 +813,7 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec [cmd_duration] min_time = 500 -format = "underwent [$duration](bold yellow)" +format = 'underwent [$duration](bold yellow)' ``` ## Conda @@ -776,9 +831,9 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | 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. | -| `stil` | `"bold green"` | The style for the module. | -| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `symbol` | `'🅒 '` | The symbol used before the environment name. | +| `stil` | `'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. | @@ -798,7 +853,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c # ~/.config/starship.toml [conda] -format = "[$symbol$environment](dimmed green) " +format = '[$symbol$environment](dimmed green) ' ``` ## Container @@ -809,8 +864,8 @@ The `container` module displays a symbol and container name, if inside a contain | Option | Default | Description | | ---------- | ---------------------------------- | ----------------------------------------- | -| `symbol` | `"⬢"` | The symbol shown, when inside a container | -| `stil` | `"bold red dimmed"` | The style for the module. | +| `symbol` | `'⬢'` | The symbol shown, when inside a container | +| `stil` | `'bold red dimmed'` | The style for the module. | | `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `container` module. | @@ -844,12 +899,12 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `stil` | `"bold red"` | The style for the module. | -| `detect_extensions` | `["cr"]` | Which extensions should trigger this module. | -| `detect_files` | `["shard.yml"]` | Which filenames should trigger this module. | +| `symbol` | `'🔮 '` | The symbol used before displaying the version of crystal. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `stil` | `'bold red'` | The style for the module. | +| `detect_extensions` | `['cr']` | Which extensions should trigger this module. | +| `detect_files` | `['shard.yml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `crystal` module. | @@ -869,7 +924,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// # ~/.config/starship.toml [crystal] -format = "via [✨ $version](bold blue) " +format = 'via [✨ $version](bold blue) ' ``` ## Daml @@ -882,12 +937,12 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"Λ "` | A format string representing the symbol of Daml | -| `stil` | `"bold cyan"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'Λ '` | A format string representing the symbol of Daml | +| `stil` | `'bold cyan'` | The style for the module. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['daml.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `daml` module. | @@ -907,7 +962,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d # ~/.config/starship.toml [daml] -format = "via [D $version](bold bright-green) " +format = 'via [D $version](bold bright-green) ' ``` ## Dart @@ -922,13 +977,13 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | Option | Default | Description | | ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `detect_extensions` | `["dart"]` | Which extensions should trigger this module. | -| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".dart_tool"]` | Which folders should trigger this module. | -| `stil` | `"bold blue"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🎯 '` | A format string representing the symbol of Dart | +| `detect_extensions` | `['dart']` | Which extensions should trigger this module. | +| `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | Which filenames should trigger this module. | +| `detect_folders` | `['.dart_tool']` | Which folders should trigger this module. | +| `stil` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -947,7 +1002,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d # ~/.config/starship.toml [dart] -format = "via [🔰 $version](bold red) " +format = 'via [🔰 $version](bold red) ' ``` ## Deno @@ -960,13 +1015,13 @@ The `deno` module shows you your currently installed version of [Deno](https://d | Option | Default | Description | | ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦕 "` | A format string representing the symbol of Deno | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦕 '` | A format string representing the symbol of Deno | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["deno.json", "deno.jsonc", "mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. | +| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `stil` | `"green bold"` | The style for the module. | +| `stil` | `'green bold'` | The style for the module. | | `disabled` | `false` | Disables the `deno` module. | ### Variables @@ -983,7 +1038,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d # ~/.config/starship.toml [deno] -format = "via [🦕 $version](green bold) " +format = 'via [🦕 $version](green bold) ' ``` ## Directory @@ -996,20 +1051,21 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### 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. | -| `stil` | `"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: "…/" | -| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | -| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) | +| 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. | +| `stil` | `'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: '…/' | +| `before_repo_root_style` | | The style for the path segment above the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `'[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) '` | The format of a git repo when `before_repo_root_style` and `repo_root_style` is defined. | +| `home_symbol` | `'~'` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |

This module has a few advanced configuration options that control how the directory is displayed. @@ -1024,8 +1080,8 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ```toml [directory.substitutions] -"/Volumes/network/path" = "/net" -"src/com/long/java/path" = "mypath" +'/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`. @@ -1036,8 +1092,8 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | Variable | Example | Description | | --------- | --------------------- | ----------------------------------- | -| path | `"D:/Projects"` | The current directory path | -| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | +| 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 @@ -1048,11 +1104,11 @@ Let us consider the path `/path/to/home/git_repo/src/lib` | Variable | Example | Description | | ------------------ | --------------------- | --------------------------------------- | -| before_root_path | `"/path/to/home/"` | The path before git root directory path | -| repo_root | `"git_repo"` | The git root directory name | -| path | `"/src/lib"` | The remaining path | -| stil | `"black bold dimmed"` | Mirrors the value of option `style` | -| repo_root_style | `"underline white"` | Style for git root directory name | +| before_root_path | `'/path/to/home/'` | The path before git root directory path | +| repo_root | `'git_repo'` | The git root directory name | +| path | `'/src/lib'` | The remaining path | +| stil | `'black bold dimmed'` | Mirrors the value of option `style` | +| repo_root_style | `'underline white'` | Style for git root directory name |
@@ -1063,7 +1119,7 @@ Let us consider the path `/path/to/home/git_repo/src/lib` [directory] truncation_length = 8 -truncation_symbol = "…/" +truncation_symbol = '…/' ``` ## Docker Context @@ -1074,13 +1130,13 @@ The `docker_context` module shows the currently active [Docker context](https:// | Option | Default | Description | | ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `format` | `'via [$symbol$context]($style) '` | The format for the module. | +| `symbol` | `'🐳 '` | The symbol used before displaying the Docker context. | | `only_with_files` | `true` | Only show when there's a match | | `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | +| `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | Which filenames should trigger this module (needs `only_with_files` to be true). | | `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | -| `stil` | `"blue bold"` | The style for the module. | +| `stil` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -1099,7 +1155,7 @@ The `docker_context` module shows the currently active [Docker context](https:// # ~/.config/starship.toml [docker_context] -format = "via [🐋 $context](blue bold)" +format = 'via [🐋 $context](blue bold)' ``` ## Dotnet @@ -1127,14 +1183,14 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$var_cluster" +'dev.local.cluster.k8s' = 'dev' +'.*/openshift-cluster/.*' = 'openshift' +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' [kubernetes.user_aliases] -"dev.local.cluster.k8s" = "dev" -"root/.*" = "root" +'dev.local.cluster.k8s' = 'dev' +'root/.*' = 'root' ``` Only show the module in directories that contain a `k8s` file. @@ -2121,14 +2249,14 @@ Long and automatically generated cluster names can be identified and shortened u ```toml [kubernetes.context_aliases] # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -".*/openshift-cluster/.*" = "openshift" +'.*/openshift-cluster/.*' = 'openshift' # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$var_cluster" +'.*/(?P[\\w-]+)/.*' = '$var_cluster' # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' ``` ## Line Break @@ -2159,8 +2287,8 @@ The `localip` module shows the IPv4 address of the primary network interface. | Option | Default | Description | | ---------- | ------------------------- | ------------------------------------------------------ | | `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | The format for the module. | -| `stil` | `"bold yellow"` | The style for the module. | +| `format` | `'[$localipv4]($style) '` | The format for the module. | +| `stil` | `'bold yellow'` | The style for the module. | | `disabled` | `true` | Disables the `localip` module. | ### Variables @@ -2179,7 +2307,7 @@ The `localip` module shows the IPv4 address of the primary network interface. [localip] ssh_only = false -format = "@[$localipv4](bold red) " +format = '@[$localipv4](bold red) ' disabled = false ``` @@ -2195,14 +2323,14 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | Option | Default | Description | | ------------------- | ------------------------------------ | -------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | -| `detect_extensions` | `["lua"]` | Which extensions should trigger this module. | -| `detect_files` | `[".lua-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["lua"]` | Which folders should trigger this module. | -| `stil` | `"bold blue"` | The style for the module. | -| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🌙 '` | A format string representing the symbol of Lua. | +| `detect_extensions` | `['lua']` | Which extensions should trigger this module. | +| `detect_files` | `['.lua-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['lua']` | Which folders should trigger this module. | +| `stil` | `'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 @@ -2221,7 +2349,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o # ~/.config/starship.toml [lua] -format = "via [🌕 $version](bold blue) " +format = 'via [🌕 $version](bold blue) ' ``` ## Memory Usage @@ -2241,9 +2369,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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. | -| `stil` | `"bold dimmed white"` | The style for the module. | +| `format` | `'via $symbol [${ram}( \| ${swap})]($style) '` | The format for the module. | +| `symbol` | `'🐏'` | The symbol used before displaying the memory usage. | +| `stil` | `'bold dimmed white'` | The style for the module. | | `disabled` | `true` | Disables the `memory_usage` module. | ### Variables @@ -2267,8 +2395,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y [memory_usage] disabled = false threshold = -1 -symbol = " " -style = "bold dimmed green" +symbol = ' ' +style = 'bold dimmed green' ``` ## Meson @@ -2282,10 +2410,10 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. | Option | Default | Description | | ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- | | `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | -| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. | -| `format` | `"via [$symbol$project]($style) "` | The format for the module. | -| `symbol` | `"⬢ "` | The symbol used before displaying the project name. | -| `stil` | `"blue bold"` | The style for the module. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | +| `format` | `'via [$symbol$project]($style) '` | The format for the module. | +| `symbol` | `'⬢ '` | The symbol used before displaying the project name. | +| `stil` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `meson` module. | ### Variables @@ -2305,9 +2433,9 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. [meson] disabled = false -truncation_symbol = "--" -symbol = " " -style = "bold dimmed green" +truncation_symbol = '--' +symbol = ' ' +style = 'bold dimmed green' ``` ## Mercurial Branch @@ -2318,11 +2446,11 @@ The `hg_branch` module shows the active branch of the repo in your current direc | Option | Default | Description | | ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | -| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | -| `stil` | `"bold purple"` | The style for the module. | -| `format` | `"on [$symbol$branch]($style) "` | The format for the module. | +| `symbol` | `' '` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `stil` | `'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 `N` graphemes | -| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a branch name was truncated. | | `disabled` | `true` | Disables the `hg_branch` module. | ### Variables @@ -2341,9 +2469,9 @@ The `hg_branch` module shows the active branch of the repo in your current direc # ~/.config/starship.toml [hg_branch] -format = "on [🌱 $branch](bold purple)" +format = 'on [🌱 $branch](bold purple)' truncation_length = 4 -truncation_symbol = "" +truncation_symbol = '' ``` ## Nim @@ -2359,13 +2487,13 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | -| `detect_extensions` | `["nim", "nims", "nimble"]` | Which extensions should trigger this module. | -| `detect_files` | `["nim.cfg"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'👑 '` | The symbol used before displaying the version of Nim. | +| `detect_extensions` | `['nim', 'nims', 'nimble']` | Which extensions should trigger this module. | +| `detect_files` | `['nim.cfg']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `stil` | `"bold yellow"` | The style for the module. | +| `stil` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `nim` module. | ### Variables @@ -2384,8 +2512,8 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang # ~/.config/starship.toml [nim] -style = "yellow" -symbol = "🎣 " +style = 'yellow' +symbol = '🎣 ' ``` ## Nix-shell @@ -2397,10 +2525,10 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | Option | Default | Description | | ------------ | ---------------------------------------------- | ----------------------------------------------------- | | `format` | `'via [$symbol$state( \($name\))]($style) '` | The format for the module. | -| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | -| `stil` | `"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. | +| `symbol` | `'❄️ '` | A format string representing the symbol of nix-shell. | +| `stil` | `'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 @@ -2421,8 +2549,8 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ [nix_shell] disabled = true -impure_msg = "[impure shell](bold red)" -pure_msg = "[pure shell](bold green)" +impure_msg = '[impure shell](bold red)' +pure_msg = '[pure shell](bold green)' format = 'via [☃️ $state( \($name\))](bold blue) ' ``` @@ -2441,13 +2569,13 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | Option | Default | Description | | ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string representing the symbol of Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts", "mts", "cts"]` | Which extensions should trigger this module. | -| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | -| `stil` | `"bold green"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string representing the symbol of Node.js. | +| `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Which extensions should trigger this module. | +| `detect_files` | `['package.json', '.node-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['node_modules']` | Which folders should trigger this module. | +| `stil` | `'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 package.json does not match the Node.js version. | @@ -2467,7 +2595,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n # ~/.config/starship.toml [nodejs] -format = "via [🤖 $version](bold green) " +format = 'via [🤖 $version](bold green) ' ``` ## OCaml @@ -2485,15 +2613,15 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | Option | Default | Description | | ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | -| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | -| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | -| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Which extensions should trigger this module. | -| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Which filenames should trigger this module. | -| `detect_folders` | `["_opam", "esy.lock"]` | Which folders should trigger this module. | -| `stil` | `"bold yellow"` | The style for the module. | +| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐫 '` | The symbol used before displaying the version of OCaml. | +| `global_switch_indicator` | `''` | The format string used to represent global OPAM switch. | +| `local_switch_indicator` | `'*'` | The format string used to represent local OPAM switch. | +| `detect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | Which extensions should trigger this module. | +| `detect_files` | `['dune', 'dune-project', 'jbuild', 'jbuild-ignore', '.merlin']` | Which filenames should trigger this module. | +| `detect_folders` | `['_opam', 'esy.lock']` | Which folders should trigger this module. | +| `stil` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `ocaml` module. | ### Variables @@ -2514,7 +2642,43 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam # ~/.config/starship.toml [ocaml] -format = "via [🐪 $version]($style) " +format = 'via [🐪 $version]($style) ' +``` + +## Open Policy Agent + +The `opa` module shows the currently installed version of the OPA tool. By default the module will be shown if the current directory contains a `.rego` file. + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | +| `detect_extensions` | `['rego']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `stil` | `'bold blue'` | The style for the module. | +| `disabled` | `false` | Disables the `opa` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.44.0` | The version of `opa` | +| symbol | | Mirrors the 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 + +[opa] +format = 'via [⛑️ $version](bold red) ' ``` ## OpenStack @@ -2526,8 +2690,8 @@ The `openstack` module shows the current OpenStack cloud and project. The module | Option | Default | Description | | ---------- | ----------------------------------------------- | -------------------------------------------------------------- | | `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | -| `stil` | `"bold yellow"` | The style for the module. | +| `symbol` | `'☁️ '` | The symbol used before displaying the current OpenStack cloud. | +| `stil` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `openstack` module. | ### Variables @@ -2548,8 +2712,105 @@ The `openstack` module shows the current OpenStack cloud and project. The module [openstack] format = 'on [$symbol$cloud(\($project\))]($style) ' -style = "bold yellow" -symbol = "☁️ " +style = 'bold yellow' +symbol = '☁️ ' +``` + +## OS + +The `os` module shows the current operating system. OS information is detected via the [os_info](https://lib.rs/crates/os_info) crate. + +::: uyarı + +The [os_info](https://lib.rs/crates/os_info) crate used by this module is known to be inaccurate on some systems. + +::: + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ---------- | --------------------- | ------------------------------------------------------ | +| `format` | `"[$symbol]($style)"` | The format for the module. | +| `stil` | `"bold white"` | The style for the module. | +| `disabled` | `true` | Disables the `os` module. | +| `symbols` | | A table that maps each operating system to its symbol. | + +`symbols` allows you to define arbitrary symbols to display for each operating system type. Operating system types not defined by your configuration use the default symbols table below. All operating systems currently supported by the module are listed below. If you would like an operating system to be added, feel free to open a [feature request](https://github.com/starship/starship/issues/new/choose). + +```toml +# This is the default symbols table. +[os.symbols] +Alpine = "🏔️ " +Amazon = "🙂 " +Android = "🤖 " +Arch = "🎗️ " +CentOS = "💠 " +Debian = "🌀 " +DragonFly = "🐉 " +Emscripten = "🔗 " +EndeavourOS = "🚀 " +Fedora = "🎩 " +FreeBSD = "😈 " +Garuda = "🦅 " +Gentoo = "🗜️ " +HardenedBSD = "🛡️ " +Illumos = "🐦 " +Linux = "🐧 " +Macos = "🍎 " +Manjaro = "🥭 " +Mariner = "🌊 " +MidnightBSD = "🌘 " +Mint = "🌿 " +NetBSD = "🚩 " +NixOS = "❄️ " +OpenBSD = "🐡 " +openSUSE = "🦎 " +OracleLinux = "🦴 " +Pop = "🍭 " +Raspbian = "🍓 " +Redhat = "🎩 " +RedHatEnterprise = "🎩 " +Redox = "🧪 " +Solus = "⛵ " +SUSE = "🦎 " +Ubuntu = "🎯 " +Unknown = "❓ " +Windows = "🪟 " +``` + +### Variables + +| Variable | Example | Description | +| --------- | ------------ | ------------------------------------------------------------------ | +| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | +| name | `Arch Linux` | The current operating system name | +| type | `Arch` | The current operating system type | +| codename | | The current operating system codename, if applicable | +| edition | | The current operating system edition, if applicable | +| version | | The current operating system version, if applicable | +| 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 + +[os] +format = "on [($name )]($style)" +style = "bold blue" +disabled = false + +[os.symbols] +Windows = " " +Arch = "Arch is the best! " ``` ## Package Version @@ -2580,10 +2841,10 @@ The `package` module is shown when the current directory is the repository for a | Option | Default | Description | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"is [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `stil` | `"bold 208"` | The style for the module. | +| `format` | `'is [$symbol$version]($style) '` | The format for the module. | +| `symbol` | `'📦 '` | The symbol used before displaying the version the package. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `stil` | `'bold 208'` | The style for the module. | | `display_private` | `false` | Enable displaying version for packages marked as private. | | `disabled` | `false` | Disables the `package` module. | @@ -2603,7 +2864,7 @@ The `package` module is shown when the current directory is the repository for a # ~/.config/starship.toml [package] -format = "via [🎁 $version](208 bold) " +format = 'via [🎁 $version](208 bold) ' ``` ## Perl @@ -2620,13 +2881,13 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe | Option | Default | Description | | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | -| `detect_extensions` | `["pl", "pm", "pod"]` | Which extensions should trigger this module. | -| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | +| `detect_extensions` | `['pl', 'pm', 'pod']` | Which extensions should trigger this module. | +| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `stil` | `"bold 149"` | The style for the module. | +| `stil` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `perl` module. | ### Variables @@ -2643,7 +2904,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe # ~/.config/starship.toml [perl] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## PHP @@ -2658,13 +2919,13 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | -| `detect_extensions` | `["php"]` | Which extensions should trigger this module. | -| `detect_files` | `["composer.json", ".php-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐘 '` | The symbol used before displaying the version of PHP. | +| `detect_extensions` | `['php']` | Which extensions should trigger this module. | +| `detect_files` | `['composer.json', '.php-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `stil` | `"147 bold"` | The style for the module. | +| `stil` | `'147 bold'` | The style for the module. | | `disabled` | `false` | Disables the `php` module. | ### Variables @@ -2683,7 +2944,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. # ~/.config/starship.toml [php] -format = "via [🔹 $version](147 bold) " +format = 'via [🔹 $version](147 bold) ' ``` ## Pulumi @@ -2705,10 +2966,10 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string shown before the Pulumi stack. | -| `stil` | `"bold 5"` | The style for the module. | +| `format` | `'via [$symbol($username@)$stack]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string shown before the Pulumi stack. | +| `stil` | `'bold 5'` | The style for the module. | | `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | | `disabled` | `false` | Disables the `pulumi` module. | @@ -2732,7 +2993,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [pulumi] -format = "[🛥 ($version )$stack]($style) " +format = '[🛥 ($version )$stack]($style) ' ``` #### Without Pulumi version @@ -2740,8 +3001,8 @@ format = "[🛥 ($version )$stack]($style) " ```toml # ~/.config/starship.toml [pulumi] -symbol = "🛥 " -format = "[$symbol$stack]($style) " +symbol = '🛥 ' +format = '[$symbol$stack]($style) ' ``` ## PureScript @@ -2755,13 +3016,13 @@ The `purescript` module shows the currently installed version of [PureScript](ht | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | -| `detect_extensions` | `["purs"]` | Which extensions should trigger this module. | -| `detect_files` | `["spago.dhall"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'<=> '` | The symbol used before displaying the version of PureScript. | +| `detect_extensions` | `['purs']` | Which extensions should trigger this module. | +| `detect_files` | `['spago.dhall']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `stil` | `"bold white"` | The style for the module. | +| `stil` | `'bold white'` | The style for the module. | | `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -2780,7 +3041,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht # ~/.config/starship.toml [purescript] -format = "via [$symbol$version](bold white)" +format = 'via [$symbol$version](bold white)' ``` ## Python @@ -2806,14 +3067,14 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | | `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `stil` | `"yellow bold"` | The style for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐍 '` | A format string representing the symbol of Python | +| `stil` | `'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 | -| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `detect_extensions` | `["py"]` | Which extensions should trigger this module | -| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module | +| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | +| `detect_extensions` | `['py']` | Which extensions should trigger this module | +| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | | `disabled` | `false` | Disables the `python` module. | @@ -2821,7 +3082,7 @@ By default the module will be shown if any of the following conditions are met: 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. +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. ::: @@ -2829,11 +3090,11 @@ The default values and order for `python_binary` was chosen to first identify th | Variable | Example | Description | | ------------ | --------------- | ------------------------------------------ | -| version | `"v3.8.1"` | The version of `python` | -| symbol | `"🐍 "` | Mirrors the value of option `symbol` | -| stil | `"yellow bold"` | Mirrors the value of option `style` | -| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | -| virtualenv | `"venv"` | The current `virtualenv` name | +| version | `'v3.8.1'` | The version of `python` | +| symbol | `'🐍 '` | Mirrors the value of option `symbol` | +| stil | `'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 @@ -2841,7 +3102,7 @@ The default values and order for `python_binary` was chosen to first identify th # ~/.config/starship.toml [python] -symbol = "👾 " +symbol = '👾 ' pyenv_version_name = true ``` @@ -2850,7 +3111,7 @@ pyenv_version_name = true [python] # Only use the `python3` binary to get the version. -python_binary = "python3" +python_binary = 'python3' ``` ```toml @@ -2869,7 +3130,7 @@ detect_extensions = [] # # Note this will only work when the venv is inside the project and it will only # work in the directory that contains the venv dir but maybe this is ok? -python_binary = ["./venv/bin/python", "python", "python3", "python2"] +python_binary = ['./venv/bin/python', 'python', 'python3', 'python2'] ``` ## R @@ -2888,13 +3149,13 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"📐"` | A format string representing the symbol of R. | -| `stil` | `"blue bold"` | The style for the module. | -| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module | -| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module | -| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'📐'` | A format string representing the symbol of R. | +| `stil` | `'blue bold'` | The style for the module. | +| `detect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | Which extensions should trigger this module | +| `detect_files` | `['.Rprofile']` | Which filenames should trigger this module | +| `detect_folders` | `['.Rproj.user']` | Which folders should trigger this module | | `disabled` | `false` | Disables the `r` module. | ### Variables @@ -2903,7 +3164,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | -------- | ------------- | ------------------------------------ | | version | `v4.0.5` | The version of `R` | | symbol | | Mirrors the value of option `symbol` | -| stil | `"blue bold"` | Mirrors the value of option `style` | +| stil | `'blue bold'` | Mirrors the value of option `style` | ### Example @@ -2911,7 +3172,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr # ~/.config/starship.toml [rlang] -format = "with [📐 $version](blue bold) " +format = 'with [📐 $version](blue bold) ' ``` ## Raku @@ -2925,13 +3186,13 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra | Option | Default | Description | | ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version-$vm_version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦋 "` | The symbol used before displaying the version of Raku | -| `detect_extensions` | `["p6", "pm6", "pod6", "raku", "rakumod"]` | Which extensions should trigger this module. | -| `detect_files` | `["META6.json"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version-$vm_version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦋 '` | The symbol used before displaying the version of Raku | +| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Which extensions should trigger this module. | +| `detect_files` | `['META6.json']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `stil` | `"bold 149"` | The style for the module. | +| `stil` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `raku` module. | ### Variables @@ -2949,7 +3210,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra # ~/.config/starship.toml [raku] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## Red @@ -2962,13 +3223,13 @@ By default the `red` module shows the currently installed version of [Red](https | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | -| `detect_extensions` | `["red"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🔺 '` | A format string representing the symbol of Red. | +| `detect_extensions` | `['red']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `stil` | `"red bold"` | The style for the module. | +| `stil` | `'red bold'` | The style for the module. | | `disabled` | `false` | Disables the `red` module. | ### Variables @@ -2987,7 +3248,7 @@ By default the `red` module shows the currently installed version of [Red](https # ~/.config/starship.toml [red] -symbol = "🔴 " +symbol = '🔴 ' ``` ## Ruby @@ -3005,14 +3266,14 @@ Starship gets the current Ruby version by running `ruby -v`. | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. | -| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💎 '` | A format string representing the symbol of Ruby. | +| `detect_extensions` | `['rb']` | Which extensions should trigger this module. | +| `detect_files` | `['Gemfile', '.ruby-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | -| `stil` | `"bold red"` | The style for the module. | +| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Which environment variables should trigger this module. | +| `stil` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `ruby` module. | ### Variables @@ -3031,7 +3292,7 @@ Starship gets the current Ruby version by running `ruby -v`. # ~/.config/starship.toml [ruby] -symbol = "🔺 " +symbol = '🔺 ' ``` ## Rust @@ -3045,13 +3306,13 @@ By default the `rust` module shows the currently installed version of [Rust](htt | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. | -| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦀 '` | A format string representing the symbol of Rust | +| `detect_extensions` | `['rs']` | Which extensions should trigger this module. | +| `detect_files` | `['Cargo.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `stil` | `"bold red"` | The style for the module. | +| `stil` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -3072,7 +3333,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt # ~/.config/starship.toml [rust] -format = "via [⚙️ $version](red bold)" +format = 'via [⚙️ $version](red bold)' ``` ## Scala @@ -3087,13 +3348,13 @@ The `scala` module shows the currently installed version of [Scala](https://www. | Option | Default | Description | | ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | -| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | -| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | -| `stil` | `"red dimmed"` | The style for the module. | +| `format` | `'via [${symbol}(${version} )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. | +| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. | +| `detect_folders` | `['.metals']` | Which folders should trigger this modules. | +| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. | +| `stil` | `'red dimmed'` | The style for the module. | | `disabled` | `false` | Disables the `scala` module. | ### Variables @@ -3112,7 +3373,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. # ~/.config/starship.toml [scala] -symbol = "🌟 " +symbol = '🌟 ' ``` ## Shell @@ -3129,19 +3390,19 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `"bsh"` | A format string used to represent bash. | -| `fish_indicator` | `"fsh"` | A format string used to represent fish. | -| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. | -| `powershell_indicator` | `"psh"` | A format string used to represent powershell. | -| `ion_indicator` | `"ion"` | A format string used to represent ion. | -| `elvish_indicator` | `"esh"` | A format string used to represent elvish. | -| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. | -| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. | -| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. | -| `nu_indicator` | `"nu"` | A format string used to represent nu. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `"[$indicator]($style) "` | The format for the module. | -| `stil` | `"white bold"` | The style for the module. | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `stil` | `'white bold'` | The style for the module. | | `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3159,26 +3420,26 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [shell] -fish_indicator = "" -powershell_indicator = "_" -unknown_indicator = "mystery shell" -style = "cyan bold" +fish_indicator = '' +powershell_indicator = '_' +unknown_indicator = 'mystery shell' +style = 'cyan bold' disabled = false ``` ## SHLVL -The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ('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`. | +| `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. | -| `stil` | `"bold yellow"` | The style for the module. | +| `stil` | `'bold yellow'` | The style for the module. | | `disabled` | `true` | Disables the `shlvl` module. | ### Variables @@ -3198,7 +3459,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int [shlvl] disabled = false -format = "$shlvl level(s) down" +format = '$shlvl level(s) down' threshold = 3 ``` @@ -3211,8 +3472,8 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | Option | Default | Description | | ---------- | -------------------------------- | ------------------------------------------------ | | `format` | `'[$symbol\[$env\]]($style) '` | The format for the module. | -| `symbol` | `""` | A format string displayed before the image name. | -| `stil` | `"bold dimmed blue"` | The style for the module. | +| `symbol` | `''` | A format string displayed before the image name. | +| `stil` | `'bold dimmed blue'` | The style for the module. | | `disabled` | `false` | Disables the `singularity` module. | ### Variables @@ -3243,9 +3504,9 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | Option | Default | Description | | ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | The number of directories the environment path should be truncated to. `0` means no truncation. Also see the [`directory`](#directory) module. | -| `symbol` | `"🅢 "` | The symbol used before the environment name. | -| `stil` | `"bold blue"` | The style for the module. | -| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `symbol` | `'🅢 '` | The symbol used before the environment name. | +| `stil` | `'bold blue'` | The style for the module. | +| `format` | `'via [$symbol$environment]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `spack` module. | ### Variables @@ -3264,7 +3525,7 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat # ~/.config/starship.toml [spack] -format = "[$symbol$environment](dimmed blue) " +format = '[$symbol$environment](dimmed blue) ' ``` ## Status @@ -3281,14 +3542,14 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `format` | `"[$symbol$status]($style) "` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `success_symbol` | `""` | The symbol displayed on program success | -| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | -| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | -| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | -| `stil` | `"bold red"` | The style for the module. | +| `format` | `'[$symbol$status]($style) '` | The format of the module | +| `symbol` | `'❌'` | The symbol displayed on program error | +| `success_symbol` | `''` | The symbol displayed on program success | +| `not_executable_symbol` | `'🚫'` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `'🔍'` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `'🧱'` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `'⚡'` | The symbol displayed on any signal | +| `stil` | `'bold red'` | The style for the module. | | `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code | | `pipestatus` | `false` | Enable pipestatus reporting | @@ -3320,9 +3581,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [status] -style = "bg:blue" -symbol = "🔴 " -success_symbol = "🟢 SUCCESS" +style = 'bg:blue' +symbol = '🔴 ' +success_symbol = '🟢 SUCCESS' format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false @@ -3342,9 +3603,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | --------------- | ------------------------ | ------------------------------------------------------- | -| `format` | `"[as $symbol]($style)"` | The format of the module | -| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached | -| `stil` | `"bold blue"` | The style for the module. | +| `format` | `'[as $symbol]($style)'` | The format of the module | +| `symbol` | `'🧙 '` | The symbol displayed when credentials are cached | +| `stil` | `'bold blue'` | The style for the module. | | `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | | `disabled` | `true` | Disables the `sudo` module. | @@ -3363,8 +3624,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [sudo] -style = "bold green" -symbol = "👩‍💻 " +style = 'bold green' +symbol = '👩‍💻 ' disabled = false ``` @@ -3388,13 +3649,13 @@ By default the `swift` module shows the currently installed version of [Swift](h | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `detect_extensions` | `["swift"]` | Which extensions should trigger this module. | -| `detect_files` | `["Package.swift"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐦 '` | A format string representing the symbol of Swift | +| `detect_extensions` | `['swift']` | Which extensions should trigger this module. | +| `detect_files` | `['Package.swift']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `stil` | `"bold 202"` | The style for the module. | +| `stil` | `'bold 202'` | The style for the module. | | `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -3413,7 +3674,7 @@ By default the `swift` module shows the currently installed version of [Swift](h # ~/.config/starship.toml [swift] -format = "via [🏎 $version](red bold)" +format = 'via [🏎 $version](red bold)' ``` ## Terraform @@ -3435,13 +3696,13 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol$workspace]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💠'` | A format string shown before the terraform workspace. | +| `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | -| `stil` | `"bold 105"` | The style for the module. | +| `detect_folders` | `['.terraform']` | Which folders should trigger this module. | +| `stil` | `'bold 105'` | The style for the module. | | `disabled` | `false` | Disables the `terraform` module. | ### Variables @@ -3463,7 +3724,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [terraform] -format = "[🏎💨 $version$workspace]($style) " +format = '[🏎💨 $version$workspace]($style) ' ``` #### Without Terraform version @@ -3472,7 +3733,7 @@ format = "[🏎💨 $version$workspace]($style) " # ~/.config/starship.toml [terraform] -format = "[🏎💨 $workspace]($style) " +format = '[🏎💨 $workspace]($style) ' ``` ## Time @@ -3489,15 +3750,15 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | The format string for the module. | +| `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. | -| `stil` | `"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. | +| `stil` | `'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 | +| `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. +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 @@ -3516,9 +3777,9 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de [time] disabled = false format = '🕙[\[ $time \]]($style) ' -time_format = "%T" -utc_time_offset = "-5" -time_range = "10:00:00-14:00:00" +time_format = '%T' +utc_time_offset = '-5' +time_range = '10:00:00-14:00:00' ``` ## Username @@ -3540,9 +3801,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Option | Default | Description | | ------------- | ----------------------- | ------------------------------------------- | -| `style_root` | `"bold red"` | The style used when the user is root/admin. | -| `style_user` | `"bold yellow"` | The style used for non-root users. | -| `format` | `"[$user]($style) in "` | The format for the module. | +| `style_root` | `'bold red'` | The style used when the user is root/admin. | +| `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. | @@ -3550,8 +3811,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Variable | Example | Description | | -------- | ------------ | ------------------------------------------------------------------------------------------- | -| `stil` | `"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. | +| `stil` | `'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 @@ -3559,9 +3820,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` # ~/.config/starship.toml [username] -style_user = "white bold" -style_root = "black bold" -format = "user: [$user]($style) " +style_user = 'white bold' +style_root = 'black bold' +format = 'user: [$user]($style) ' disabled = false show_always = true ``` @@ -3576,13 +3837,13 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'⍱ '` | A format string representing the symbol of Vagrant. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["Vagrantfile"]` | Which filenames should trigger this module. | +| `detect_files` | `['Vagrantfile']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `stil` | `"cyan bold"` | The style for the module. | +| `stil` | `'cyan bold'` | The style for the module. | | `disabled` | `false` | Disables the `vagrant` module. | ### Variables @@ -3601,7 +3862,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// # ~/.config/starship.toml [vagrant] -format = "via [⍱ $version](bold white) " +format = 'via [⍱ $version](bold white) ' ``` ## V @@ -3615,13 +3876,13 @@ The `vlang` module shows you your currently installed version of [V](https://vla | Option | Default | Description | | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"V "` | A format string representing the symbol of V | -| `detect_extensions` | `["v"]` | Which extensions should trigger this module. | -| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'V '` | A format string representing the symbol of V | +| `detect_extensions` | `['v']` | Which extensions should trigger this module. | +| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `stil` | `"blue bold"` | The style for the module. | +| `stil` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `vlang` module. | ### Variables @@ -3637,7 +3898,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla ```toml # ~/.config/starship.toml [vlang] -format = "via [V $version](blue bold) " +format = 'via [V $version](blue bold) ' ``` ## VCSH @@ -3648,9 +3909,9 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | Option | Default | Description | | ---------- | -------------------------------- | ------------------------------------------------------ | -| `symbol` | | The symbol used before displaying the repository name. | -| `stil` | `"bold yellow"` | The style for the module. | -| `format` | `"vcsh [$symbol$repo]($style) "` | The format for the module. | +| `symbol` | `''` | The symbol used before displaying the repository name. | +| `stil` | `'bold yellow'` | The style for the module. | +| `format` | `'vcsh [$symbol$repo]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `vcsh` module. | ### Variables @@ -3669,7 +3930,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v # ~/.config/starship.toml [vcsh] -format = "[🆅 $repo](bold blue) " +format = '[🆅 $repo](bold blue) ' ``` ## Zig @@ -3682,12 +3943,12 @@ By default the the `zig` module shows the currently installed version of [Zig](h | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `stil` | `"bold yellow"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'↯ '` | The symbol used before displaying the version of Zig. | +| `stil` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `zig` module. | -| `detect_extensions` | `["zig"]` | Which extensions should trigger this module. | +| `detect_extensions` | `['zig']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -3707,7 +3968,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h # ~/.config/starship.toml [zig] -symbol = "⚡️ " +symbol = '⚡️ ' ``` ## Custom commands @@ -3752,16 +4013,16 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | Option | Default | Description | | ------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `command` | `''` | The command whose output should be printed. The command will be passed on stdin to the shell. | | `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `description` | `""` | The description of the module that is shown when running `starship explain`. | +| `description` | `''` | The description of the module that is shown when running `starship explain`. | | `detect_files` | `[]` | The files that will be searched in the working directory for a match. | | `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. | | `detect_extensions` | `[]` | The extensions that will be searched in the working directory for a match. | -| `symbol` | `""` | The symbol used before displaying the command output. | -| `stil` | `"bold green"` | The style for the module. | -| `format` | `"[$symbol($output )]($style)"` | The format for the module. | +| `symbol` | `''` | The symbol used before displaying the command output. | +| `stil` | `'bold green'` | The style for the module. | +| `format` | `'[$symbol($output )]($style)'` | The format for the module. | | `disabled` | `false` | Disables this `custom` module. | | `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | | `use_stdin` | | An optional boolean value that overrides whether commands should be forwarded to the shell via the standard input or as an argument. If unset standard input is used by default, unless the shell does not support it (cmd, nushell). Setting this disables shell-specific argument handling. | @@ -3784,14 +4045,14 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt - 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. +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 -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. ```toml -shell = ["pwsh", "-Command", "-"] +shell = ['pwsh', '-Command', '-'] ``` ::: warning Make sure your custom shell configuration exits gracefully @@ -3812,19 +4073,19 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -detect_files = ["foo"] # can specify filters but wildcards are not supported -when = """ test "$HOME" = "$PWD" """ -format = " transcending [$output]($style)" +command = 'echo foo' # shows output of command +detect_files = ['foo'] # can specify filters but wildcards are not supported +when = ''' test "$HOME" = "$PWD" ''' +format = ' transcending [$output]($style)' [custom.time] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command', '-'] [custom.time-as-arg] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command'] use_stdin = false ``` diff --git a/docs/tr-TR/guide/README.md b/docs/tr-TR/guide/README.md index 35be2e2a..410c56a2 100644 --- a/docs/tr-TR/guide/README.md +++ b/docs/tr-TR/guide/README.md @@ -219,7 +219,6 @@ Alternatif olarak aşağıdaki paket yöneticileri ile de Starship'i yükleyebil | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | | Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | -| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | @@ -417,6 +416,14 @@ Lütfen starship'in oluşmasında ilham kaynağı olan çalışmalara da göz at - **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons. +## ❤️ Sponsors + +Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website. + +**Supporter Tier** + +- [Dimension](https://dimension.dev/) +


Starship roket simgesi diff --git a/docs/tr-TR/presets/README.md b/docs/tr-TR/presets/README.md index 77ce8192..1880a133 100644 --- a/docs/tr-TR/presets/README.md +++ b/docs/tr-TR/presets/README.md @@ -10,6 +10,14 @@ This preset changes the symbols for each module to use Nerd Font symbols. [![Screenshot of Nerd Font Symbols preset](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font) +## [No Nerd Fonts](./no-nerd-font.md) + +This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt. + +::: tip This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). ::: + +[Click to view No Nerd Font preset](./no-nerd-font) + ## [Bracketed Segments](./bracketed-segments.md) This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.). @@ -28,6 +36,12 @@ This preset hides the version of language runtimes. If you work in containers or [![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes) +## [No Empty Icons](./no-empty-icons.md) + +This preset does not show icons if the toolset is not found. + +[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Click to view No Runtime Versions preset")](./no-empty-icons.md) + ## [Pure Prompt](./pure-preset.md) This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). @@ -39,3 +53,9 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship. [![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png "Click to view Pure Prompt preset")](./pastel-powerline) + +## [Tokyo Night](./tokyo-night.md) + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) diff --git a/docs/tr-TR/presets/no-empty-icons.md b/docs/tr-TR/presets/no-empty-icons.md new file mode 100644 index 00000000..986e8fba --- /dev/null +++ b/docs/tr-TR/presets/no-empty-icons.md @@ -0,0 +1,17 @@ +[Return to Presets](./README.md#no-empty-icons) + +# No Empty Icons Preset + +If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. + +![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) + +### Yapılandırma + +```sh +starship preset no-empty-icons > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-empty-icons.toml) + +<<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/tr-TR/presets/no-nerd-font.md b/docs/tr-TR/presets/no-nerd-font.md new file mode 100644 index 00000000..0d4f7b86 --- /dev/null +++ b/docs/tr-TR/presets/no-nerd-font.md @@ -0,0 +1,19 @@ +[Return to Presets](./README.md#no-nerd-fonts) + +# No Nerd Fonts Preset + +This preset restricts the use of symbols to those from emoji and powerline sets. + +This means that even without a Nerd Font installed, you should be able to view all module symbols. + +This preset will become the default preset in a future release of starship. + +### Yapılandırma + +```sh +starship preset no-nerd-font > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-nerd-font.toml) + +<<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/tr-TR/presets/tokyo-night.md b/docs/tr-TR/presets/tokyo-night.md new file mode 100644 index 00000000..ecb1e27e --- /dev/null +++ b/docs/tr-TR/presets/tokyo-night.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#pastel-powerline) + +# Tokyo Night Preset + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) + +### Ön koşullar + +- Terminalinizde bir [Nerd Font](https://www.nerdfonts.com/) yüklü ve etkin olmalı + +### Yapılandırma + +```sh +starship preset tokyo-night > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/tokyo-night.toml) + +<<< @/.vuepress/public/presets/toml/tokyo-night.toml diff --git a/docs/uk-UA/README.md b/docs/uk-UA/README.md index 57692d1a..e5ea61d2 100644 --- a/docs/uk-UA/README.md +++ b/docs/uk-UA/README.md @@ -36,6 +36,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p 1. Install the **starship** binary: + #### Install Latest Version With Shell: @@ -46,6 +47,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration. + #### Install via Package Manager With [Homebrew](https://brew.sh/): @@ -61,9 +63,10 @@ description: Starship is the minimal, blazing fast, and extremely customizable p 1. Add the init script to your shell's config file: + #### Bash - Add the following to the end of `~/.bashrc`: + Додайте наступний рядок наприкінці `~/.bashrc`: ```sh # ~/.bashrc @@ -71,9 +74,10 @@ description: Starship is the minimal, blazing fast, and extremely customizable p eval "$(starship init bash)" ``` + #### Fish - Add the following to the end of `~/.config/fish/config.fish`: + Додайте наступний рядок наприкінці `~/.config/fish/config.fish`: ```sh # ~/.config/fish/config.fish @@ -81,9 +85,10 @@ description: Starship is the minimal, blazing fast, and extremely customizable p starship init fish | source ``` + #### Zsh - Add the following to the end of `~/.zshrc`: + Додайте наступний рядок наприкінці `~/.zshrc`: ```sh # ~/.zshrc @@ -91,6 +96,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p 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. @@ -99,9 +105,10 @@ description: Starship is the minimal, blazing fast, and extremely customizable p Invoke-Expression (&starship init powershell) ``` + #### Ion - Add the following to the end of `~/.config/ion/initrc`: + Додайте наступний рядок наприкінці `~/.config/ion/initrc`: ```sh # ~/.config/ion/initrc @@ -109,6 +116,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p eval $(starship init ion) ``` + #### Elvish ::: warning @@ -117,7 +125,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p ::: - Add the following to the end of `~/.elvish/rc.elv`: + Додайте наступний рядок наприкінці `~/.elvish/rc.elv`: ```sh # ~/.elvish/rc.elv @@ -125,9 +133,10 @@ description: Starship is the minimal, blazing fast, and extremely customizable p eval (starship init elvish) ``` + #### Tcsh - Add the following to the end of `~/.tcshrc`: + Додайте наступний рядок наприкінці `~/.tcshrc`: ```sh # ~/.tcshrc @@ -135,6 +144,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p eval `starship init tcsh` ``` + #### Nushell ::: warning @@ -149,7 +159,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p starship init nu | save ~/.cache/starship/init.nu ``` - And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`): + Додайте наступний рядок наприкінці Вашої конфігурації Nushell (знайдіть її виконавши `$nu.config-path`): ```sh source ~/.cache/starship/init.nu @@ -157,7 +167,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Xonsh - Add the following to the end of `~/.xonshrc`: + Додайте наступний рядок наприкінці `~/.xonshrc`: ```sh # ~/.xonshrc @@ -165,9 +175,10 @@ description: Starship is the minimal, blazing fast, and extremely customizable p execx($(starship init xonsh)) ``` + #### Cmd - You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: + Вам потрібно використовувати [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) разом з Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: ```lua -- starship.lua diff --git a/docs/uk-UA/advanced-config/README.md b/docs/uk-UA/advanced-config/README.md index 3e45a887..9a8b0fff 100644 --- a/docs/uk-UA/advanced-config/README.md +++ b/docs/uk-UA/advanced-config/README.md @@ -205,7 +205,9 @@ Some shells support a right prompt which renders on the same line as the input. Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](/config/#fill). -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. + +Note: Nushell 0.71.0 or later is required ### Example @@ -280,5 +282,5 @@ If multiple colors are specified for foreground/background, the last one in the Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: - Many terminals disable support for `blink` by default -- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564). +- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). - `strikethrough` is not supported by the default macOS Terminal.app diff --git a/docs/uk-UA/config/README.md b/docs/uk-UA/config/README.md index 7a665753..63a5e67b 100644 --- a/docs/uk-UA/config/README.md +++ b/docs/uk-UA/config/README.md @@ -15,15 +15,17 @@ All configuration for starship is done in this [TOML](https://github.com/toml-la # Inserts a blank line between shell prompts add_newline = true -# Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +# 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 ``` +### Config File Location + You can change default configuration file location with `STARSHIP_CONFIG` environment variable: ```sh @@ -70,6 +72,62 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. +### Strings + +In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. + +The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. + +| Symbol | Type | Notes | +| ------ | ------------------------- | ------------------------------------------------------ | +| `'` | literal string | less escaping | +| `"` | string | more escaping | +| `'''` | multi-line literal string | less escaping | +| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | + +For example: + +```toml +# literal string +format = '☺\☻ ' + +# regular string +format = "☺\\☻ " + +# escaping Starship symbols +format = '\[\$\] ' +``` + +When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: + +```toml +# with literal string +format = ''' + +\$''' + +# with multiline basic string +format = """ + +\\$""" + +# with basic string +format = "\n\\$" +``` + +In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. + +```toml +format = """ +line1\ +line1\ +line1 +line2\ +line2\ +line2 +""" +``` + ### Format Strings Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. @@ -80,9 +138,9 @@ A variable contains a `$` symbol followed by the name of the variable. The name 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. +- `'$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 @@ -94,20 +152,20 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri 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. +- `'[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 +- `'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. @@ -117,43 +175,20 @@ A conditional format string wrapped in `(` and `)` will not render if all variab For example: -- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. -- `(some text)` will always show nothing since there are no variables wrapped in the braces. -- 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\] )`. - -#### Special characters - -The following symbols have special usage in a format string and must be escaped: `$ \ [ ] ( )`. - -Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). - -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 = ''' - -\$''' -``` +- `'(@$region)'` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. +- `'(some text)'` will always show nothing since there are no variables wrapped in the braces. +- When `$combined` is a shortcut for `\[$a$b\]`, `'($combined)'` will show nothing only if `$a` and `$b` are both `None`. This works the same as `'(\[$a$b\] )'`. ### Negative matching -Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched. +Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading '!' character. The presence of _any_ negative indicator in the directory will result in the module not being matched. Extensions are matched against both the characters after the last dot in a filename, and the characters after the first dot in a filename. For example, `foo.bar.tar.gz` will be matched against `bar.tar.gz` and `gz` in the `detect_extensions` variable. Files whose name begins with a dot are not considered to have extensions at all. To see how this works in practice, you could match TypeScript but not MPEG Transport Stream files thus: ```toml -detect_extensions = ["ts", "!video.ts", "!audio.ts"] +detect_extensions = ['ts', '!video.ts', '!audio.ts'] ``` ## Prompt @@ -165,11 +200,11 @@ This is the list of prompt-wide configuration options. | Option | Default | Description | | ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `format` | [link](#default-prompt-format) | Configure the format of the prompt. | -| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | +| `right_format` | `''` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | | `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Inserts blank line between shell prompts. | -| `palette` | `""` | Sets which color palette from `palettes` to use. | +| `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | ### Example @@ -178,10 +213,10 @@ This is the list of prompt-wide configuration options. # ~/.config/starship.toml # Use custom format -format = """ +format = ''' [┌───────────────────>](bold green) [│](bold green)$directory$rust$package -[└─>](bold green) """ +[└─>](bold green) ''' # Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 @@ -189,15 +224,15 @@ scan_timeout = 10 # Disable the blank line at the start of the prompt add_newline = false -# Set "foo" as custom color palette -palette = "foo" +# Set 'foo' as custom color palette +palette = 'foo' # Define custom colors [palettes.foo] # Overwrite existing color -blue = "21" +blue = '21' # Define new color -mustard = "#af8700" +mustard = '#af8700' ``` ### Default Prompt Format @@ -205,7 +240,7 @@ mustard = "#af8700" 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" +format = '$all' # Which is equivalent to format = """ @@ -236,7 +271,9 @@ $elixir\ $elm\ $erlang\ $golang\ +$guix_shell\ $haskell\ +$haxe\ $helm\ $java\ $julia\ @@ -245,6 +282,7 @@ $lua\ $nim\ $nodejs\ $ocaml\ +$opa\ $perl\ $php\ $pulumi\ @@ -281,6 +319,7 @@ $jobs\ $battery\ $time\ $status\ +$os\ $container\ $shell\ $character""" @@ -290,7 +329,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format = "$all$directory$character" +format = '$all$directory$character' ``` ## AWS @@ -305,28 +344,30 @@ When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. +When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. + ### Options -| Option | Default | Description | -| ------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| Option | Default | Description | +| ------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | -| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | -| `profile_aliases` | | Table of profile aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | The style for the module. | -| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | -| `disabled` | `false` | Disables the `AWS` module. | -| `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | +| `symbol` | `'☁️ '` | The symbol used before displaying the current AWS profile. | +| `region_aliases` | `{}` | Table of region aliases to display in addition to the AWS name. | +| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | +| `style` | `'bold yellow'` | The style for the module. | +| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | +| `disabled` | `false` | Disables the `AWS` module. | +| `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | ### Variables -| Variable | Example | Description | -| -------- | ---------------- | ------------------------------------------- | -| region | `ap-northeast-1` | The current AWS region | -| profile | `astronauts` | The current AWS profile | -| duration | `2h27m20s` | The temporary credentials validity duration | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | Description | +| --------- | ---------------- | ------------------------------------------- | +| region | `ap-northeast-1` | The current AWS region | +| profile | `astronauts` | The current AWS profile | +| duration | `2h27m20s` | The temporary credentials validity duration | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -339,11 +380,11 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL [aws] format = 'on [$symbol($profile )(\($region\) )]($style)' -style = "bold blue" -symbol = "🅰 " +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' [aws.profile_aliases] CompanyGroupFrobozzOnCallAccess = 'Frobozz' ``` @@ -354,12 +395,12 @@ CompanyGroupFrobozzOnCallAccess = 'Frobozz' # ~/.config/starship.toml [aws] -format = "on [$symbol$region]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$region]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' ``` #### Display profile @@ -368,34 +409,48 @@ us-east-1 = "va" # ~/.config/starship.toml [aws] -format = "on [$symbol$profile]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$profile]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.profile_aliases] Enterprise_Naming_Scheme-voidstars = 'void**' ``` ## Azure -The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription, as defined in the `~/.azure/azureProfile.json` file. +The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription or the username, as defined in the `~/.azure/azureProfile.json` file. ### Options | Variable | Default | Description | | ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `"on [$symbol($subscription)]($style) "` | The format for the Azure module to render. | -| `symbol` | `"ﴃ "` | The symbol used in the format. | -| `style` | `"blue bold"` | The style used in the format. | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'ﴃ '` | The symbol used in the format. | +| `style` | `'blue bold'` | The style used in the format. | | `disabled` | `true` | Disables the `azure` module. | -### Example +### Examples + +#### Display Subscription Name ```toml # ~/.config/starship.toml [azure] disabled = false -format = "on [$symbol($subscription)]($style) " +format = 'on [$symbol($subscription)]($style) ' +symbol = 'ﴃ ' +style = 'blue bold' +``` + +#### Display Username + +```toml +# ~/.config/starship.toml + +[azure] +disabled = false +format = "on [$symbol($username)]($style) " symbol = "ﴃ " style = "blue bold" ``` @@ -408,12 +463,12 @@ The `battery` module shows how charged the device's battery is and its current c | 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. | +| `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. | @@ -423,9 +478,9 @@ The `battery` module shows how charged the device's battery is and its current c # ~/.config/starship.toml [battery] -full_symbol = "🔋 " -charging_symbol = "⚡️ " -discharging_symbol = "💀 " +full_symbol = '🔋 ' +charging_symbol = '⚡️ ' +discharging_symbol = '💀 ' ``` ### Battery Display @@ -435,7 +490,7 @@ The `display` configuration option is used to define when the battery indicator ```toml [[battery.display]] threshold = 10 -style = "bold red" +style = 'bold red' ``` The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. @@ -447,21 +502,21 @@ The `display` option is an array of the following table. | Option | Default | Description | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | | `threshold` | `10` | The upper bound for the display option. | -| `style` | `"red bold"` | The style used if the display option is in use. | +| `style` | `'red bold'` | The style used if the display option is in use. | | `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. | | `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. | #### Example ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% threshold = 10 -style = "bold red" +style = 'bold red' -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% threshold = 30 -style = "bold yellow" -discharging_symbol = "💦" +style = 'bold yellow' +discharging_symbol = '💦' # when capacity is over 30%, the battery indicator will not be displayed ``` @@ -477,13 +532,13 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil | Option | Default | Description | | ------------------- | ----------------------------------------------- | ----------------------------------------------------- | -| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. | -| `version_format` | `"v${raw}"` | The version format. | -| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. | +| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. | +| `version_format` | `'v${raw}'` | The version format. | +| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | -| `style` | `"bold blue"` | The style for the module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `elixir` module. | ### Variables @@ -502,7 +557,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil # ~/.config/starship.toml [buf] -symbol = "🦬 " +symbol = '🦬 ' ``` ## Bun @@ -516,22 +571,22 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🍞 "` | A format string representing the symbol of Node.js. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["bun.lockb", "bunfig.toml"]` | Which filenames should trigger this module. | +| `detect_files` | `['bun.lockb', 'bunfig.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | The style for the module. | +| `style` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `bun` module. | ### Variables -| Variable | Example | Description | -| -------- | -------- | ------------------------------------ | -| version | `v0.1.4` | The version of `bun` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v0.1.4` | The version of `bun` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -541,7 +596,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. # ~/.config/starship.toml [bun] -format = "via [🍔 $version](bold green) " +format = 'via [🍔 $version](bold green) ' ``` ## C @@ -552,14 +607,14 @@ The `c` module shows some information about your C compiler. By default the modu | Option | Default | Description | | ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version(-$name) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"C "` | The symbol used before displaying the compiler details | -| `detect_extensions` | `["c", "h"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ "cc", "--version" ], [ "gcc", "--version" ], [ "clang", "--version" ] ] | How to detect what the compiler is | -| `style` | `"bold 149"` | The style for the module. | +| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | +| `style` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `c` module. | ### Variables @@ -577,7 +632,7 @@ NB that `version` is not in the default format. The `commands` option accepts a list of commands to determine the compiler version and name. -Each command is represented as a list of the executable name, followed by its arguments, usually something like `["mycc", "--version"]`. Starship will try executing each command until it gets a result on STDOUT. +Each command is represented as a list of the executable name, followed by its arguments, usually something like `['mycc', '--version']`. Starship will try executing each command until it gets a result on STDOUT. If a C compiler is not supported by this module, you can request it by [raising an issue on GitHub](https://github.com/starship/starship/). @@ -587,7 +642,7 @@ If a C compiler is not supported by this module, you can request it by [raising # ~/.config/starship.toml [c] -format = "via [$name $version]($style)" +format = 'via [$name $version]($style)' ``` ## Character @@ -611,13 +666,13 @@ By default it only changes color. If you also want to change its shape take a lo | 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. | -| `vimcmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | -| `vimcmd_replace_one_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim `replace_one` mode. | -| `vimcmd_replace_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim replace mode. | -| `vimcmd_visual_symbol` | `"[❮](bold yellow)"` | The format string used before the text input if the shell is in vim replace mode. | +| `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. | +| `vimcmd_symbol` | `'[❮](bold green)'` | The format string used before the text input if the shell is in vim normal mode. | +| `vimcmd_replace_one_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim `replace_one` mode. | +| `vimcmd_replace_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim replace mode. | +| `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | | `disabled` | `false` | Disables the `character` module. | ### Variables @@ -634,8 +689,8 @@ By default it only changes color. If you also want to change its shape take a lo # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[✗](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[✗](bold red) ' ``` #### Without custom error shape @@ -644,8 +699,8 @@ error_symbol = "[✗](bold red) " # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[➜](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[➜](bold red) ' ``` #### With custom vim shape @@ -654,7 +709,7 @@ error_symbol = "[➜](bold red) " # ~/.config/starship.toml [character] -vicmd_symbol = "[V](bold green) " +vicmd_symbol = '[V](bold green) ' ``` ## CMake @@ -668,22 +723,22 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | Option | Default | Description | | ------------------- | -------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"△ "` | The symbol used before the version of cmake. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'△ '` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this module | -| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | +| `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | -| `style` | `"bold blue"` | The style for the module. | +| `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` | +| 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 @@ -698,22 +753,22 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold blue"` | The style for the module. | -| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Which extensions should trigger this module. | +| `symbol` | `'⚙️ '` | The symbol used before displaying the version of COBOL. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold blue'` | The style for the module. | +| `detect_extensions` | `['cbl', 'cob', 'CBL', 'COB']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `cobol` module. | ### Variables -| Variable | Example | Description | -| -------- | ---------- | ------------------------------------ | -| version | `v3.1.2.0` | The version of `cobol` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v3.1.2.0` | The version of `cobol` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -735,8 +790,8 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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. | +| `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). | @@ -744,10 +799,10 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec ### Variables -| Variable | Example | Description | -| -------- | -------- | --------------------------------------- | -| duration | `16m40s` | The time it took to execute the command | -| style\* | | Mirrors the value of option `style` | +| 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 @@ -758,7 +813,7 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec [cmd_duration] min_time = 500 -format = "underwent [$duration](bold yellow)" +format = 'underwent [$duration](bold yellow)' ``` ## Conda @@ -776,9 +831,9 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | 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. | +| `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. | @@ -788,7 +843,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | ----------- | ------------ | ------------------------------------ | | environment | `astronauts` | The current conda environment | | symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -798,7 +853,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c # ~/.config/starship.toml [conda] -format = "[$symbol$environment](dimmed green) " +format = '[$symbol$environment](dimmed green) ' ``` ## Container @@ -807,20 +862,20 @@ The `container` module displays a symbol and container name, if inside a contain ### Options -| Option | Default | Description | -| ---------- | -------------------------------- | ----------------------------------------- | -| `symbol` | `"⬢"` | The symbol shown, when inside a container | -| `style` | `"bold red dimmed"` | The style for the module. | +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------- | +| `symbol` | `'⬢'` | The symbol shown, when inside a container | +| `style` | `'bold red dimmed'` | The style for the module. | | `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. | -| `disabled` | `false` | Disables the `container` module. | +| `disabled` | `false` | Disables the `container` module. | ### Variables -| Variable | Example | Description | -| -------- | ------------------- | ------------------------------------ | -| name | `fedora-toolbox:35` | The name of the container | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | Description | +| --------- | ------------------- | ------------------------------------ | +| name | `fedora-toolbox:35` | The name of the container | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -844,22 +899,22 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold red"` | The style for the module. | -| `detect_extensions` | `["cr"]` | Which extensions should trigger this module. | -| `detect_files` | `["shard.yml"]` | Which filenames should trigger this module. | +| `symbol` | `'🔮 '` | The symbol used before displaying the version of crystal. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold red'` | The style for the module. | +| `detect_extensions` | `['cr']` | Which extensions should trigger this module. | +| `detect_files` | `['shard.yml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `crystal` module. | ### 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` | +| 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 @@ -869,7 +924,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// # ~/.config/starship.toml [crystal] -format = "via [✨ $version](bold blue) " +format = 'via [✨ $version](bold blue) ' ``` ## Daml @@ -882,22 +937,22 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"Λ "` | A format string representing the symbol of Daml | -| `style` | `"bold cyan"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'Λ '` | A format string representing the symbol of Daml | +| `style` | `'bold cyan'` | The style for the module. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['daml.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `daml` module. | ### Variables -| Variable | Example | Description | -| -------- | -------- | ------------------------------------ | -| version | `v2.2.0` | The version of `daml` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v2.2.0` | The version of `daml` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -907,7 +962,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d # ~/.config/starship.toml [daml] -format = "via [D $version](bold bright-green) " +format = 'via [D $version](bold bright-green) ' ``` ## Dart @@ -922,22 +977,22 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | Option | Default | Description | | ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `detect_extensions` | `["dart"]` | Which extensions should trigger this module. | -| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".dart_tool"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🎯 '` | A format string representing the symbol of Dart | +| `detect_extensions` | `['dart']` | Which extensions should trigger this module. | +| `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | Which filenames should trigger this module. | +| `detect_folders` | `['.dart_tool']` | Which folders should trigger this module. | +| `style` | `'bold blue'` | 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` | +| 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 @@ -947,7 +1002,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d # ~/.config/starship.toml [dart] -format = "via [🔰 $version](bold red) " +format = 'via [🔰 $version](bold red) ' ``` ## Deno @@ -960,22 +1015,22 @@ The `deno` module shows you your currently installed version of [Deno](https://d | Option | Default | Description | | ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦕 "` | A format string representing the symbol of Deno | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦕 '` | A format string representing the symbol of Deno | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["deno.json", "deno.jsonc", "mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. | +| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"green bold"` | The style for the module. | +| `style` | `'green bold'` | The style for the module. | | `disabled` | `false` | Disables the `deno` module. | ### Variables -| Variable | Example | Description | -| -------- | -------- | ------------------------------------ | -| version | `v1.8.3` | The version of `deno` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.8.3` | The version of `deno` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | ### Example @@ -983,7 +1038,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d # ~/.config/starship.toml [deno] -format = "via [🦕 $version](green bold) " +format = 'via [🦕 $version](green bold) ' ``` ## Directory @@ -996,20 +1051,21 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### 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: "…/" | -| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | -| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) | +| 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: '…/' | +| `before_repo_root_style` | | The style for the path segment above the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `'[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) '` | The format of a git repo when `before_repo_root_style` and `repo_root_style` is defined. | +| `home_symbol` | `'~'` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |

This module has a few advanced configuration options that control how the directory is displayed. @@ -1024,8 +1080,8 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ```toml [directory.substitutions] -"/Volumes/network/path" = "/net" -"src/com/long/java/path" = "mypath" +'/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`. @@ -1034,10 +1090,10 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Variables -| Variable | Example | Description | -| -------- | --------------------- | ----------------------------------- | -| path | `"D:/Projects"` | The current directory path | -| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | +| 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 @@ -1046,13 +1102,13 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an Let us consider the path `/path/to/home/git_repo/src/lib` -| Variable | Example | Description | -| ---------------- | --------------------- | --------------------------------------- | -| before_root_path | `"/path/to/home/"` | The path before git root directory path | -| repo_root | `"git_repo"` | The git root directory name | -| path | `"/src/lib"` | The remaining path | -| style | `"black bold dimmed"` | Mirrors the value of option `style` | -| repo_root_style | `"underline white"` | Style for git root directory name | +| Variable | Example | Description | +| ------------------ | --------------------- | --------------------------------------- | +| before_root_path | `'/path/to/home/'` | The path before git root directory path | +| repo_root | `'git_repo'` | The git root directory name | +| path | `'/src/lib'` | The remaining path | +| style | `'black bold dimmed'` | Mirrors the value of option `style` | +| repo_root_style | `'underline white'` | Style for git root directory name |
@@ -1063,7 +1119,7 @@ Let us consider the path `/path/to/home/git_repo/src/lib` [directory] truncation_length = 8 -truncation_symbol = "…/" +truncation_symbol = '…/' ``` ## Docker Context @@ -1074,22 +1130,22 @@ The `docker_context` module shows the currently active [Docker context](https:// | Option | Default | Description | | ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `format` | `'via [$symbol$context]($style) '` | The format for the module. | +| `symbol` | `'🐳 '` | The symbol used before displaying the Docker context. | | `only_with_files` | `true` | Only show when there's a match | | `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | +| `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | Which filenames should trigger this module (needs `only_with_files` to be true). | | `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | -| `style` | `"blue bold"` | The style for the module. | +| `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | 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` | +| 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 @@ -1099,7 +1155,7 @@ The `docker_context` module shows the currently active [Docker context](https:// # ~/.config/starship.toml [docker_context] -format = "via [🐋 $context](blue bold)" +format = 'via [🐋 $context](blue bold)' ``` ## Dotnet @@ -1127,24 +1183,24 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$var_cluster" +'dev.local.cluster.k8s' = 'dev' +'.*/openshift-cluster/.*' = 'openshift' +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' [kubernetes.user_aliases] -"dev.local.cluster.k8s" = "dev" -"root/.*" = "root" +'dev.local.cluster.k8s' = 'dev' +'root/.*' = 'root' ``` Only show the module in directories that contain a `k8s` file. @@ -2121,14 +2249,14 @@ Long and automatically generated cluster names can be identified and shortened u ```toml [kubernetes.context_aliases] # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -".*/openshift-cluster/.*" = "openshift" +'.*/openshift-cluster/.*' = 'openshift' # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$var_cluster" +'.*/(?P[\\w-]+)/.*' = '$var_cluster' # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' ``` ## Line Break @@ -2159,8 +2287,8 @@ The `localip` module shows the IPv4 address of the primary network interface. | Option | Default | Description | | ---------- | ------------------------- | ------------------------------------------------------ | | `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | The style for the module. | +| `format` | `'[$localipv4]($style) '` | The format for the module. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `true` | Disables the `localip` module. | ### Variables @@ -2168,7 +2296,7 @@ The `localip` module shows the IPv4 address of the primary network interface. | Variable | Example | Description | | --------- | ------------ | ----------------------------------- | | localipv4 | 192.168.1.13 | Contains the primary IPv4 address | -| style\* | | Mirrors the value of option `style` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -2179,7 +2307,7 @@ The `localip` module shows the IPv4 address of the primary network interface. [localip] ssh_only = false -format = "@[$localipv4](bold red) " +format = '@[$localipv4](bold red) ' disabled = false ``` @@ -2195,23 +2323,23 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | Option | Default | Description | | ------------------- | ------------------------------------ | -------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | -| `detect_extensions` | `["lua"]` | Which extensions should trigger this module. | -| `detect_files` | `[".lua-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["lua"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | -| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🌙 '` | A format string representing the symbol of Lua. | +| `detect_extensions` | `['lua']` | Which extensions should trigger this module. | +| `detect_files` | `['.lua-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['lua']` | Which folders should trigger this module. | +| `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` | +| 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 @@ -2221,7 +2349,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o # ~/.config/starship.toml [lua] -format = "via [🌕 $version](bold blue) " +format = 'via [🌕 $version](bold blue) ' ``` ## Memory Usage @@ -2238,24 +2366,24 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### 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. | +| 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. | +| 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` | +| symbol | `🐏` | Mirrors the 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 @@ -2267,8 +2395,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y [memory_usage] disabled = false threshold = -1 -symbol = " " -style = "bold dimmed green" +symbol = ' ' +style = 'bold dimmed green' ``` ## Meson @@ -2282,19 +2410,19 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. | Option | Default | Description | | ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- | | `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | -| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. | -| `format` | `"via [$symbol$project]($style) "` | The format for the module. | -| `symbol` | `"⬢ "` | The symbol used before displaying the project name. | -| `style` | `"blue bold"` | The style for the module. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | +| `format` | `'via [$symbol$project]($style) '` | The format for the module. | +| `symbol` | `'⬢ '` | The symbol used before displaying the project name. | +| `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `meson` module. | ### Variables -| Variable | Example | Description | -| -------- | ---------- | ------------------------------------ | -| project | `starship` | The current Meson project name | -| symbol | `🐏` | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| project | `starship` | The current Meson project name | +| symbol | `🐏` | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -2305,9 +2433,9 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. [meson] disabled = false -truncation_symbol = "--" -symbol = " " -style = "bold dimmed green" +truncation_symbol = '--' +symbol = ' ' +style = 'bold dimmed green' ``` ## Mercurial Branch @@ -2318,20 +2446,20 @@ The `hg_branch` module shows the active branch of the repo in your current direc | 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. | +| `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 `N` graphemes | -| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `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` | +| 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 @@ -2341,9 +2469,9 @@ The `hg_branch` module shows the active branch of the repo in your current direc # ~/.config/starship.toml [hg_branch] -format = "on [🌱 $branch](bold purple)" +format = 'on [🌱 $branch](bold purple)' truncation_length = 4 -truncation_symbol = "" +truncation_symbol = '' ``` ## Nim @@ -2359,22 +2487,22 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | -| `detect_extensions` | `["nim", "nims", "nimble"]` | Which extensions should trigger this module. | -| `detect_files` | `["nim.cfg"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'👑 '` | The symbol used before displaying the version of Nim. | +| `detect_extensions` | `['nim', 'nims', 'nimble']` | Which extensions should trigger this module. | +| `detect_files` | `['nim.cfg']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | The style for the module. | +| `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` | +| 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 @@ -2384,8 +2512,8 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang # ~/.config/starship.toml [nim] -style = "yellow" -symbol = "🎣 " +style = 'yellow' +symbol = '🎣 ' ``` ## Nix-shell @@ -2394,23 +2522,23 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ ### Options -| Option | Default | Description | -| ------------ | -------------------------------------------- | ----------------------------------------------------- | +| 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. | +| `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` | +| 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 @@ -2421,8 +2549,8 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ [nix_shell] disabled = true -impure_msg = "[impure shell](bold red)" -pure_msg = "[pure shell](bold green)" +impure_msg = '[impure shell](bold red)' +pure_msg = '[pure shell](bold green)' format = 'via [☃️ $state( \($name\))](bold blue) ' ``` @@ -2441,23 +2569,23 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | Option | Default | Description | | ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string representing the symbol of Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts", "mts", "cts"]` | Which extensions should trigger this module. | -| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | -| `style` | `"bold green"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string representing the symbol of Node.js. | +| `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Which extensions should trigger this module. | +| `detect_files` | `['package.json', '.node-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['node_modules']` | Which folders should trigger this module. | +| `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 package.json does not match the Node.js 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` | +| 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 @@ -2467,7 +2595,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n # ~/.config/starship.toml [nodejs] -format = "via [🤖 $version](bold green) " +format = 'via [🤖 $version](bold green) ' ``` ## OCaml @@ -2483,18 +2611,18 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam ### Options -| Option | Default | Description | -| ------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | -| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | -| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | -| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Which extensions should trigger this module. | -| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Which filenames should trigger this module. | -| `detect_folders` | `["_opam", "esy.lock"]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `false` | Disables the `ocaml` module. | +| Option | Default | Description | +| ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐫 '` | The symbol used before displaying the version of OCaml. | +| `global_switch_indicator` | `''` | The format string used to represent global OPAM switch. | +| `local_switch_indicator` | `'*'` | The format string used to represent local OPAM switch. | +| `detect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | Which extensions should trigger this module. | +| `detect_files` | `['dune', 'dune-project', 'jbuild', 'jbuild-ignore', '.merlin']` | Which filenames should trigger this module. | +| `detect_folders` | `['_opam', 'esy.lock']` | Which folders should trigger this module. | +| `style` | `'bold yellow'` | The style for the module. | +| `disabled` | `false` | Disables the `ocaml` module. | ### Variables @@ -2504,7 +2632,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | switch_name | `my-project` | The active OPAM switch | | switch_indicator | | Mirrors the value of `indicator` for currently active OPAM switch | | symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -2514,7 +2642,43 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam # ~/.config/starship.toml [ocaml] -format = "via [🐪 $version]($style) " +format = 'via [🐪 $version]($style) ' +``` + +## Open Policy Agent + +The `opa` module shows the currently installed version of the OPA tool. By default the module will be shown if the current directory contains a `.rego` file. + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | +| `detect_extensions` | `['rego']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'bold blue'` | The style for the module. | +| `disabled` | `false` | Disables the `opa` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.44.0` | The version of `opa` | +| symbol | | Mirrors the 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 + +[opa] +format = 'via [⛑️ $version](bold red) ' ``` ## OpenStack @@ -2523,21 +2687,21 @@ The `openstack` module shows the current OpenStack cloud and project. The module ### Options -| Option | Default | Description | -| ---------- | --------------------------------------------- | -------------------------------------------------------------- | +| 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. | +| `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` | +| 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 @@ -2548,8 +2712,105 @@ The `openstack` module shows the current OpenStack cloud and project. The module [openstack] format = 'on [$symbol$cloud(\($project\))]($style) ' -style = "bold yellow" -symbol = "☁️ " +style = 'bold yellow' +symbol = '☁️ ' +``` + +## OS + +The `os` module shows the current operating system. OS information is detected via the [os_info](https://lib.rs/crates/os_info) crate. + +::: warning + +The [os_info](https://lib.rs/crates/os_info) crate used by this module is known to be inaccurate on some systems. + +::: + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ---------- | --------------------- | ------------------------------------------------------ | +| `format` | `"[$symbol]($style)"` | The format for the module. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `true` | Disables the `os` module. | +| `symbols` | | A table that maps each operating system to its symbol. | + +`symbols` allows you to define arbitrary symbols to display for each operating system type. Operating system types not defined by your configuration use the default symbols table below. All operating systems currently supported by the module are listed below. If you would like an operating system to be added, feel free to open a [feature request](https://github.com/starship/starship/issues/new/choose). + +```toml +# This is the default symbols table. +[os.symbols] +Alpine = "🏔️ " +Amazon = "🙂 " +Android = "🤖 " +Arch = "🎗️ " +CentOS = "💠 " +Debian = "🌀 " +DragonFly = "🐉 " +Emscripten = "🔗 " +EndeavourOS = "🚀 " +Fedora = "🎩 " +FreeBSD = "😈 " +Garuda = "🦅 " +Gentoo = "🗜️ " +HardenedBSD = "🛡️ " +Illumos = "🐦 " +Linux = "🐧 " +Macos = "🍎 " +Manjaro = "🥭 " +Mariner = "🌊 " +MidnightBSD = "🌘 " +Mint = "🌿 " +NetBSD = "🚩 " +NixOS = "❄️ " +OpenBSD = "🐡 " +openSUSE = "🦎 " +OracleLinux = "🦴 " +Pop = "🍭 " +Raspbian = "🍓 " +Redhat = "🎩 " +RedHatEnterprise = "🎩 " +Redox = "🧪 " +Solus = "⛵ " +SUSE = "🦎 " +Ubuntu = "🎯 " +Unknown = "❓ " +Windows = "🪟 " +``` + +### Variables + +| Variable | Example | Description | +| --------- | ------------ | ------------------------------------------------------------------ | +| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | +| name | `Arch Linux` | The current operating system name | +| type | `Arch` | The current operating system type | +| codename | | The current operating system codename, if applicable | +| edition | | The current operating system edition, if applicable | +| version | | The current operating system version, if applicable | +| 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 + +[os] +format = "on [($name )]($style)" +style = "bold blue" +disabled = false + +[os.symbols] +Windows = " " +Arch = "Arch is the best! " ``` ## Package Version @@ -2580,20 +2841,20 @@ The `package` module is shown when the current directory is the repository for a | Option | Default | Description | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"is [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold 208"` | The style for the module. | +| `format` | `'is [$symbol$version]($style) '` | The format for the module. | +| `symbol` | `'📦 '` | The symbol used before displaying the version the package. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `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` | +| 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 @@ -2603,7 +2864,7 @@ The `package` module is shown when the current directory is the repository for a # ~/.config/starship.toml [package] -format = "via [🎁 $version](208 bold) " +format = 'via [🎁 $version](208 bold) ' ``` ## Perl @@ -2620,22 +2881,22 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe | Option | Default | Description | | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | -| `detect_extensions` | `["pl", "pm", "pod"]` | Which extensions should trigger this module. | -| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | +| `detect_extensions` | `['pl', 'pm', 'pod']` | Which extensions should trigger this module. | +| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | The style for the module. | +| `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` | +| 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 @@ -2643,7 +2904,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe # ~/.config/starship.toml [perl] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## PHP @@ -2658,22 +2919,22 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | -| `detect_extensions` | `["php"]` | Which extensions should trigger this module. | -| `detect_files` | `["composer.json", ".php-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐘 '` | The symbol used before displaying the version of PHP. | +| `detect_extensions` | `['php']` | Which extensions should trigger this module. | +| `detect_files` | `['composer.json', '.php-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"147 bold"` | The style for the module. | +| `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` | +| 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 @@ -2683,7 +2944,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. # ~/.config/starship.toml [php] -format = "via [🔹 $version](147 bold) " +format = 'via [🔹 $version](147 bold) ' ``` ## Pulumi @@ -2705,22 +2966,22 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string shown before the Pulumi stack. | -| `style` | `"bold 5"` | The style for the module. | +| `format` | `'via [$symbol($username@)$stack]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string shown before the Pulumi stack. | +| `style` | `'bold 5'` | The style for the module. | | `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | | `disabled` | `false` | Disables the `pulumi` module. | ### Variables -| Variable | Example | Description | -| -------- | ---------- | ------------------------------------ | -| version | `v0.12.24` | The version of `pulumi` | -| stack | `dev` | The current Pulumi stack | -| username | `alice` | The current Pulumi username | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| username | `alice` | The current Pulumi username | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -2732,7 +2993,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [pulumi] -format = "[🛥 ($version )$stack]($style) " +format = '[🛥 ($version )$stack]($style) ' ``` #### Without Pulumi version @@ -2740,8 +3001,8 @@ format = "[🛥 ($version )$stack]($style) " ```toml # ~/.config/starship.toml [pulumi] -symbol = "🛥 " -format = "[$symbol$stack]($style) " +symbol = '🛥 ' +format = '[$symbol$stack]($style) ' ``` ## PureScript @@ -2755,22 +3016,22 @@ The `purescript` module shows the currently installed version of [PureScript](ht | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | -| `detect_extensions` | `["purs"]` | Which extensions should trigger this module. | -| `detect_files` | `["spago.dhall"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'<=> '` | The symbol used before displaying the version of PureScript. | +| `detect_extensions` | `['purs']` | Which extensions should trigger this module. | +| `detect_files` | `['spago.dhall']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold white"` | The style for the module. | +| `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` | +| 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 @@ -2780,7 +3041,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht # ~/.config/starship.toml [purescript] -format = "via [$symbol$version](bold white)" +format = 'via [$symbol$version](bold white)' ``` ## Python @@ -2805,15 +3066,15 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | The style for the module. | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `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 | -| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `detect_extensions` | `["py"]` | Which extensions should trigger this module | -| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module | +| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | +| `detect_extensions` | `['py']` | Which extensions should trigger this module | +| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | | `disabled` | `false` | Disables the `python` module. | @@ -2821,7 +3082,7 @@ By default the module will be shown if any of the following conditions are met: 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. +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. ::: @@ -2829,11 +3090,11 @@ The default values and order for `python_binary` was chosen to first identify th | 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 | +| 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 @@ -2841,7 +3102,7 @@ The default values and order for `python_binary` was chosen to first identify th # ~/.config/starship.toml [python] -symbol = "👾 " +symbol = '👾 ' pyenv_version_name = true ``` @@ -2850,7 +3111,7 @@ pyenv_version_name = true [python] # Only use the `python3` binary to get the version. -python_binary = "python3" +python_binary = 'python3' ``` ```toml @@ -2869,7 +3130,7 @@ detect_extensions = [] # # Note this will only work when the venv is inside the project and it will only # work in the directory that contains the venv dir but maybe this is ok? -python_binary = ["./venv/bin/python", "python", "python3", "python2"] +python_binary = ['./venv/bin/python', 'python', 'python3', 'python2'] ``` ## R @@ -2888,13 +3149,13 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"📐"` | A format string representing the symbol of R. | -| `style` | `"blue bold"` | The style for the module. | -| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module | -| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module | -| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'📐'` | A format string representing the symbol of R. | +| `style` | `'blue bold'` | The style for the module. | +| `detect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | Which extensions should trigger this module | +| `detect_files` | `['.Rprofile']` | Which filenames should trigger this module | +| `detect_folders` | `['.Rproj.user']` | Which folders should trigger this module | | `disabled` | `false` | Disables the `r` module. | ### Variables @@ -2903,7 +3164,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | -------- | ------------- | ------------------------------------ | | version | `v4.0.5` | The version of `R` | | symbol | | Mirrors the value of option `symbol` | -| style | `"blue bold"` | Mirrors the value of option `style` | +| style | `'blue bold'` | Mirrors the value of option `style` | ### Example @@ -2911,7 +3172,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr # ~/.config/starship.toml [rlang] -format = "with [📐 $version](blue bold) " +format = 'with [📐 $version](blue bold) ' ``` ## Raku @@ -2925,13 +3186,13 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra | Option | Default | Description | | ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version-$vm_version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦋 "` | The symbol used before displaying the version of Raku | -| `detect_extensions` | `["p6", "pm6", "pod6", "raku", "rakumod"]` | Which extensions should trigger this module. | -| `detect_files` | `["META6.json"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version-$vm_version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦋 '` | The symbol used before displaying the version of Raku | +| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Which extensions should trigger this module. | +| `detect_files` | `['META6.json']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | The style for the module. | +| `style` | `'bold 149'` | The style for the module. | | `disabled` | `false` | Disables the `raku` module. | ### Variables @@ -2941,7 +3202,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra | version | `v6.d` | The version of `raku` | | vm_version | `moar` | The version of VM `raku` is built on | | symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| style\* | | Mirrors the value of option `style` | ### Example @@ -2949,7 +3210,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra # ~/.config/starship.toml [raku] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## Red @@ -2962,22 +3223,22 @@ By default the `red` module shows the currently installed version of [Red](https | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | -| `detect_extensions` | `["red"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🔺 '` | A format string representing the symbol of Red. | +| `detect_extensions` | `['red']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"red bold"` | The style for the module. | +| `style` | `'red bold'` | The style for the module. | | `disabled` | `false` | Disables the `red` module. | ### Variables -| Variable | Example | Description | -| -------- | -------- | ------------------------------------ | -| version | `v2.5.1` | The version of `red` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v2.5.1` | The version of `red` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -2987,7 +3248,7 @@ By default the `red` module shows the currently installed version of [Red](https # ~/.config/starship.toml [red] -symbol = "🔴 " +symbol = '🔴 ' ``` ## Ruby @@ -3005,23 +3266,23 @@ Starship gets the current Ruby version by running `ruby -v`. | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. | -| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💎 '` | A format string representing the symbol of Ruby. | +| `detect_extensions` | `['rb']` | Which extensions should trigger this module. | +| `detect_files` | `['Gemfile', '.ruby-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | -| `style` | `"bold red"` | The style for the module. | +| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Which environment variables should trigger this module. | +| `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` | +| 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 @@ -3031,7 +3292,7 @@ Starship gets the current Ruby version by running `ruby -v`. # ~/.config/starship.toml [ruby] -symbol = "🔺 " +symbol = '🔺 ' ``` ## Rust @@ -3045,13 +3306,13 @@ By default the `rust` module shows the currently installed version of [Rust](htt | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. | -| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦀 '` | A format string representing the symbol of Rust | +| `detect_extensions` | `['rs']` | Which extensions should trigger this module. | +| `detect_files` | `['Cargo.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | The style for the module. | +| `style` | `'bold red'` | The style for the module. | | `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -3062,7 +3323,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | numver | `1.51.0` | The numeric component of the `rustc` version | | toolchain | `beta` | The toolchain version | | symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -3072,7 +3333,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt # ~/.config/starship.toml [rust] -format = "via [⚙️ $version](red bold)" +format = 'via [⚙️ $version](red bold)' ``` ## Scala @@ -3087,22 +3348,22 @@ The `scala` module shows the currently installed version of [Scala](https://www. | Option | Default | Description | | ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | -| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | -| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | -| `style` | `"red dimmed"` | The style for the module. | +| `format` | `'via [${symbol}(${version} )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. | +| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. | +| `detect_folders` | `['.metals']` | Which folders should trigger this modules. | +| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. | +| `style` | `'red dimmed'` | The style for the module. | | `disabled` | `false` | Disables the `scala` module. | ### Variables -| Variable | Example | Description | -| -------- | -------- | ------------------------------------ | -| version | `2.13.5` | The version of `scala` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `2.13.5` | The version of `scala` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -3112,7 +3373,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. # ~/.config/starship.toml [scala] -symbol = "🌟 " +symbol = '🌟 ' ``` ## Shell @@ -3129,19 +3390,19 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `"bsh"` | A format string used to represent bash. | -| `fish_indicator` | `"fsh"` | A format string used to represent fish. | -| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. | -| `powershell_indicator` | `"psh"` | A format string used to represent powershell. | -| `ion_indicator` | `"ion"` | A format string used to represent ion. | -| `elvish_indicator` | `"esh"` | A format string used to represent elvish. | -| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. | -| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. | -| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. | -| `nu_indicator` | `"nu"` | A format string used to represent nu. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `"[$indicator]($style) "` | The format for the module. | -| `style` | `"white bold"` | The style for the module. | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `style` | `'white bold'` | The style for the module. | | `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3149,7 +3410,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Variable | Default | Description | | --------- | ------- | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | -| style\* | | Mirrors the value of option `style`. | +| style\* | | Mirrors the value of option `style`. | *: This variable can only be used as a part of a style string @@ -3159,35 +3420,35 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [shell] -fish_indicator = "" -powershell_indicator = "_" -unknown_indicator = "mystery shell" -style = "cyan bold" +fish_indicator = '' +powershell_indicator = '_' +unknown_indicator = 'mystery shell' +style = 'cyan bold' disabled = false ``` ## SHLVL -The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ('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`. | +| `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. | +| `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` | +| 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 @@ -3198,7 +3459,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int [shlvl] disabled = false -format = "$shlvl level(s) down" +format = '$shlvl level(s) down' threshold = 3 ``` @@ -3208,20 +3469,20 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu ### Options -| Option | Default | Description | -| ---------- | ------------------------------ | ------------------------------------------------ | +| 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. | +| `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` | +| 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 @@ -3243,9 +3504,9 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | Option | Default | Description | | ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | The number of directories the environment path should be truncated to. `0` means no truncation. Also see the [`directory`](#directory) module. | -| `symbol` | `"🅢 "` | The symbol used before the environment name. | -| `style` | `"bold blue"` | The style for the module. | -| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `symbol` | `'🅢 '` | The symbol used before the environment name. | +| `style` | `'bold blue'` | The style for the module. | +| `format` | `'via [$symbol$environment]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `spack` module. | ### Variables @@ -3254,7 +3515,7 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | ----------- | ------------ | ------------------------------------ | | environment | `astronauts` | The current spack environment | | symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -3264,7 +3525,7 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat # ~/.config/starship.toml [spack] -format = "[$symbol$environment](dimmed blue) " +format = '[$symbol$environment](dimmed blue) ' ``` ## Status @@ -3279,23 +3540,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| --------------------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `format` | `"[$symbol$status]($style) "` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `success_symbol` | `""` | The symbol displayed on program success | -| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | -| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | -| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | -| `style` | `"bold red"` | The style for the module. | -| `recognize_signal_code` | `true` | Enable signal mapping from exit code | -| `map_symbol` | `false` | Enable symbols mapping from exit code | -| `pipestatus` | `false` | Enable pipestatus reporting | -| `pipestatus_separator` | | | The symbol used to separate pipestatus segments (supports formatting) | +| Option | Default | Description | +| --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `format` | `'[$symbol$status]($style) '` | The format of the module | +| `symbol` | `'❌'` | The symbol displayed on program error | +| `success_symbol` | `''` | The symbol displayed on program success | +| `not_executable_symbol` | `'🚫'` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `'🔍'` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `'🧱'` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `'⚡'` | The symbol displayed on any signal | +| `style` | `'bold red'` | The style for the module. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `pipestatus` | `false` | Enable pipestatus reporting | +| `pipestatus_separator` | | | The symbol used to separate pipestatus segments (supports formatting) | | `pipestatus_format` | `'\[$pipestatus\] => [$symbol$common_meaning$signal_name$maybe_int]($style)'` | The format of the module when the command is a pipeline | -| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments | -| `disabled` | `true` | Disables the `status` module. | +| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments | +| `disabled` | `true` | Disables the `status` module. | ### Variables @@ -3310,7 +3571,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | maybe_int | `7` | Contains the exit code number when no meaning has been found | | pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format | | symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -3320,9 +3581,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [status] -style = "bg:blue" -symbol = "🔴 " -success_symbol = "🟢 SUCCESS" +style = 'bg:blue' +symbol = '🔴 ' +success_symbol = '🟢 SUCCESS' format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false @@ -3342,18 +3603,18 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | --------------- | ------------------------ | ------------------------------------------------------- | -| `format` | `"[as $symbol]($style)"` | The format of the module | -| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached | -| `style` | `"bold blue"` | The style for the module. | +| `format` | `'[as $symbol]($style)'` | The format of the module | +| `symbol` | `'🧙 '` | The symbol displayed when credentials are cached | +| `style` | `'bold blue'` | The style for the module. | | `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | | `disabled` | `true` | Disables the `sudo` module. | ### Variables -| Variable | Example | Description | -| -------- | ------- | ------------------------------------ | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| 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 @@ -3363,8 +3624,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [sudo] -style = "bold green" -symbol = "👩‍💻 " +style = 'bold green' +symbol = '👩‍💻 ' disabled = false ``` @@ -3388,22 +3649,22 @@ By default the `swift` module shows the currently installed version of [Swift](h | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `detect_extensions` | `["swift"]` | Which extensions should trigger this module. | -| `detect_files` | `["Package.swift"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐦 '` | A format string representing the symbol of Swift | +| `detect_extensions` | `['swift']` | Which extensions should trigger this module. | +| `detect_files` | `['Package.swift']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 202"` | The style for the module. | +| `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` | +| 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 @@ -3413,7 +3674,7 @@ By default the `swift` module shows the currently installed version of [Swift](h # ~/.config/starship.toml [swift] -format = "via [🏎 $version](red bold)" +format = 'via [🏎 $version](red bold)' ``` ## Terraform @@ -3435,13 +3696,13 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol$workspace]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💠'` | A format string shown before the terraform workspace. | +| `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | -| `style` | `"bold 105"` | The style for the module. | +| `detect_folders` | `['.terraform']` | Which folders should trigger this module. | +| `style` | `'bold 105'` | The style for the module. | | `disabled` | `false` | Disables the `terraform` module. | ### Variables @@ -3451,7 +3712,7 @@ By default the module will be shown if any of the following conditions are met: | 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` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -3463,7 +3724,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [terraform] -format = "[🏎💨 $version$workspace]($style) " +format = '[🏎💨 $version$workspace]($style) ' ``` #### Without Terraform version @@ -3472,7 +3733,7 @@ format = "[🏎💨 $version$workspace]($style) " # ~/.config/starship.toml [terraform] -format = "[🏎💨 $workspace]($style) " +format = '[🏎💨 $workspace]($style) ' ``` ## Time @@ -3487,24 +3748,24 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### 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 | +| 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. +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` | +| 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 @@ -3516,9 +3777,9 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de [time] disabled = false format = '🕙[\[ $time \]]($style) ' -time_format = "%T" -utc_time_offset = "-5" -time_range = "10:00:00-14:00:00" +time_format = '%T' +utc_time_offset = '-5' +time_range = '10:00:00-14:00:00' ``` ## Username @@ -3540,9 +3801,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Option | Default | Description | | ------------- | ----------------------- | ------------------------------------------- | -| `style_root` | `"bold red"` | The style used when the user is root/admin. | -| `style_user` | `"bold yellow"` | The style used for non-root users. | -| `format` | `"[$user]($style) in "` | The format for the module. | +| `style_root` | `'bold red'` | The style used when the user is root/admin. | +| `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. | @@ -3550,8 +3811,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | 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. | +| `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 @@ -3559,9 +3820,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` # ~/.config/starship.toml [username] -style_user = "white bold" -style_root = "black bold" -format = "user: [$user]($style) " +style_user = 'white bold' +style_root = 'black bold' +format = 'user: [$user]($style) ' disabled = false show_always = true ``` @@ -3576,22 +3837,22 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'⍱ '` | A format string representing the symbol of Vagrant. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["Vagrantfile"]` | Which filenames should trigger this module. | +| `detect_files` | `['Vagrantfile']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"cyan bold"` | The style for the module. | +| `style` | `'cyan bold'` | The style for the module. | | `disabled` | `false` | Disables the `vagrant` module. | ### Variables -| Variable | Example | Description | -| -------- | ---------------- | ------------------------------------ | -| version | `Vagrant 2.2.10` | The version of `Vagrant` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | Description | +| --------- | ---------------- | ------------------------------------ | +| version | `Vagrant 2.2.10` | The version of `Vagrant` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -3601,7 +3862,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// # ~/.config/starship.toml [vagrant] -format = "via [⍱ $version](bold white) " +format = 'via [⍱ $version](bold white) ' ``` ## V @@ -3615,29 +3876,29 @@ The `vlang` module shows you your currently installed version of [V](https://vla | Option | Default | Description | | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"V "` | A format string representing the symbol of V | -| `detect_extensions` | `["v"]` | Which extensions should trigger this module. | -| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'V '` | A format string representing the symbol of V | +| `detect_extensions` | `['v']` | Which extensions should trigger this module. | +| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"blue bold"` | The style for the module. | +| `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `vlang` module. | ### Variables -| Variable | Example | Description | -| -------- | ------- | ------------------------------------ | -| version | `v0.2` | The version of `v` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| version | `v0.2` | The version of `v` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | ### Example ```toml # ~/.config/starship.toml [vlang] -format = "via [V $version](blue bold) " +format = 'via [V $version](blue bold) ' ``` ## VCSH @@ -3648,18 +3909,18 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | Option | Default | Description | | ---------- | -------------------------------- | ------------------------------------------------------ | -| `symbol` | | The symbol used before displaying the repository name. | -| `style` | `"bold yellow"` | The style for the module. | -| `format` | `"vcsh [$symbol$repo]($style) "` | The format for the module. | +| `symbol` | `''` | The symbol used before displaying the repository name. | +| `style` | `'bold yellow'` | The style for the module. | +| `format` | `'vcsh [$symbol$repo]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `vcsh` module. | ### Variables -| Variable | Example | Description | -| -------- | ------------------------------------------- | ------------------------------------ | -| repo | `dotfiles` if in a VCSH repo named dotfiles | The active repository name | -| symbol | | Mirrors the value of option `symbol` | -| style\* | `black bold dimmed` | Mirrors the value of option `style` | +| Variable | Example | Description | +| --------- | ------------------------------------------- | ------------------------------------ | +| repo | `dotfiles` if in a VCSH repo named dotfiles | The active repository name | +| 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 @@ -3669,7 +3930,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v # ~/.config/starship.toml [vcsh] -format = "[🆅 $repo](bold blue) " +format = '[🆅 $repo](bold blue) ' ``` ## Zig @@ -3682,22 +3943,22 @@ By default the the `zig` module shows the currently installed version of [Zig](h | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"↯ "` | 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. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'↯ '` | The symbol used before displaying the version of Zig. | +| `style` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `zig` module. | -| `detect_extensions` | `["zig"]` | Which extensions should trigger this module. | +| `detect_extensions` | `['zig']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | ### 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` | +| 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 @@ -3707,7 +3968,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h # ~/.config/starship.toml [zig] -symbol = "⚡️ " +symbol = '⚡️ ' ``` ## Custom commands @@ -3752,16 +4013,16 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | Option | Default | Description | | ------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `command` | `''` | The command whose output should be printed. The command will be passed on stdin to the shell. | | `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `description` | `""` | The description of the module that is shown when running `starship explain`. | +| `description` | `''` | The description of the module that is shown when running `starship explain`. | | `detect_files` | `[]` | The files that will be searched in the working directory for a match. | | `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. | | `detect_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. | +| `symbol` | `''` | The symbol used before displaying the command output. | +| `style` | `'bold green'` | The style for the module. | +| `format` | `'[$symbol($output )]($style)'` | The format for the module. | | `disabled` | `false` | Disables this `custom` module. | | `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | | `use_stdin` | | An optional boolean value that overrides whether commands should be forwarded to the shell via the standard input or as an argument. If unset standard input is used by default, unless the shell does not support it (cmd, nushell). Setting this disables shell-specific argument handling. | @@ -3769,11 +4030,11 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt ### 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` | +| 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 @@ -3784,14 +4045,14 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt - 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. +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 -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. ```toml -shell = ["pwsh", "-Command", "-"] +shell = ['pwsh', '-Command', '-'] ``` ::: warning Make sure your custom shell configuration exits gracefully @@ -3812,19 +4073,19 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -detect_files = ["foo"] # can specify filters but wildcards are not supported -when = """ test "$HOME" = "$PWD" """ -format = " transcending [$output]($style)" +command = 'echo foo' # shows output of command +detect_files = ['foo'] # can specify filters but wildcards are not supported +when = ''' test "$HOME" = "$PWD" ''' +format = ' transcending [$output]($style)' [custom.time] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command', '-'] [custom.time-as-arg] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command'] use_stdin = false ``` diff --git a/docs/uk-UA/guide/README.md b/docs/uk-UA/guide/README.md index 3a22d873..ade01af2 100644 --- a/docs/uk-UA/guide/README.md +++ b/docs/uk-UA/guide/README.md @@ -165,15 +165,15 @@ -## 🚀 Встановлення +## 🚀 Установлення ### Передумови -- Встановлений та ввімкнений набір шрифтів та термінальних іконок [Nerd Font](https://www.nerdfonts.com/) (як от [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). +- Установлений та ввімкнений у Вашому терміналі набір шрифтів [Nerd Font](https://www.nerdfonts.com/) (для прикладу, спробуйте [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). -### Крок 1. Встановіть Starship +### Крок 1. Установіть starship -Виберіть вашу операційну систему зі списку нижче, щоб переглянути інструкцію з установки: +Виберіть Вашу операційну систему зі списку нижче, щоб переглянути інструкцію з установки:
Android @@ -210,20 +210,19 @@ curl -sS https://starship.rs/install.sh | sh Як варіант, можете встановити Starship через будь-який з наступних пакетних менеджерів: -| Дистрибутив | Репозиторій | Командна інструкція | -| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------- | -| **_Будь-який_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | -| _Будь-який_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | -| _Будь-який_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | -| _Будь-який_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | -| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | -| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | +| Дистрибутив | Репозиторій | Командна інструкція | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| **_Будь-який_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _Будь-який_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _Будь-який_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| _Будь-який_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | +| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | +| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | -| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | -| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | -| Manjaro | | `pacman -S starship` | -| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | -| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | +| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | +| Manjaro | | `pacman -S starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` |
@@ -264,14 +263,14 @@ curl -sS https://starship.rs/install.sh | sh
-### Крок 2. Налаштування вашої оболонки для використання Starship +### Крок 2. Налаштуйте Вашу оболонку для використання starship Налаштуйте свою оболонку, щоб ініціалізувати starship. Виберіть ваш варіант зі списку:
Bash -Add the following to the end of `~/.bashrc`: +Додайте наступний рядок наприкінці `~/.bashrc`: ```sh eval "$(starship init bash)" @@ -282,7 +281,7 @@ eval "$(starship init bash)"
Cmd -You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: +Вам потрібно використовувати [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) разом з Cmd. Створіть файл за шляхом `%LocalAppData%\clink\starship.lua` із наступним вмістом: ```lua load(io.popen('starship init cmd'):read("*a"))() @@ -293,20 +292,20 @@ load(io.popen('starship init cmd'):read("*a"))()
Elvish -Add the following to the end of `~/.elvish/rc.elv`: +Додайте наступний рядок наприкінці `~/.elvish/rc.elv`: ```sh eval (starship init elvish) ``` -Note: Only Elvish v0.18+ is supported +Примітка: Підтримується лише Elvish v0.18+
Fish -Add the following to the end of `~/.config/fish/config.fish`: +Додайте наступний рядок наприкінці `~/.config/fish/config.fish`: ```fish starship init fish | source @@ -317,7 +316,7 @@ starship init fish | source
Ion -Add the following to the end of `~/.config/ion/initrc`: +Додайте наступний рядок наприкінці `~/.config/ion/initrc`: ```sh eval $(starship init ion) @@ -335,20 +334,20 @@ mkdir ~/.cache/starship starship init nu | save ~/.cache/starship/init.nu ``` -And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`): +Додайте наступний рядок наприкінці Вашої конфігурації Nushell (знайдіть її виконавши `$nu.config-path`): ```sh source ~/.cache/starship/init.nu ``` -Note: Only Nushell v0.61+ is supported +Примітка: Підтримується лише Nushell v0.61+
PowerShell -Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`): +Додайте наступний рядок наприкінці Вашої конфігурації PowerShell (знайдіть її виконавши `$PROFILE`): ```powershell Invoke-Expression (&starship init powershell) @@ -359,7 +358,7 @@ Invoke-Expression (&starship init powershell)
Tcsh -Add the following to the end of `~/.tcshrc`: +Додайте наступний рядок наприкінці `~/.tcshrc`: ```sh eval `starship init tcsh` @@ -370,7 +369,7 @@ eval `starship init tcsh`
Xonsh -Add the following to the end of `~/.xonshrc`: +Додайте наступний рядок наприкінці `~/.xonshrc`: ```python execx($(starship init xonsh)) @@ -381,7 +380,7 @@ execx($(starship init xonsh))
Zsh -Add the following to the end of `~/.zshrc`: +Додайте наступний рядок наприкінці `~/.zshrc`: ```sh eval "$(starship init zsh)" @@ -389,7 +388,7 @@ eval "$(starship init zsh)"
-### Крок 3. Configure Starship +### Крок 3. Налаштуйте starship Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy! @@ -409,19 +408,27 @@ If you are interested in helping contribute to starship, please take a look at o ## 💭 Inspired By -Please check out these previous works that helped inspire the creation of starship. 🙏 +Будь ласка, перегляньте ці попередні роботи, які надихнули на створення starship. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – Командний рядок ZSH для астронавтів. - **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. - **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons. +## ❤️ Sponsors + +Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website. + +**Supporter Tier** + +- [Dimension](https://dimension.dev/) +


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/uk-UA/installing/README.md b/docs/uk-UA/installing/README.md index 994c58f1..a20c891a 100644 --- a/docs/uk-UA/installing/README.md +++ b/docs/uk-UA/installing/README.md @@ -1,21 +1,21 @@ -# Advanced Installation +# Розширене встановлення -To install starship, you need to do two things: +Щоб установити starship, Ви мусите зробити дві речі: -1. Get the **starship** binary onto your computer +1. Завантажити бінарний файл **starship** на Ваш комп'ютер 1. Tell your shell to use the starship binary as its prompt by modifying its init scripts -For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed. +Для більшості користувачів чудово підійдуть інструкції на [головній сторінці](/guide/#🚀-installation). Однак, для деяких більш спеціалізованих платформ потрібні інші інструкції. -There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out! +Існує так багато платформ, що вони не вписуються в основний файл README.md, тож ось деякі інструкції зі встановлення від спільноти для інших платформ. Вашої тут немає? Будь ласка, додайте її сюди, якщо дізнаєтесь! ## [Chocolatey](https://chocolatey.org) ### Передумови -Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey. +Перейдіть на [сторінку встановлення Chocolatey](https://chocolatey.org/install) та дотримуйтесь інструкцій, щоб установити Chocolatey. -### Installation +### Установлення ```powershell choco install starship @@ -29,7 +29,7 @@ choco install starship pkg install getconf ``` -### Installation +### Установлення ```sh curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir /data/data/com.termux/files/usr/bin @@ -37,9 +37,9 @@ curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir /data/data/com.term ## [Funtoo Linux](https://www.funtoo.org/Welcome) -### Installation +### Установлення -On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage: +У Funtoo Linux starship можна встановити з [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) через Portage: ```sh emerge app-shells/starship @@ -47,17 +47,17 @@ emerge app-shells/starship ## [Nix](https://nixos.wiki/wiki/Nix) -### Getting the Binary +### Завантаження бінарного файлу -#### Imperatively +#### Імперативно ```sh nix-env -iA nixos.starship ``` -#### Declarative, single user, via [home-manager](https://github.com/nix-community/home-manager) +#### Декларативно, для одного користувача, через [home-manager](https://github.com/nix-community/home-manager) -Enable the `programs.starship` module in your `home.nix` file, and add your settings +Увімкніть модуль `programs.starship` у Вашому файлі `home.nix` та додайте ваші налаштування ```nix { @@ -78,15 +78,15 @@ Enable the `programs.starship` module in your `home.nix` file, and add your sett } ``` -then run +потім виконайте ```sh home-manager switch ``` -#### Declarative, system-wide, with NixOS +#### Декларативно, для цілої системи, з NixOS -Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run +Додайте `pkgs.starship` до `environment.systemPackages` у Вашій `configuration.nix`, після чого виконайте ```sh sudo nixos-rebuild switch diff --git a/docs/uk-UA/presets/README.md b/docs/uk-UA/presets/README.md index 26c2314b..cb3dcf1b 100644 --- a/docs/uk-UA/presets/README.md +++ b/docs/uk-UA/presets/README.md @@ -10,6 +10,14 @@ This preset changes the symbols for each module to use Nerd Font symbols. [![Screenshot of Nerd Font Symbols preset](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font) +## [No Nerd Fonts](./no-nerd-font.md) + +This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt. + +::: tip This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). ::: + +[Click to view No Nerd Font preset](./no-nerd-font) + ## [Bracketed Segments](./bracketed-segments.md) This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.). @@ -28,6 +36,12 @@ This preset hides the version of language runtimes. If you work in containers or [![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes) +## [No Empty Icons](./no-empty-icons.md) + +This preset does not show icons if the toolset is not found. + +[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Click to view No Runtime Versions preset")](./no-empty-icons.md) + ## [Pure Prompt](./pure-preset.md) This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). @@ -39,3 +53,9 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship. [![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png "Click to view Pure Prompt preset")](./pastel-powerline) + +## [Tokyo Night](./tokyo-night.md) + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) diff --git a/docs/uk-UA/presets/no-empty-icons.md b/docs/uk-UA/presets/no-empty-icons.md new file mode 100644 index 00000000..7be6867d --- /dev/null +++ b/docs/uk-UA/presets/no-empty-icons.md @@ -0,0 +1,17 @@ +[Return to Presets](./README.md#no-empty-icons) + +# No Empty Icons Preset + +If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. + +![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) + +### Configuration + +```sh +starship preset no-empty-icons > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-empty-icons.toml) + +<<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/uk-UA/presets/no-nerd-font.md b/docs/uk-UA/presets/no-nerd-font.md new file mode 100644 index 00000000..b154a6c0 --- /dev/null +++ b/docs/uk-UA/presets/no-nerd-font.md @@ -0,0 +1,19 @@ +[Return to Presets](./README.md#no-nerd-fonts) + +# No Nerd Fonts Preset + +This preset restricts the use of symbols to those from emoji and powerline sets. + +This means that even without a Nerd Font installed, you should be able to view all module symbols. + +This preset will become the default preset in a future release of starship. + +### Configuration + +```sh +starship preset no-nerd-font > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-nerd-font.toml) + +<<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/uk-UA/presets/tokyo-night.md b/docs/uk-UA/presets/tokyo-night.md new file mode 100644 index 00000000..1dbc02ea --- /dev/null +++ b/docs/uk-UA/presets/tokyo-night.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#pastel-powerline) + +# Tokyo Night Preset + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) + +### Передумови + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal + +### Configuration + +```sh +starship preset tokyo-night > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/tokyo-night.toml) + +<<< @/.vuepress/public/presets/toml/tokyo-night.toml diff --git a/docs/vi-VN/advanced-config/README.md b/docs/vi-VN/advanced-config/README.md index 859db966..b7c6cb51 100644 --- a/docs/vi-VN/advanced-config/README.md +++ b/docs/vi-VN/advanced-config/README.md @@ -205,7 +205,9 @@ Some shells support a right prompt which renders on the same line as the input. Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](/config/#fill). -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. + +Note: Nushell 0.71.0 or later is required ### Ví dụ @@ -280,5 +282,5 @@ Nếu nhiều màu được quy định cho màu chữ/màu nền, cái cuối c Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: - Many terminals disable support for `blink` by default -- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564). +- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). - `strikethrough` is not supported by the default macOS Terminal.app diff --git a/docs/vi-VN/config/README.md b/docs/vi-VN/config/README.md index ca394410..49d5f6fa 100644 --- a/docs/vi-VN/config/README.md +++ b/docs/vi-VN/config/README.md @@ -15,15 +15,17 @@ Tất cả cấu hình của starship đã xong trong tập tin này: [TOML](htt # Inserts a blank line between shell prompts add_newline = true -# Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +# 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 ``` +### Config File Location + Bạn thay đổi địa chỉ tệp tin cấu hình mặc định bằng biến môi trường `STARSHIP_CONFIG`: ```sh @@ -70,6 +72,62 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') Bằng việc quy ước, đa số các module có một tiền tố của terminal mặc định (ví dụ `via` trong "nodejs") và một khoảng trắng như là một hậu tố. +### Strings + +In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. + +The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. + +| Symbol | Type | Notes | +| ------ | ------------------------- | ------------------------------------------------------ | +| `'` | literal string | less escaping | +| `"` | string | more escaping | +| `'''` | multi-line literal string | less escaping | +| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | + +Ví dụ: + +```toml +# literal string +format = '☺\☻ ' + +# regular string +format = "☺\\☻ " + +# escaping Starship symbols +format = '\[\$\] ' +``` + +When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: + +```toml +# with literal string +format = ''' + +\$''' + +# with multiline basic string +format = """ + +\\$""" + +# with basic string +format = "\n\\$" +``` + +In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. + +```toml +format = """ +line1\ +line1\ +line1 +line2\ +line2\ +line2 +""" +``` + ### Định dạng các chuỗi Định dạng các chuỗi là định dạng một module với việc in ra tất cả các biến của nó. Đa số các module có một cái bắt đầu gọi là `format`, cái đó cấu hình việc hiển thị định dạng của module. Bạn có thể sử dụng các văn bản, các biến và các nhóm văn bản trong một định dạng chuỗi. @@ -80,9 +138,9 @@ Một biến chứa một kí hiệu `$` theo sau bởi tên biến. The name of Ví dụ: -- `$version` là một đính dạng chuỗi với một biến đặt tên là `version`. -- `$git_branch$git_commit` là một định dạng chuỗi với hai biến named `git_branch` và `git_commit`. -- `$git_branch $git_commit` có hai biến phân cách bằng một khoảng trắng. +- `'$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. #### Nhóm văn bản @@ -94,20 +152,20 @@ Phần thứ hai, cái được bao bọc trong một `()`, là một [chuỗi k Ví dụ: -- `[on](red bold)` sẽ in một chuỗi `on` với chữ đậm tô màu đỏ. -- `[⌘ $version](bold green)` sẽ in một biểu tượng `⌘` theo sau là nội dung của biến `version`, với chữ in đậm màu xanh lá cây. -- `[a [b](red) c](green)` sẽ in `a b c` với `b` màu đỏ, `a` và `c` màu xanh lá cây. +- `'[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. #### Các chuỗi kiểu Đa số các module trong starship cho phép bạn cấu hình kiểu hiển thị của chúng. This is done with an entry (thường được gọi là `kiểu`) cái là một cuỗi cấu hình đặc biệt. Đây là vài ví dụ của các chuỗi kiểu cũng với những gì chúng làm. Cú pháp chi tiết đầy đủ, tham khảo [hướng dẫn cấu hình nâng cao](/advanced-config/). -- `"fg:green bg:blue"` thiết lập chữ màu xanh lá cây trên nền màu xanh nước biển -- `"bg:blue fg:bright-green"` thiết lập chữ màu xanh lá cây sáng trên nền màu canh nước biển -- `"bold fg:27"` thiết lập chữ đậm với [màu ANSI](https://i.stack.imgur.com/KTSQa.png) 27 -- `"underline bg:#bf5700"` thiết lập chữ gạch chân trên một nền màu da cam -- `"bold italic fg:purple"` thiết lập chữa nghiêng đậm có màu tím -- `""` vô hiệu hoá tất cả các kiểu +- `'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 Lưu ý rằng những style trông như thế nào sẽ được điều khiển bởi giả lập terminal của bạn. Ví dụ, một vài giả lập terminal sẽ làm sáng những màu thay vì làm đậm chữ, và một vài theme màu sử dụng cũng các giá trị cho các màu thường và màu sáng. Tương tự, để có được chữ nghiêng, terminal của bạn phải hỗ trợ các kiểu chữ nghiêng. @@ -117,43 +175,20 @@ Một điều kiện định dạng chuỗi bọc trong `(` và `)` sẽ không Ví dụ: -- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. -- `(một vài văn bản)` sẽ không hiển thị thứ gì khi không có những biến bọc trong các dấu ngoặc. -- Khi `$all` là một shortcut cho `\[$a$b\]`, `($all)` sẽ không hiển thị chỉ khi `$a` và `$b` đều là `None`. Cái này làm việc giống như `(\[$a$b\] )`. - -#### Special characters - -The following symbols have special usage in a format string and must be escaped: `$ \ [ ] ( )`. - -Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). - -Ví dụ, khi bạn muốn in một kí hiệu `$` trên một dòng mới, các cấu hình sau cho `định dạng` tương đương: - -```toml -# với chuỗi cơ bản -format = "\n\\$" - -# với chuỗi cơ bản trong nhiều dòng -format = """ - -\\$""" - -# với chuỗi đặc biệt -format = ''' - -\$''' -``` +- `'(@$region)'` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. +- `'(some text)'` will always show nothing since there are no variables wrapped in the braces. +- When `$combined` is a shortcut for `\[$a$b\]`, `'($combined)'` will show nothing only if `$a` and `$b` are both `None`. This works the same as `'(\[$a$b\] )'`. ### Negative matching -Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched. +Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading '!' character. The presence of _any_ negative indicator in the directory will result in the module not being matched. Extensions are matched against both the characters after the last dot in a filename, and the characters after the first dot in a filename. For example, `foo.bar.tar.gz` will be matched against `bar.tar.gz` and `gz` in the `detect_extensions` variable. Files whose name begins with a dot are not considered to have extensions at all. To see how this works in practice, you could match TypeScript but not MPEG Transport Stream files thus: ```toml -detect_extensions = ["ts", "!video.ts", "!audio.ts"] +detect_extensions = ['ts', '!video.ts', '!audio.ts'] ``` ## Prompt @@ -165,11 +200,11 @@ Cái này là danh sách các tuỳ chọn cho cấu hình prompt-wide. | Tuỳ chọn | Mặc định | Mô tả | | ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `format` | [link](#default-prompt-format) | Cấu hình định dạng của prompt. | -| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | +| `right_format` | `''` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | | `scan_timeout` | `30` | Timeout của starship cho việc quét các tập tin (tính theo milliseconds). | | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Chèn dòng trắng giữa các dấu nhắc lệnh. | -| `palette` | `""` | Sets which color palette from `palettes` to use. | +| `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | ### Ví dụ @@ -177,27 +212,27 @@ Cái này là danh sách các tuỳ chọn cho cấu hình prompt-wide. ```toml # ~/.config/starship.toml -# Sử dụng định dạng custom -format = """ +# Use custom format +format = ''' [┌───────────────────>](bold green) [│](bold green)$directory$rust$package -[└─>](bold green) """ +[└─>](bold green) ''' -# Chờ 10 milliseconds để starship kiểm tra các tập tin trong đường dẫn hiện tại. +# Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 # Disable the blank line at the start of the prompt add_newline = false -# Set "foo" as custom color palette -palette = "foo" +# Set 'foo' as custom color palette +palette = 'foo' # Define custom colors [palettes.foo] # Overwrite existing color -blue = "21" +blue = '21' # Define new color -mustard = "#af8700" +mustard = '#af8700' ``` ### Định dạng prompt mặc định @@ -205,7 +240,7 @@ mustard = "#af8700" Mặc định `format` được sử dụng để định nghĩa định dạng của prompt, nếu rỗng hoặc không `format` được cung cấp. Mặc định như sau: ```toml -format = "$all" +format = '$all' # Which is equivalent to format = """ @@ -236,7 +271,9 @@ $elixir\ $elm\ $erlang\ $golang\ +$guix_shell\ $haskell\ +$haxe\ $helm\ $java\ $julia\ @@ -245,6 +282,7 @@ $lua\ $nim\ $nodejs\ $ocaml\ +$opa\ $perl\ $php\ $pulumi\ @@ -281,6 +319,7 @@ $jobs\ $battery\ $time\ $status\ +$os\ $container\ $shell\ $character""" @@ -290,7 +329,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format = "$all$directory$character" +format = '$all$directory$character' ``` ## AWS @@ -305,15 +344,17 @@ When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. +When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. + ### Các tuỳ chọn | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | Định dạng cho module. | -| `symbol` | `"☁️ "` | Kí hiệu sử dụng hiển thị trước profile AWS hiện tại. | -| `region_aliases` | | Bảng của các region alias để hiển thị ngoài tên AWS. | -| `profile_aliases` | | Table of profile aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | Kiểu cho module. | +| `symbol` | `'☁️ '` | Kí hiệu sử dụng hiển thị trước profile AWS hiện tại. | +| `region_aliases` | `{}` | Bảng của các region alias để hiển thị ngoài tên AWS. | +| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | +| `style` | `'bold yellow'` | Kiểu cho module. | | `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Vô hiệu `AWS` module. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -330,7 +371,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL *: Biến này có thể chỉ được sử dụng như một phần của style string -### Các vị dụ +### Các ví dụ #### Hiển thị mọi thứ @@ -339,11 +380,11 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL [aws] format = 'on [$symbol($profile )(\($region\) )]($style)' -style = "bold blue" -symbol = "🅰 " +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' [aws.profile_aliases] CompanyGroupFrobozzOnCallAccess = 'Frobozz' ``` @@ -354,12 +395,12 @@ CompanyGroupFrobozzOnCallAccess = 'Frobozz' # ~/.config/starship.toml [aws] -format = "on [$symbol$region]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$region]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' ``` #### Hiển thị profile @@ -368,34 +409,48 @@ us-east-1 = "va" # ~/.config/starship.toml [aws] -format = "on [$symbol$profile]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$profile]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.profile_aliases] Enterprise_Naming_Scheme-voidstars = 'void**' ``` ## Azure -The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription, as defined in the `~/.azure/azureProfile.json` file. +The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription or the username, as defined in the `~/.azure/azureProfile.json` file. ### Các tuỳ chọn | Biến | Mặc định | Mô tả | | ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `"on [$symbol($subscription)]($style) "` | The format for the Azure module to render. | -| `symbol` | `"ﴃ "` | The symbol used in the format. | -| `style` | `"blue bold"` | The style used in the format. | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'ﴃ '` | The symbol used in the format. | +| `style` | `'blue bold'` | The style used in the format. | | `disabled` | `true` | Disables the `azure` module. | -### Ví dụ +### Các ví dụ + +#### Display Subscription Name ```toml # ~/.config/starship.toml [azure] disabled = false -format = "on [$symbol($subscription)]($style) " +format = 'on [$symbol($subscription)]($style) ' +symbol = 'ﴃ ' +style = 'blue bold' +``` + +#### Display Username + +```toml +# ~/.config/starship.toml + +[azure] +disabled = false +format = "on [$symbol($username)]($style) " symbol = "ﴃ " style = "blue bold" ``` @@ -408,12 +463,12 @@ style = "blue bold" | Tuỳ chọn | Mặc định | Mô tả | | -------------------- | --------------------------------- | -------------------------------------------------------- | -| `full_symbol` | `" "` | Kí hiệu cho biết khi pin đầy. | -| `charging_symbol` | `" "` | Kí hiệu cho biết khi ping đang sạc. | -| `discharging_symbol` | `" "` | Kí hiệu cho biết khi pin đang không sạc. | -| `unknown_symbol` | `" "` | Kí hiệu cho biết khi trạng thái pin không được xác định. | -| `empty_symbol` | `" "` | Kí hiệu cho biết khi hết pin. | -| `format` | `"[$symbol$percentage]($style) "` | Định dạng cho module. | +| `full_symbol` | `' '` | Kí hiệu cho biết khi pin đầy. | +| `charging_symbol` | `' '` | Kí hiệu cho biết khi ping đang sạc. | +| `discharging_symbol` | `' '` | Kí hiệu cho biết khi pin đang không sạc. | +| `unknown_symbol` | `' '` | Kí hiệu cho biết khi trạng thái pin không được xác định. | +| `empty_symbol` | `' '` | Kí hiệu cho biết khi hết pin. | +| `format` | `'[$symbol$percentage]($style) '` | Định dạng cho module. | | `display` | [link](#battery-display) | Ngưỡng hiển thị và kiểu cho module. | | `disabled` | `false` | Vô hiệu `battery` module. | @@ -423,9 +478,9 @@ style = "blue bold" # ~/.config/starship.toml [battery] -full_symbol = "🔋 " -charging_symbol = "⚡️ " -discharging_symbol = "💀 " +full_symbol = '🔋 ' +charging_symbol = '⚡️ ' +discharging_symbol = '💀 ' ``` ### Hiển thị pin @@ -435,7 +490,7 @@ The `display` configuration option is used to define when the battery indicator ```toml [[battery.display]] threshold = 10 -style = "bold red" +style = 'bold red' ``` The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. @@ -447,21 +502,21 @@ Tuỳ chọn `display` là một mảng của của bảng sau. | Tuỳ chọn | Mặc định | Mô tả | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | | `threshold` | `10` | Cận trên cho tuỳ chọn hiển thị. | -| `style` | `"red bold"` | Kiểu sử dụng nếu tuỳ chọn hiển thị được sử dụng bên trong. | +| `style` | `'red bold'` | Kiểu sử dụng nếu tuỳ chọn hiển thị được sử dụng bên trong. | | `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. | | `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. | #### Ví dụ ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% threshold = 10 -style = "bold red" +style = 'bold red' -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% threshold = 30 -style = "bold yellow" -discharging_symbol = "💦" +style = 'bold yellow' +discharging_symbol = '💦' # when capacity is over 30%, the battery indicator will not be displayed ``` @@ -477,13 +532,13 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ----------------------------------------------- | ----------------------------------------------------- | -| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. | -| `version_format` | `"v${raw}"` | The version format. | -| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. | +| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. | +| `version_format` | `'v${raw}'` | The version format. | +| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. | | `detect_extensions` | `[]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào nên kích hoạt các mô đun này. | -| `style` | `"bold blue"` | Kiểu cho module. | +| `style` | `'bold blue'` | Kiểu cho module. | | `disabled` | `false` | Vô hiệu mô đun `elixir`. | ### Các biến @@ -502,7 +557,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil # ~/.config/starship.toml [buf] -symbol = "🦬 " +symbol = '🦬 ' ``` ## Bun @@ -516,13 +571,13 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🍞 "` | A format string representing the symbol of Node.js. | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. | | `detect_extensions` | `[]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `["bun.lockb", "bunfig.toml"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['bun.lockb', 'bunfig.toml']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `style` | `"bold red"` | Kiểu cho module. | +| `style` | `'bold red'` | Kiểu cho module. | | `disabled` | `false` | Disables the `bun` module. | ### Các biến @@ -541,7 +596,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. # ~/.config/starship.toml [bun] -format = "via [🍔 $version](bold green) " +format = 'via [🍔 $version](bold green) ' ``` ## C @@ -552,14 +607,14 @@ The `c` module shows some information about your C compiler. By default the modu | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version(-$name) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"C "` | The symbol used before displaying the compiler details | -| `detect_extensions` | `["c", "h"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | | `detect_files` | `[]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `commands` | [ [ "cc", "--version" ], [ "gcc", "--version" ], [ "clang", "--version" ] ] | How to detect what the compiler is | -| `style` | `"bold 149"` | Kiểu cho module. | +| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | +| `style` | `'bold 149'` | Kiểu cho module. | | `disabled` | `false` | Disables the `c` module. | ### Các biến @@ -577,7 +632,7 @@ NB that `version` is not in the default format. The `commands` option accepts a list of commands to determine the compiler version and name. -Each command is represented as a list of the executable name, followed by its arguments, usually something like `["mycc", "--version"]`. Starship will try executing each command until it gets a result on STDOUT. +Each command is represented as a list of the executable name, followed by its arguments, usually something like `['mycc', '--version']`. Starship will try executing each command until it gets a result on STDOUT. If a C compiler is not supported by this module, you can request it by [raising an issue on GitHub](https://github.com/starship/starship/). @@ -587,7 +642,7 @@ If a C compiler is not supported by this module, you can request it by [raising # ~/.config/starship.toml [c] -format = "via [$name $version]($style)" +format = 'via [$name $version]($style)' ``` ## Character @@ -611,13 +666,13 @@ Mặc định, nó chỉ thay đổi màu. If you also want to change its shape | Tuỳ chọn | Mặc định | Mô tả | | --------------------------- | -------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"$symbol "` | Định dạng chuỗi sử dụng trước văn bản nhập vào. | -| `success_symbol` | `"[❯](bold green)"` | Định dạng chuỗi sửa dụng trước văn bản nhập vào nếu câu lệnh trước đó đã thành công. | -| `error_symbol` | `"[❯](bold red)"` | Định dạng chuỗi sửa dụng trước văn bản nhập vào nếu câu lệnh trước đó đã thất bại. | -| `vimcmd_symbol` | `"[❮](bold green)"` | Định dạng chuỗi sửa dụng trước văn bản nhập vào nếu shell trong chế độ vim normal. | -| `vimcmd_replace_one_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim `replace_one` mode. | -| `vimcmd_replace_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim replace mode. | -| `vimcmd_visual_symbol` | `"[❮](bold yellow)"` | The format string used before the text input if the shell is in vim replace mode. | +| `format` | `'$symbol '` | Định dạng chuỗi sử dụng trước văn bản nhập vào. | +| `success_symbol` | `'[❯](bold green)'` | Định dạng chuỗi sửa dụng trước văn bản nhập vào nếu câu lệnh trước đó đã thành công. | +| `error_symbol` | `'[❯](bold red)'` | Định dạng chuỗi sửa dụng trước văn bản nhập vào nếu câu lệnh trước đó đã thất bại. | +| `vimcmd_symbol` | `'[❮](bold green)'` | Định dạng chuỗi sửa dụng trước văn bản nhập vào nếu shell trong chế độ vim normal. | +| `vimcmd_replace_one_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim `replace_one` mode. | +| `vimcmd_replace_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim replace mode. | +| `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | | `disabled` | `false` | Vô hiệu module `character`. | ### Các biến @@ -626,7 +681,7 @@ Mặc định, nó chỉ thay đổi màu. If you also want to change its shape | ------ | ----- | -------------------------------------------------------------------------------------------------------- | | symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. | -### Các vị dụ +### Các ví dụ #### Có tuỳ chỉnh hình dạng lỗi @@ -634,8 +689,8 @@ Mặc định, nó chỉ thay đổi màu. If you also want to change its shape # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[✗](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[✗](bold red) ' ``` #### Không có tuỳ chỉnh hình dạng lỗi @@ -644,8 +699,8 @@ error_symbol = "[✗](bold red) " # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[➜](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[➜](bold red) ' ``` #### Có tuỳ chỉnh hình dạng vim @@ -654,7 +709,7 @@ error_symbol = "[➜](bold red) " # ~/.config/starship.toml [character] -vicmd_symbol = "[V](bold green) " +vicmd_symbol = '[V](bold green) ' ``` ## CMake @@ -668,14 +723,14 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | -------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"△ "` | Kí hiệu sử dụng trước phiên bản của cmake. | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'△ '` | Kí hiệu sử dụng trước phiên bản của cmake. | | `detect_extensions` | `[]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này | -| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Tên tệp nào sẽ kích hoạt mô-đun này | +| `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | Tên tệp nào sẽ kích hoạt mô-đun này | | `detect_folders` | `[]` | Thư mục nào sẽ kích hoạt mô-đun này | -| `style` | `"bold blue"` | Kiểu cho module. | -| `disabled` | `false` | Vô hiệu module `cmake`. | +| `style` | `'bold blue'` | Kiểu cho module. | +| `disabled` | `false` | Vô hiệu hoá `cmake` module. | ### Các biến @@ -698,11 +753,11 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold blue"` | Kiểu cho module. | -| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `symbol` | `'⚙️ '` | The symbol used before displaying the version of COBOL. | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold blue'` | Kiểu cho module. | +| `detect_extensions` | `['cbl', 'cob', 'CBL', 'COB']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | | `detect_files` | `[]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | | `disabled` | `false` | Disables the `cobol` module. | @@ -735,8 +790,8 @@ Người dùng Bash, những người cần chức năng giống preexec có th | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `min_time` | `2_000` | Khoảng thời gian ngắn nhất để hiện thời gian (tính bằng milliseconds). | | `show_milliseconds` | `false` | Hiện milliseconds. | -| `format` | `"took [$duration]($style) "` | Định dạng cho module. | -| `style` | `"bold yellow"` | Kiểu cho module. | +| `format` | `'took [$duration]($style) '` | Định dạng cho module. | +| `style` | `'bold yellow'` | Kiểu cho module. | | `disabled` | `false` | Vô hiệu module `cmd_duration`. | | `show_notifications` | `false` | Hiện thông báo desktop khi câu lệnh hoàn thành. | | `min_time_to_notify` | `45_000` | Khoảng thời gian ngắn nhất để thông báo (tính bằng milliseconds). | @@ -758,7 +813,7 @@ Người dùng Bash, những người cần chức năng giống preexec có th [cmd_duration] min_time = 500 -format = "underwent [$duration](bold yellow)" +format = 'underwent [$duration](bold yellow)' ``` ## Conda @@ -776,9 +831,9 @@ Cái này không loại bỏ conda's prompt mà nó sở hữu, bạn có thể | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | Số lượng đường dẫn của biến môi trường nên được cắt bớt, nếu biến môi trường được tạo thông qua via `conda create -p [path]`. `0` nghĩa là không cắt bớt. Cũng thấy trong module [`directory`](#directory). | -| `symbol` | `"🅒 "` | Kí hiệu sử dụng trước tên biến môi trường. | -| `style` | `"bold green"` | Kiểu cho module. | -| `format` | `"via [$symbol$environment]($style) "` | Định dạng cho module. | +| `symbol` | `'🅒 '` | Kí hiệu sử dụng trước tên biến môi trường. | +| `style` | `'bold green'` | Kiểu cho module. | +| `format` | `'via [$symbol$environment]($style) '` | Định dạng cho module. | | `ignore_base` | `true` | Bỏ qua biến môi trường `base` khi đã kích hoạt. | | `disabled` | `false` | Vô hiệu module `conda`. | @@ -798,7 +853,7 @@ Cái này không loại bỏ conda's prompt mà nó sở hữu, bạn có thể # ~/.config/starship.toml [conda] -format = "[$symbol$environment](dimmed green) " +format = '[$symbol$environment](dimmed green) ' ``` ## Container @@ -809,8 +864,8 @@ The `container` module displays a symbol and container name, if inside a contain | Tuỳ chọn | Mặc định | Mô tả | | ---------- | ---------------------------------- | ----------------------------------------- | -| `symbol` | `"⬢"` | The symbol shown, when inside a container | -| `style` | `"bold red dimmed"` | Kiểu cho module. | +| `symbol` | `'⬢'` | The symbol shown, when inside a container | +| `style` | `'bold red dimmed'` | Kiểu cho module. | | `format` | `'[$symbol \[$name\]]($style) '` | Định dạng cho module. | | `disabled` | `false` | Disables the `container` module. | @@ -844,12 +899,12 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"🔮 "` | Kí hiệu sử dụng trước phiên bản hiển thị của crystal. | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold red"` | Kiểu cho module. | -| `detect_extensions` | `["cr"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `["shard.yml"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `symbol` | `'🔮 '` | Kí hiệu sử dụng trước phiên bản hiển thị của crystal. | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold red'` | Kiểu cho module. | +| `detect_extensions` | `['cr']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['shard.yml']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | | `disabled` | `false` | Vô hiệu hoá module `crystal`. | @@ -869,7 +924,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// # ~/.config/starship.toml [crystal] -format = "via [✨ $version](bold blue) " +format = 'via [✨ $version](bold blue) ' ``` ## Daml @@ -882,12 +937,12 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"Λ "` | A format string representing the symbol of Daml | -| `style` | `"bold cyan"` | Kiểu cho module. | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'Λ '` | A format string representing the symbol of Daml | +| `style` | `'bold cyan'` | Kiểu cho module. | | `detect_extensions` | `[]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `["daml.yaml"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['daml.yaml']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | | `disabled` | `false` | Disables the `daml` module. | @@ -907,7 +962,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d # ~/.config/starship.toml [daml] -format = "via [D $version](bold bright-green) " +format = 'via [D $version](bold bright-green) ' ``` ## Dart @@ -922,13 +977,13 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | Một chuỗi định dạng hiển thị biểu tượng của Dart | -| `detect_extensions` | `["dart"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | -| `detect_folders` | `[".dart_tool"]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `style` | `"bold blue"` | Kiểu cho module. | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🎯 '` | Một chuỗi định dạng hiển thị biểu tượng của Dart | +| `detect_extensions` | `['dart']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `detect_folders` | `['.dart_tool']` | Những thư mục nào sẽ kích hoạt mô-đun này. | +| `style` | `'bold blue'` | Kiểu cho module. | | `disabled` | `false` | Vô hiệu `dart` module. | ### Các biến @@ -947,7 +1002,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d # ~/.config/starship.toml [dart] -format = "via [🔰 $version](bold red) " +format = 'via [🔰 $version](bold red) ' ``` ## Deno @@ -960,13 +1015,13 @@ The `deno` module shows you your currently installed version of [Deno](https://d | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦕 "` | A format string representing the symbol of Deno | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦕 '` | A format string representing the symbol of Deno | | `detect_extensions` | `[]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `["deno.json", "deno.jsonc", "mod.ts", "mod.js", "deps.ts", "deps.js"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `style` | `"green bold"` | Kiểu cho module. | +| `style` | `'green bold'` | Kiểu cho module. | | `disabled` | `false` | Disables the `deno` module. | ### Các biến @@ -983,7 +1038,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d # ~/.config/starship.toml [deno] -format = "via [🦕 $version](green bold) " +format = 'via [🦕 $version](green bold) ' ``` ## Đường dẫn @@ -996,20 +1051,21 @@ Cho ví dụ, `~/Dev/Nix/nixpkgs/pkgs` nơi `nixpkgs` là gốc của repo, và ### Các tuỳ chọn -| Tuỳ chọn | Mặc định | Mô tả | -| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | Số lượng thư mục cha của thư mục hiện tại nên được rút gọn. | -| `truncate_to_repo` | `true` | Có hoặc không rút gọn đường dẫn gốc của git repo hiện tại của bạn. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | Định dạng cho module. | -| `style` | `"bold cyan"` | Kiểu cho module. | -| `disabled` | `false` | Vô hiệu mô đun `directory`. | -| `read_only` | `"🔒"` | Biểu tượng để nhận biết thư mục hiện tại là chỉ đọc. | -| `read_only_style` | `"red"` | Style cho biểu tượng chỉ đọc. | -| `truncation_symbol` | `""` | Biểu tượng tiền tố cho các đường dẫn rút gọn. ví dụ: "…/" | -| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | -| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | -| `home_symbol` | `"~"` | Biểu tượng nhận biết thư mục home. | -| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) | +| Tuỳ chọn | Mặc định | Mô tả | +| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | Số lượng thư mục cha của thư mục hiện tại nên được rút gọn. | +| `truncate_to_repo` | `true` | Có hoặc không rút gọn đường dẫn gốc của git repo hiện tại của bạn. | +| `format` | `'[$path]($style)[$read_only]($read_only_style) '` | Định dạng cho module. | +| `style` | `'bold cyan'` | Kiểu cho module. | +| `disabled` | `false` | Vô hiệu mô đun `directory`. | +| `read_only` | `'🔒'` | Biểu tượng để nhận biết thư mục hiện tại là chỉ đọc. | +| `read_only_style` | `'red'` | Style cho biểu tượng chỉ đọc. | +| `truncation_symbol` | `''` | Biểu tượng tiền tố cho các đường dẫn rút gọn. eg: '…/' | +| `before_repo_root_style` | | The style for the path segment above the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `'[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) '` | The format of a git repo when `before_repo_root_style` and `repo_root_style` is defined. | +| `home_symbol` | `'~'` | Biểu tượng nhận biết thư mục home. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
Mô đun này có một vài tùy chọn nâng cao để điều khiển cách thư mục được hiển thị. @@ -1024,8 +1080,8 @@ Cho ví dụ, `~/Dev/Nix/nixpkgs/pkgs` nơi `nixpkgs` là gốc của repo, và ```toml [directory.substitutions] -"/Volumes/network/path" = "/net" -"src/com/long/java/path" = "mypath" +'/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`. @@ -1036,8 +1092,8 @@ Cho ví dụ, `~/Dev/Nix/nixpkgs/pkgs` nơi `nixpkgs` là gốc của repo, và | Biến | Ví dụ | Mô tả | | --------- | --------------------- | -------------------------- | -| path | `"D:/Projects"` | Đường dẫn thư mục hiện tại | -| style\* | `"black bold dimmed"` | Giá trị ghi đè của `style` | +| path | `'D:/Projects'` | Đường dẫn thư mục hiện tại | +| style\* | `'black bold dimmed'` | Giá trị ghi đè của `style` | *: Biến này có thể chỉ được sử dụng như một phần của style string @@ -1048,11 +1104,11 @@ Let us consider the path `/path/to/home/git_repo/src/lib` | Biến | Ví dụ | Mô tả | | ------------------ | --------------------- | --------------------------------------- | -| before_root_path | `"/path/to/home/"` | The path before git root directory path | -| repo_root | `"git_repo"` | The git root directory name | -| path | `"/src/lib"` | The remaining path | -| style | `"black bold dimmed"` | Giá trị ghi đè của `style` | -| repo_root_style | `"underline white"` | Style for git root directory name | +| before_root_path | `'/path/to/home/'` | The path before git root directory path | +| repo_root | `'git_repo'` | The git root directory name | +| path | `'/src/lib'` | The remaining path | +| style | `'black bold dimmed'` | Giá trị ghi đè của `style` | +| repo_root_style | `'underline white'` | Style for git root directory name |
@@ -1063,7 +1119,7 @@ Let us consider the path `/path/to/home/git_repo/src/lib` [directory] truncation_length = 8 -truncation_symbol = "…/" +truncation_symbol = '…/' ``` ## Docker Context @@ -1074,13 +1130,13 @@ The `docker_context` module shows the currently active [Docker context](https:// | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | Định dạng cho module. | -| `symbol` | `"🐳 "` | Biểu tượng sử dụng để hiển thị trước Docker context. | +| `format` | `'via [$symbol$context]($style) '` | Định dạng cho module. | +| `symbol` | `'🐳 '` | Biểu tượng sử dụng để hiển thị trước Docker context. | | `only_with_files` | `true` | Chỉ hiển thị khi có một tệp tin khớp | | `detect_extensions` | `[]` | Các mở rộng nào nên kích hoạt mô đun này (cần `only_with_files` thiết lập là true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Tên tệp tin nào nên kích hoạt mô đun này (cần `only_with_files` được thiết lập là true). | +| `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | Tên tệp tin nào nên kích hoạt mô đun này (cần `only_with_files` được thiết lập là true). | | `detect_folders` | `[]` | Thư mục nào nên kích hoạt mô đun này (cần `only_with_files` được thiết lập là true). | -| `style` | `"blue bold"` | Kiểu cho module. | +| `style` | `'blue bold'` | Kiểu cho module. | | `disabled` | `false` | Vô hiệu mô đun `docker_context`. | ### Các biến @@ -1099,7 +1155,7 @@ The `docker_context` module shows the currently active [Docker context](https:// # ~/.config/starship.toml [docker_context] -format = "via [🐋 $context](blue bold)" +format = 'via [🐋 $context](blue bold)' ``` ## Dotnet @@ -1127,14 +1183,14 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$var_cluster" +'dev.local.cluster.k8s' = 'dev' +'.*/openshift-cluster/.*' = 'openshift' +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' [kubernetes.user_aliases] -"dev.local.cluster.k8s" = "dev" -"root/.*" = "root" +'dev.local.cluster.k8s' = 'dev' +'root/.*' = 'root' ``` Only show the module in directories that contain a `k8s` file. @@ -2121,14 +2249,14 @@ Long and automatically generated cluster names can be identified and shortened u ```toml [kubernetes.context_aliases] # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -".*/openshift-cluster/.*" = "openshift" +'.*/openshift-cluster/.*' = 'openshift' # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$var_cluster" +'.*/(?P[\\w-]+)/.*' = '$var_cluster' # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' ``` ## Line Break @@ -2159,8 +2287,8 @@ The `localip` module shows the IPv4 address of the primary network interface. | Tuỳ chọn | Mặc định | Mô tả | | ---------- | ------------------------- | ------------------------------------------------------ | | `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | Định dạng cho module. | -| `style` | `"bold yellow"` | Kiểu cho module. | +| `format` | `'[$localipv4]($style) '` | Định dạng cho module. | +| `style` | `'bold yellow'` | Kiểu cho module. | | `disabled` | `true` | Disables the `localip` module. | ### Các biến @@ -2179,7 +2307,7 @@ The `localip` module shows the IPv4 address of the primary network interface. [localip] ssh_only = false -format = "@[$localipv4](bold red) " +format = '@[$localipv4](bold red) ' disabled = false ``` @@ -2195,14 +2323,14 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | -------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | -| `detect_extensions` | `["lua"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `[".lua-version"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | -| `detect_folders` | `["lua"]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `style` | `"bold blue"` | Kiểu cho module. | -| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🌙 '` | A format string representing the symbol of Lua. | +| `detect_extensions` | `['lua']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['.lua-version']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `detect_folders` | `['lua']` | Những thư mục nào sẽ kích hoạt mô-đun này. | +| `style` | `'bold blue'` | Kiểu cho module. | +| `lua_binary` | `'lua'` | Configures the lua binary that Starship executes when getting the version. | | `disabled` | `false` | Disables the `lua` module. | ### Các biến @@ -2221,7 +2349,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o # ~/.config/starship.toml [lua] -format = "via [🌕 $version](bold blue) " +format = 'via [🌕 $version](bold blue) ' ``` ## Memory Usage @@ -2241,9 +2369,9 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế | Tuỳ chọn | Mặc định | Mô tả | | ----------- | ----------------------------------------------- | -------------------------------------------------------- | | `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | Định dạng cho module. | -| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | -| `style` | `"bold dimmed white"` | Kiểu cho module. | +| `format` | `'via $symbol [${ram}( \| ${swap})]($style) '` | Định dạng cho module. | +| `symbol` | `'🐏'` | The symbol used before displaying the memory usage. | +| `style` | `'bold dimmed white'` | Kiểu cho module. | | `disabled` | `true` | Disables the `memory_usage` module. | ### Các biến @@ -2267,8 +2395,8 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế [memory_usage] disabled = false threshold = -1 -symbol = " " -style = "bold dimmed green" +symbol = ' ' +style = 'bold dimmed green' ``` ## Meson @@ -2279,14 +2407,14 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. ### Các tuỳ chọn -| Tuỳ chọn | Mặc định | Mô tả | -| ------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------- | -| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | -| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. Bạn có thể sử dụng `""` để ẩn biểu tượng. | -| `format` | `"via [$symbol$project]($style) "` | Định dạng cho module. | -| `symbol` | `"⬢ "` | The symbol used before displaying the project name. | -| `style` | `"blue bold"` | Kiểu cho module. | -| `disabled` | `false` | Disables the `meson` module. | +| Tuỳ chọn | Mặc định | Mô tả | +| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- | +| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | +| `format` | `'via [$symbol$project]($style) '` | Định dạng cho module. | +| `symbol` | `'⬢ '` | The symbol used before displaying the project name. | +| `style` | `'blue bold'` | Kiểu cho module. | +| `disabled` | `false` | Disables the `meson` module. | ### Các biến @@ -2305,9 +2433,9 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. [meson] disabled = false -truncation_symbol = "--" -symbol = " " -style = "bold dimmed green" +truncation_symbol = '--' +symbol = ' ' +style = 'bold dimmed green' ``` ## Mercurial Branch @@ -2318,11 +2446,11 @@ The `hg_branch` module shows the active branch of the repo in your current direc | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | -| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | -| `style` | `"bold purple"` | Kiểu cho module. | -| `format` | `"on [$symbol$branch]($style) "` | Định dạng cho module. | +| `symbol` | `' '` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `style` | `'bold purple'` | Kiểu cho module. | +| `format` | `'on [$symbol$branch]($style) '` | Định dạng cho module. | | `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | -| `truncation_symbol` | `"…"` | Biểu tượng sử dụng để nhận biết một tên nhánh được rút gọn. | +| `truncation_symbol` | `'…'` | Biểu tượng sử dụng để nhận biết một tên nhánh được rút gọn. | | `disabled` | `true` | Disables the `hg_branch` module. | ### Các biến @@ -2341,16 +2469,16 @@ The `hg_branch` module shows the active branch of the repo in your current direc # ~/.config/starship.toml [hg_branch] -format = "on [🌱 $branch](bold purple)" +format = 'on [🌱 $branch](bold purple)' truncation_length = 4 -truncation_symbol = "" +truncation_symbol = '' ``` ## Nim The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/). Mặc định module sẽ được hiển thị nếu có bất kì điều kiện nào dưới đây thoả mãn: -- Đường dẫn hiện tại chứa một tập tin `nim.cfg` +- Thư mục hiện tại chứa một tập tin `nim.cfg` - 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 @@ -2359,13 +2487,13 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | -| `detect_extensions` | `["nim", "nims", "nimble"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `["nim.cfg"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'👑 '` | The symbol used before displaying the version of Nim. | +| `detect_extensions` | `['nim', 'nims', 'nimble']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['nim.cfg']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `style` | `"bold yellow"` | Kiểu cho module. | +| `style` | `'bold yellow'` | Kiểu cho module. | | `disabled` | `false` | Disables the `nim` module. | ### Các biến @@ -2384,8 +2512,8 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang # ~/.config/starship.toml [nim] -style = "yellow" -symbol = "🎣 " +style = 'yellow' +symbol = '🎣 ' ``` ## Nix-shell @@ -2397,10 +2525,10 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | Tuỳ chọn | Mặc định | Mô tả | | ------------ | ---------------------------------------------- | ----------------------------------------------------- | | `format` | `'via [$symbol$state( \($name\))]($style) '` | Định dạng cho module. | -| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | -| `style` | `"bold blue"` | Kiểu cho 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. | +| `symbol` | `'❄️ '` | A format string representing the symbol of nix-shell. | +| `style` | `'bold blue'` | Kiểu cho 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. | ### Các biến @@ -2421,8 +2549,8 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ [nix_shell] disabled = true -impure_msg = "[impure shell](bold red)" -pure_msg = "[pure shell](bold green)" +impure_msg = '[impure shell](bold red)' +pure_msg = '[pure shell](bold green)' format = 'via [☃️ $state( \($name\))](bold blue) ' ``` @@ -2430,7 +2558,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' The `nodejs` module shows the currently installed version of [Node.js](https://nodejs.org/). Mặc định module sẽ được hiển thị nếu có bất kì điều kiện nào dưới đây thoả mãn: -- Đường dẫn hiện tại chứa một tập tin `package.json` +- Thư mục hiện tại chứa một tập tin `package.json` - The current directory contains a `.node-version` file - The current directory contains a `.nvmrc` file - The current directory contains a `node_modules` directory @@ -2441,13 +2569,13 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string representing the symbol of Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts", "mts", "cts"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `["package.json", ".node-version"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | -| `detect_folders` | `["node_modules"]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `style` | `"bold green"` | Kiểu cho module. | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string representing the symbol of Node.js. | +| `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['package.json', '.node-version']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `detect_folders` | `['node_modules']` | Những thư mục nào sẽ kích hoạt mô-đun này. | +| `style` | `'bold green'` | Kiểu cho module. | | `disabled` | `false` | Disables the `nodejs` module. | | `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | @@ -2467,7 +2595,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n # ~/.config/starship.toml [nodejs] -format = "via [🤖 $version](bold green) " +format = 'via [🤖 $version](bold green) ' ``` ## OCaml @@ -2485,15 +2613,15 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | Tuỳ chọn | Mặc định | Mô tả | | ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | -| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | -| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | -| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | -| `detect_folders` | `["_opam", "esy.lock"]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `style` | `"bold yellow"` | Kiểu cho module. | +| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐫 '` | The symbol used before displaying the version of OCaml. | +| `global_switch_indicator` | `''` | The format string used to represent global OPAM switch. | +| `local_switch_indicator` | `'*'` | The format string used to represent local OPAM switch. | +| `detect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['dune', 'dune-project', 'jbuild', 'jbuild-ignore', '.merlin']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `detect_folders` | `['_opam', 'esy.lock']` | Những thư mục nào sẽ kích hoạt mô-đun này. | +| `style` | `'bold yellow'` | Kiểu cho module. | | `disabled` | `false` | Disables the `ocaml` module. | ### Các biến @@ -2514,7 +2642,43 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam # ~/.config/starship.toml [ocaml] -format = "via [🐪 $version]($style) " +format = 'via [🐪 $version]($style) ' +``` + +## Open Policy Agent + +The `opa` module shows the currently installed version of the OPA tool. By default the module will be shown if the current directory contains a `.rego` file. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | +| `detect_extensions` | `['rego']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `[]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | +| `style` | `'bold blue'` | Kiểu cho module. | +| `disabled` | `false` | Disables the `opa` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | --------- | -------------------------------- | +| version | `v0.44.0` | The version of `opa` | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[opa] +format = 'via [⛑️ $version](bold red) ' ``` ## OpenStack @@ -2526,8 +2690,8 @@ The `openstack` module shows the current OpenStack cloud and project. The module | Tuỳ chọn | Mặc định | Mô tả | | ---------- | ----------------------------------------------- | -------------------------------------------------------------- | | `format` | `'on [$symbol$cloud(\($project\))]($style) '` | Định dạng cho module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | -| `style` | `"bold yellow"` | Kiểu cho module. | +| `symbol` | `'☁️ '` | The symbol used before displaying the current OpenStack cloud. | +| `style` | `'bold yellow'` | Kiểu cho module. | | `disabled` | `false` | Disables the `openstack` module. | ### Các biến @@ -2548,8 +2712,105 @@ The `openstack` module shows the current OpenStack cloud and project. The module [openstack] format = 'on [$symbol$cloud(\($project\))]($style) ' -style = "bold yellow" -symbol = "☁️ " +style = 'bold yellow' +symbol = '☁️ ' +``` + +## OS + +The `os` module shows the current operating system. OS information is detected via the [os_info](https://lib.rs/crates/os_info) crate. + +::: cảnh báo + +The [os_info](https://lib.rs/crates/os_info) crate used by this module is known to be inaccurate on some systems. + +::: + +::: tip + +Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiết lập `disabled` sang `false` trong tập tin cấu hình của bạn. + +::: + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | --------------------- | ------------------------------------------------------ | +| `format` | `"[$symbol]($style)"` | Định dạng cho module. | +| `style` | `"bold white"` | Kiểu cho module. | +| `disabled` | `true` | Disables the `os` module. | +| `symbols` | | A table that maps each operating system to its symbol. | + +`symbols` allows you to define arbitrary symbols to display for each operating system type. Operating system types not defined by your configuration use the default symbols table below. All operating systems currently supported by the module are listed below. If you would like an operating system to be added, feel free to open a [feature request](https://github.com/starship/starship/issues/new/choose). + +```toml +# This is the default symbols table. +[os.symbols] +Alpine = "🏔️ " +Amazon = "🙂 " +Android = "🤖 " +Arch = "🎗️ " +CentOS = "💠 " +Debian = "🌀 " +DragonFly = "🐉 " +Emscripten = "🔗 " +EndeavourOS = "🚀 " +Fedora = "🎩 " +FreeBSD = "😈 " +Garuda = "🦅 " +Gentoo = "🗜️ " +HardenedBSD = "🛡️ " +Illumos = "🐦 " +Linux = "🐧 " +Macos = "🍎 " +Manjaro = "🥭 " +Mariner = "🌊 " +MidnightBSD = "🌘 " +Mint = "🌿 " +NetBSD = "🚩 " +NixOS = "❄️ " +OpenBSD = "🐡 " +openSUSE = "🦎 " +OracleLinux = "🦴 " +Pop = "🍭 " +Raspbian = "🍓 " +Redhat = "🎩 " +RedHatEnterprise = "🎩 " +Redox = "🧪 " +Solus = "⛵ " +SUSE = "🦎 " +Ubuntu = "🎯 " +Unknown = "❓ " +Windows = "🪟 " +``` + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | ------------ | ------------------------------------------------------------------ | +| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | +| name | `Arch Linux` | The current operating system name | +| type | `Arch` | The current operating system type | +| codename | | The current operating system codename, if applicable | +| edition | | The current operating system edition, if applicable | +| version | | The current operating system version, if applicable | +| style\* | | Giá trị ghi đè của `style` | + +*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[os] +format = "on [($name )]($style)" +style = "bold blue" +disabled = false + +[os.symbols] +Windows = " " +Arch = "Arch is the best! " ``` ## Package Version @@ -2580,10 +2841,10 @@ The `package` module is shown when the current directory is the repository for a | Tuỳ chọn | Mặc định | Mô tả | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"is [$symbol$version]($style) "` | Định dạng cho module. | -| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold 208"` | Kiểu cho module. | +| `format` | `'is [$symbol$version]($style) '` | Định dạng cho module. | +| `symbol` | `'📦 '` | The symbol used before displaying the version the package. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold 208'` | Kiểu cho module. | | `display_private` | `false` | Enable displaying version for packages marked as private. | | `disabled` | `false` | Disables the `package` module. | @@ -2603,7 +2864,7 @@ The `package` module is shown when the current directory is the repository for a # ~/.config/starship.toml [package] -format = "via [🎁 $version](208 bold) " +format = 'via [🎁 $version](208 bold) ' ``` ## Perl @@ -2620,13 +2881,13 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | -| `detect_extensions` | `["pl", "pm", "pod"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | +| `detect_extensions` | `['pl', 'pm', 'pod']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `style` | `"bold 149"` | Kiểu cho module. | +| `style` | `'bold 149'` | Kiểu cho module. | | `disabled` | `false` | Disables the `perl` module. | ### Các biến @@ -2643,14 +2904,14 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe # ~/.config/starship.toml [perl] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## PHP The `php` module shows the currently installed version of [PHP](https://www.php.net/). Mặc định module sẽ được hiển thị nếu có bất kì điều kiện nào dưới đây thoả mãn: -- Đường dẫn hiện tại chứa một tập tin `composer.json` +- The current directory contains a `composer.json` file - The current directory contains a `.php-version` file - The current directory contains a `.php` extension @@ -2658,13 +2919,13 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | -| `detect_extensions` | `["php"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `["composer.json", ".php-version"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐘 '` | The symbol used before displaying the version of PHP. | +| `detect_extensions` | `['php']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['composer.json', '.php-version']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `style` | `"147 bold"` | Kiểu cho module. | +| `style` | `'147 bold'` | Kiểu cho module. | | `disabled` | `false` | Disables the `php` module. | ### Các biến @@ -2683,7 +2944,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. # ~/.config/starship.toml [php] -format = "via [🔹 $version](147 bold) " +format = 'via [🔹 $version](147 bold) ' ``` ## Pulumi @@ -2705,10 +2966,10 @@ Mặc định module sẽ được hiển thị nếu có bất kì điều ki | Tuỳ chọn | Mặc định | Mô tả | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string shown before the Pulumi stack. | -| `style` | `"bold 5"` | Kiểu cho module. | +| `format` | `'via [$symbol($username@)$stack]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string shown before the Pulumi stack. | +| `style` | `'bold 5'` | Kiểu cho module. | | `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | | `disabled` | `false` | Disables the `pulumi` module. | @@ -2732,7 +2993,7 @@ Mặc định module sẽ được hiển thị nếu có bất kì điều ki # ~/.config/starship.toml [pulumi] -format = "[🛥 ($version )$stack]($style) " +format = '[🛥 ($version )$stack]($style) ' ``` #### Without Pulumi version @@ -2740,28 +3001,28 @@ format = "[🛥 ($version )$stack]($style) " ```toml # ~/.config/starship.toml [pulumi] -symbol = "🛥 " -format = "[$symbol$stack]($style) " +symbol = '🛥 ' +format = '[$symbol$stack]($style) ' ``` ## PureScript The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. Mặc định module sẽ được hiển thị nếu có bất kì điều kiện nào dưới đây thoả mãn: -- Đường dẫn hiện tại chứa một tập tin `spago.dhall` +- Thư mục hiện tại chứa một tập tin `spago.dhall` - The current directory contains a file with the `.purs` extension ### Các tuỳ chọn | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | -| `detect_extensions` | `["purs"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `["spago.dhall"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'<=> '` | The symbol used before displaying the version of PureScript. | +| `detect_extensions` | `['purs']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['spago.dhall']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `style` | `"bold white"` | Kiểu cho module. | +| `style` | `'bold white'` | Kiểu cho module. | | `disabled` | `false` | Disables the `purescript` module. | ### Các biến @@ -2780,7 +3041,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht # ~/.config/starship.toml [purescript] -format = "via [$symbol$version](bold white)" +format = 'via [$symbol$version](bold white)' ``` ## Python @@ -2794,10 +3055,10 @@ Mặc định module sẽ được hiển thị nếu có bất kì điều ki - The current directory contains a `.python-version` file - The current directory contains a `Pipfile` file - The current directory contains a `__init__.py` file -- Đường dẫn hiện tại chứa một tập tin `pyproject.toml` -- Đường dẫn hiện tại chứa một tập tin `requirements.txt` -- Đường dẫn hiện tại chứa một tập tin `setup.py` -- Đường dẫn hiện tại chứa một tập tin `tox.ini` +- Thư mục hiện tại chứa một tập tin `pyproject.toml` +- Thư mục hiện tại chứa một tập tin `requirements.txt` +- Thư mục hiện tại chứa một tập tin `setup.py` +- Thư mục hiện tại chứa một tập tin `tox.ini` - The current directory contains a file with the `.py` extension. - A virtual environment is currently activated @@ -2806,14 +3067,14 @@ Mặc định module sẽ được hiển thị nếu có bất kì điều ki | Tuỳ chọn | Mặc định | Mô tả | | -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | | `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | Kiểu cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐍 '` | A format string representing the symbol of Python | +| `style` | `'yellow bold'` | Kiểu cho 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 | -| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `detect_extensions` | `["py"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này | -| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Tên tệp nào sẽ kích hoạt mô-đun này | +| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | +| `detect_extensions` | `['py']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này | +| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Tên tệp nào sẽ kích hoạt mô-đun này | | `detect_folders` | `[]` | Thư mục nào sẽ kích hoạt mô-đun này | | `disabled` | `false` | Disables the `python` module. | @@ -2821,7 +3082,7 @@ Mặc định module sẽ được hiển thị nếu có bất kì điều ki 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. +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. ::: @@ -2829,11 +3090,11 @@ The default values and order for `python_binary` was chosen to first identify th | Biến | Ví dụ | Mô tả | | ------------ | --------------- | ------------------------------------------ | -| version | `"v3.8.1"` | The version of `python` | -| symbol | `"🐍 "` | Giá trị ghi đè tuỳ chọn `symbol` | -| style | `"yellow bold"` | Giá trị ghi đè của `style` | -| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | -| virtualenv | `"venv"` | The current `virtualenv` name | +| version | `'v3.8.1'` | The version of `python` | +| symbol | `'🐍 '` | Giá trị ghi đè tuỳ chọn `symbol` | +| style | `'yellow bold'` | Giá trị ghi đè của `style` | +| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` | +| virtualenv | `'venv'` | The current `virtualenv` name | ### Ví dụ @@ -2841,7 +3102,7 @@ The default values and order for `python_binary` was chosen to first identify th # ~/.config/starship.toml [python] -symbol = "👾 " +symbol = '👾 ' pyenv_version_name = true ``` @@ -2850,7 +3111,7 @@ pyenv_version_name = true [python] # Only use the `python3` binary to get the version. -python_binary = "python3" +python_binary = 'python3' ``` ```toml @@ -2869,7 +3130,7 @@ detect_extensions = [] # # Note this will only work when the venv is inside the project and it will only # work in the directory that contains the venv dir but maybe this is ok? -python_binary = ["./venv/bin/python", "python", "python3", "python2"] +python_binary = ['./venv/bin/python', 'python', 'python3', 'python2'] ``` ## R @@ -2888,13 +3149,13 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"📐"` | A format string representing the symbol of R. | -| `style` | `"blue bold"` | Kiểu cho module. | -| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này | -| `detect_files` | `[".Rprofile"]` | Tên tệp nào sẽ kích hoạt mô-đun này | -| `detect_folders` | `[".Rproj.user"]` | Thư mục nào sẽ kích hoạt mô-đun này | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'📐'` | A format string representing the symbol of R. | +| `style` | `'blue bold'` | Kiểu cho module. | +| `detect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này | +| `detect_files` | `['.Rprofile']` | Tên tệp nào sẽ kích hoạt mô-đun này | +| `detect_folders` | `['.Rproj.user']` | Thư mục nào sẽ kích hoạt mô-đun này | | `disabled` | `false` | Disables the `r` module. | ### Các biến @@ -2903,7 +3164,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | ------- | ------------- | -------------------------------- | | version | `v4.0.5` | The version of `R` | | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | -| style | `"blue bold"` | Giá trị ghi đè của `style` | +| style | `'blue bold'` | Giá trị ghi đè của `style` | ### Ví dụ @@ -2911,7 +3172,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr # ~/.config/starship.toml [rlang] -format = "with [📐 $version](blue bold) " +format = 'with [📐 $version](blue bold) ' ``` ## Raku @@ -2925,13 +3186,13 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version-$vm_version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦋 "` | The symbol used before displaying the version of Raku | -| `detect_extensions` | `["p6", "pm6", "pod6", "raku", "rakumod"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `["META6.json"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `format` | `'via [$symbol($version-$vm_version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦋 '` | The symbol used before displaying the version of Raku | +| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['META6.json']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `style` | `"bold 149"` | Kiểu cho module. | +| `style` | `'bold 149'` | Kiểu cho module. | | `disabled` | `false` | Disables the `raku` module. | ### Các biến @@ -2949,7 +3210,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra # ~/.config/starship.toml [raku] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## Red @@ -2962,13 +3223,13 @@ By default the `red` module shows the currently installed version of [Red](https | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | -| `detect_extensions` | `["red"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🔺 '` | A format string representing the symbol of Red. | +| `detect_extensions` | `['red']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | | `detect_files` | `[]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `style` | `"red bold"` | Kiểu cho module. | +| `style` | `'red bold'` | Kiểu cho module. | | `disabled` | `false` | Disables the `red` module. | ### Các biến @@ -2987,7 +3248,7 @@ By default the `red` module shows the currently installed version of [Red](https # ~/.config/starship.toml [red] -symbol = "🔴 " +symbol = '🔴 ' ``` ## Ruby @@ -3005,14 +3266,14 @@ Starship gets the current Ruby version by running `ruby -v`. | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `detect_extensions` | `["rb"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `["Gemfile", ".ruby-version"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💎 '` | A format string representing the symbol of Ruby. | +| `detect_extensions` | `['rb']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['Gemfile', '.ruby-version']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | -| `style` | `"bold red"` | Kiểu cho module. | +| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Which environment variables should trigger this module. | +| `style` | `'bold red'` | Kiểu cho module. | | `disabled` | `false` | Disables the `ruby` module. | ### Các biến @@ -3031,7 +3292,7 @@ Starship gets the current Ruby version by running `ruby -v`. # ~/.config/starship.toml [ruby] -symbol = "🔺 " +symbol = '🔺 ' ``` ## Rust @@ -3045,13 +3306,13 @@ By default the `rust` module shows the currently installed version of [Rust](htt | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `detect_extensions` | `["rs"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `["Cargo.toml"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦀 '` | A format string representing the symbol of Rust | +| `detect_extensions` | `['rs']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['Cargo.toml']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `style` | `"bold red"` | Kiểu cho module. | +| `style` | `'bold red'` | Kiểu cho module. | | `disabled` | `false` | Disables the `rust` module. | ### Các biến @@ -3072,7 +3333,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt # ~/.config/starship.toml [rust] -format = "via [⚙️ $version](red bold)" +format = 'via [⚙️ $version](red bold)' ``` ## Scala @@ -3087,13 +3348,13 @@ The `scala` module shows the currently installed version of [Scala](https://www. | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [${symbol}(${version} )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["sbt", "scala"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | -| `detect_folders` | `[".metals"]` | Những thư mục nào nên kích hoạt các mô đun này. | -| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | -| `style` | `"red dimmed"` | Kiểu cho module. | +| `format` | `'via [${symbol}(${version} )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['sbt', 'scala']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `detect_folders` | `['.metals']` | Những thư mục nào nên kích hoạt các mô đun này. | +| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. | +| `style` | `'red dimmed'` | Kiểu cho module. | | `disabled` | `false` | Disables the `scala` module. | ### Các biến @@ -3112,7 +3373,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. # ~/.config/starship.toml [scala] -symbol = "🌟 " +symbol = '🌟 ' ``` ## Shell @@ -3129,19 +3390,19 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế | Tuỳ chọn | Mặc định | Mô tả | | ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `"bsh"` | A format string used to represent bash. | -| `fish_indicator` | `"fsh"` | A format string used to represent fish. | -| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. | -| `powershell_indicator` | `"psh"` | A format string used to represent powershell. | -| `ion_indicator` | `"ion"` | A format string used to represent ion. | -| `elvish_indicator` | `"esh"` | A format string used to represent elvish. | -| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. | -| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. | -| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. | -| `nu_indicator` | `"nu"` | A format string used to represent nu. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `"[$indicator]($style) "` | Định dạng cho module. | -| `style` | `"white bold"` | Kiểu cho module. | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | Định dạng cho module. | +| `style` | `'white bold'` | Kiểu cho module. | | `disabled` | `true` | Disables the `shell` module. | ### Các biến @@ -3153,32 +3414,32 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế *: Biến này có thể chỉ được sử dụng như một phần của style string -### Các vị dụ +### Các ví dụ ```toml # ~/.config/starship.toml [shell] -fish_indicator = "" -powershell_indicator = "_" -unknown_indicator = "mystery shell" -style = "cyan bold" +fish_indicator = '' +powershell_indicator = '_' +unknown_indicator = 'mystery shell' +style = 'cyan bold' disabled = false ``` ## SHLVL -The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ('shell level') environment variable, if it is set to a number and meets or exceeds the specified threshold. ### Các tuỳ chọn | Tuỳ chọn | Mặc định | Mô tả | | ----------- | ---------------------------- | ------------------------------------------------------------- | | `threshold` | `2` | Display threshold. | -| `format` | `"[$symbol$shlvl]($style) "` | Định dạng cho module. | -| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. | +| `format` | `'[$symbol$shlvl]($style) '` | Định dạng cho module. | +| `symbol` | `'↕️ '` | The symbol used to represent the `SHLVL`. | | `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. | -| `style` | `"bold yellow"` | Kiểu cho module. | +| `style` | `'bold yellow'` | Kiểu cho module. | | `disabled` | `true` | Disables the `shlvl` module. | ### Các biến @@ -3198,7 +3459,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int [shlvl] disabled = false -format = "$shlvl level(s) down" +format = '$shlvl level(s) down' threshold = 3 ``` @@ -3211,8 +3472,8 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | Tuỳ chọn | Mặc định | Mô tả | | ---------- | -------------------------------- | ------------------------------------------------ | | `format` | `'[$symbol\[$env\]]($style) '` | Định dạng cho module. | -| `symbol` | `""` | A format string displayed before the image name. | -| `style` | `"bold dimmed blue"` | Kiểu cho module. | +| `symbol` | `''` | A format string displayed before the image name. | +| `style` | `'bold dimmed blue'` | Kiểu cho module. | | `disabled` | `false` | Disables the `singularity` module. | ### Các biến @@ -3243,9 +3504,9 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | The number of directories the environment path should be truncated to. `0` nghĩa là không cắt bớt. Cũng thấy trong module [`directory`](#directory). | -| `symbol` | `"🅢 "` | Kí hiệu sử dụng trước tên biến môi trường. | -| `style` | `"bold blue"` | Kiểu cho module. | -| `format` | `"via [$symbol$environment]($style) "` | Định dạng cho module. | +| `symbol` | `'🅢 '` | Kí hiệu sử dụng trước tên biến môi trường. | +| `style` | `'bold blue'` | Kiểu cho module. | +| `format` | `'via [$symbol$environment]($style) '` | Định dạng cho module. | | `disabled` | `false` | Disables the `spack` module. | ### Các biến @@ -3264,7 +3525,7 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat # ~/.config/starship.toml [spack] -format = "[$symbol$environment](dimmed blue) " +format = '[$symbol$environment](dimmed blue) ' ``` ## Status @@ -3281,14 +3542,14 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế | Tuỳ chọn | Mặc định | Mô tả | | --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `format` | `"[$symbol$status]($style) "` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `success_symbol` | `""` | The symbol displayed on program success | -| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | -| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | -| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | -| `style` | `"bold red"` | Kiểu cho module. | +| `format` | `'[$symbol$status]($style) '` | The format of the module | +| `symbol` | `'❌'` | The symbol displayed on program error | +| `success_symbol` | `''` | The symbol displayed on program success | +| `not_executable_symbol` | `'🚫'` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `'🔍'` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `'🧱'` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `'⚡'` | The symbol displayed on any signal | +| `style` | `'bold red'` | Kiểu cho module. | | `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code | | `pipestatus` | `false` | Enable pipestatus reporting | @@ -3320,9 +3581,9 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế # ~/.config/starship.toml [status] -style = "bg:blue" -symbol = "🔴 " -success_symbol = "🟢 SUCCESS" +style = 'bg:blue' +symbol = '🔴 ' +success_symbol = '🟢 SUCCESS' format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false @@ -3342,9 +3603,9 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế | Tuỳ chọn | Mặc định | Mô tả | | --------------- | ------------------------ | ------------------------------------------------------- | -| `format` | `"[as $symbol]($style)"` | The format of the module | -| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached | -| `style` | `"bold blue"` | Kiểu cho module. | +| `format` | `'[as $symbol]($style)'` | The format of the module | +| `symbol` | `'🧙 '` | The symbol displayed when credentials are cached | +| `style` | `'bold blue'` | Kiểu cho module. | | `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | | `disabled` | `true` | Disables the `sudo` module. | @@ -3363,8 +3624,8 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế # ~/.config/starship.toml [sudo] -style = "bold green" -symbol = "👩‍💻 " +style = 'bold green' +symbol = '👩‍💻 ' disabled = false ``` @@ -3388,13 +3649,13 @@ By default the `swift` module shows the currently installed version of [Swift](h | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `detect_extensions` | `["swift"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `["Package.swift"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐦 '` | A format string representing the symbol of Swift | +| `detect_extensions` | `['swift']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['Package.swift']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `style` | `"bold 202"` | Kiểu cho module. | +| `style` | `'bold 202'` | Kiểu cho module. | | `disabled` | `false` | Disables the `swift` module. | ### Các biến @@ -3413,7 +3674,7 @@ By default the `swift` module shows the currently installed version of [Swift](h # ~/.config/starship.toml [swift] -format = "via [🏎 $version](red bold)" +format = 'via [🏎 $version](red bold)' ``` ## Terraform @@ -3435,13 +3696,13 @@ Mặc định module sẽ được hiển thị nếu có bất kì điều ki | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `format` | `'via [$symbol$workspace]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💠'` | A format string shown before the terraform workspace. | +| `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | | `detect_files` | `[]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | -| `detect_folders` | `[".terraform"]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `style` | `"bold 105"` | Kiểu cho module. | +| `detect_folders` | `['.terraform']` | Những thư mục nào sẽ kích hoạt mô-đun này. | +| `style` | `'bold 105'` | Kiểu cho module. | | `disabled` | `false` | Disables the `terraform` module. | ### Các biến @@ -3463,7 +3724,7 @@ Mặc định module sẽ được hiển thị nếu có bất kì điều ki # ~/.config/starship.toml [terraform] -format = "[🏎💨 $version$workspace]($style) " +format = '[🏎💨 $version$workspace]($style) ' ``` #### Without Terraform version @@ -3472,7 +3733,7 @@ format = "[🏎💨 $version$workspace]($style) " # ~/.config/starship.toml [terraform] -format = "[🏎💨 $workspace]($style) " +format = '[🏎💨 $workspace]($style) ' ``` ## Thời gian @@ -3489,15 +3750,15 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế | Tuỳ chọn | Mặc định | Mô tả | | ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | The format string for the module. | +| `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. | +| `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 | +| `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. +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. ### Các biến @@ -3516,9 +3777,9 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de [time] disabled = false format = '🕙[\[ $time \]]($style) ' -time_format = "%T" -utc_time_offset = "-5" -time_range = "10:00:00-14:00:00" +time_format = '%T' +utc_time_offset = '-5' +time_range = '10:00:00-14:00:00' ``` ## Username @@ -3540,9 +3801,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Tuỳ chọn | Mặc định | Mô tả | | ------------- | ----------------------- | ------------------------------------------- | -| `style_root` | `"bold red"` | The style used when the user is root/admin. | -| `style_user` | `"bold yellow"` | The style used for non-root users. | -| `format` | `"[$user]($style) in "` | Định dạng cho module. | +| `style_root` | `'bold red'` | The style used when the user is root/admin. | +| `style_user` | `'bold yellow'` | The style used for non-root users. | +| `format` | `'[$user]($style) in '` | Định dạng cho module. | | `show_always` | `false` | Always shows the `username` module. | | `disabled` | `false` | Disables the `username` module. | @@ -3550,8 +3811,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Biến | Ví dụ | Mô tả | | ------- | ------------ | ------------------------------------------------------------------------------------------- | -| `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. | +| `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. | ### Ví dụ @@ -3559,9 +3820,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` # ~/.config/starship.toml [username] -style_user = "white bold" -style_root = "black bold" -format = "user: [$user]($style) " +style_user = 'white bold' +style_root = 'black bold' +format = 'user: [$user]($style) ' disabled = false show_always = true ``` @@ -3576,13 +3837,13 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'⍱ '` | A format string representing the symbol of Vagrant. | | `detect_extensions` | `[]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `["Vagrantfile"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['Vagrantfile']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `style` | `"cyan bold"` | Kiểu cho module. | +| `style` | `'cyan bold'` | Kiểu cho module. | | `disabled` | `false` | Disables the `vagrant` module. | ### Các biến @@ -3601,7 +3862,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// # ~/.config/starship.toml [vagrant] -format = "via [⍱ $version](bold white) " +format = 'via [⍱ $version](bold white) ' ``` ## V @@ -3615,13 +3876,13 @@ The `vlang` module shows you your currently installed version of [V](https://vla | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"V "` | A format string representing the symbol of V | -| `detect_extensions` | `["v"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'V '` | A format string representing the symbol of V | +| `detect_extensions` | `['v']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `style` | `"blue bold"` | Kiểu cho module. | +| `style` | `'blue bold'` | Kiểu cho module. | | `disabled` | `false` | Disables the `vlang` module. | ### Các biến @@ -3637,7 +3898,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla ```toml # ~/.config/starship.toml [vlang] -format = "via [V $version](blue bold) " +format = 'via [V $version](blue bold) ' ``` ## VCSH @@ -3648,9 +3909,9 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | Tuỳ chọn | Mặc định | Mô tả | | ---------- | -------------------------------- | ------------------------------------------------------ | -| `symbol` | | The symbol used before displaying the repository name. | -| `style` | `"bold yellow"` | Kiểu cho module. | -| `format` | `"vcsh [$symbol$repo]($style) "` | Định dạng cho module. | +| `symbol` | `''` | The symbol used before displaying the repository name. | +| `style` | `'bold yellow'` | Kiểu cho module. | +| `format` | `'vcsh [$symbol$repo]($style) '` | Định dạng cho module. | | `disabled` | `false` | Disables the `vcsh` module. | ### Các biến @@ -3669,7 +3930,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v # ~/.config/starship.toml [vcsh] -format = "[🆅 $repo](bold blue) " +format = '[🆅 $repo](bold blue) ' ``` ## Zig @@ -3682,12 +3943,12 @@ By default the the `zig` module shows the currently installed version of [Zig](h | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | Kiểu cho module. | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'↯ '` | The symbol used before displaying the version of Zig. | +| `style` | `'bold yellow'` | Kiểu cho module. | | `disabled` | `false` | Disables the `zig` module. | -| `detect_extensions` | `["zig"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_extensions` | `['zig']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | | `detect_files` | `[]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | @@ -3707,7 +3968,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h # ~/.config/starship.toml [zig] -symbol = "⚡️ " +symbol = '⚡️ ' ``` ## Custom commands @@ -3752,16 +4013,16 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `command` | `''` | The command whose output should be printed. The command will be passed on stdin to the shell. | | `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `mô tả` | `""` | The description of the module that is shown when running `starship explain`. | +| `mô tả` | `''` | The description of the module that is shown when running `starship explain`. | | `detect_files` | `[]` | The files that will be searched in the working directory for a match. | | `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. | | `detect_extensions` | `[]` | The extensions that will be searched in the working directory for a match. | -| `symbol` | `""` | The symbol used before displaying the command output. | -| `style` | `"bold green"` | Kiểu cho module. | -| `format` | `"[$symbol($output )]($style)"` | Định dạng cho module. | +| `symbol` | `''` | The symbol used before displaying the command output. | +| `style` | `'bold green'` | Kiểu cho module. | +| `format` | `'[$symbol($output )]($style)'` | Định dạng cho module. | | `disabled` | `false` | Disables this `custom` module. | | `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | | `use_stdin` | | An optional boolean value that overrides whether commands should be forwarded to the shell via the standard input or as an argument. If unset standard input is used by default, unless the shell does not support it (cmd, nushell). Setting this disables shell-specific argument handling. | @@ -3784,14 +4045,14 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt - 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. +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 -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. ```toml -shell = ["pwsh", "-Command", "-"] +shell = ['pwsh', '-Command', '-'] ``` ::: warning Make sure your custom shell configuration exits gracefully @@ -3812,19 +4073,19 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -detect_files = ["foo"] # can specify filters but wildcards are not supported -when = """ test "$HOME" = "$PWD" """ -format = " transcending [$output]($style)" +command = 'echo foo' # shows output of command +detect_files = ['foo'] # can specify filters but wildcards are not supported +when = ''' test "$HOME" = "$PWD" ''' +format = ' transcending [$output]($style)' [custom.time] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command', '-'] [custom.time-as-arg] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command'] use_stdin = false ``` diff --git a/docs/vi-VN/guide/README.md b/docs/vi-VN/guide/README.md index 4ecc5bc1..20cdb81f 100644 --- a/docs/vi-VN/guide/README.md +++ b/docs/vi-VN/guide/README.md @@ -219,7 +219,6 @@ Alternatively, install Starship using any of the following package managers: | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | | Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | -| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | @@ -417,6 +416,14 @@ Xin hãy xem qua những công việc này trước đây, những thứ đã gi - **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons. +## ❤️ Sponsors + +Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website. + +**Supporter Tier** + +- [Dimension](https://dimension.dev/) +


Starship rocket icon diff --git a/docs/vi-VN/presets/README.md b/docs/vi-VN/presets/README.md index 7b37c28b..8f826758 100644 --- a/docs/vi-VN/presets/README.md +++ b/docs/vi-VN/presets/README.md @@ -10,6 +10,14 @@ This preset changes the symbols for each module to use Nerd Font symbols. [![Bản chụp màn hình của Nerd Font Symbols preset](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font) +## [No Nerd Fonts](./no-nerd-font.md) + +This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt. + +::: tip This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). ::: + +[Click to view No Nerd Font preset](./no-nerd-font) + ## [Bracketed Segments](./bracketed-segments.md) This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.). @@ -28,6 +36,12 @@ This preset hides the version of language runtimes. If you work in containers or [![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes) +## [No Empty Icons](./no-empty-icons.md) + +This preset does not show icons if the toolset is not found. + +[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Click to view No Runtime Versions preset")](./no-empty-icons.md) + ## [Pure Prompt](./pure-preset.md) This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). @@ -39,3 +53,9 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship. [![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png "Click to view Pure Prompt preset")](./pastel-powerline) + +## [Tokyo Night](./tokyo-night.md) + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) diff --git a/docs/vi-VN/presets/no-empty-icons.md b/docs/vi-VN/presets/no-empty-icons.md new file mode 100644 index 00000000..86bcab85 --- /dev/null +++ b/docs/vi-VN/presets/no-empty-icons.md @@ -0,0 +1,17 @@ +[Return to Presets](./README.md#no-empty-icons) + +# No Empty Icons Preset + +If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. + +![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) + +### Cấu hình + +```sh +starship preset no-empty-icons > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-empty-icons.toml) + +<<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/vi-VN/presets/no-nerd-font.md b/docs/vi-VN/presets/no-nerd-font.md new file mode 100644 index 00000000..d439af0a --- /dev/null +++ b/docs/vi-VN/presets/no-nerd-font.md @@ -0,0 +1,19 @@ +[Return to Presets](./README.md#no-nerd-fonts) + +# No Nerd Fonts Preset + +This preset restricts the use of symbols to those from emoji and powerline sets. + +This means that even without a Nerd Font installed, you should be able to view all module symbols. + +This preset will become the default preset in a future release of starship. + +### Cấu hình + +```sh +starship preset no-nerd-font > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-nerd-font.toml) + +<<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/vi-VN/presets/tokyo-night.md b/docs/vi-VN/presets/tokyo-night.md new file mode 100644 index 00000000..c608f2ef --- /dev/null +++ b/docs/vi-VN/presets/tokyo-night.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#pastel-powerline) + +# Tokyo Night Preset + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) + +### Yêu cầu + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal + +### Cấu hình + +```sh +starship preset tokyo-night > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/tokyo-night.toml) + +<<< @/.vuepress/public/presets/toml/tokyo-night.toml diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md index 0ddd1e58..e3d658fa 100644 --- a/docs/zh-CN/README.md +++ b/docs/zh-CN/README.md @@ -66,7 +66,7 @@ description: Starship是一款轻量级、反应迅速、可自定义的高颜 #### Bash - 在 `~/.bashhrc` 的最后,添加以下内容: + 在 `~/.bashrc` 的最后,添加以下内容: ```sh # ~/.bashrc @@ -97,7 +97,7 @@ description: Starship是一款轻量级、反应迅速、可自定义的高颜 ``` - #### Powershell + #### Power Shell 将以下内容添加到 `Microsoft.PowerShell_profile.ps1`。 你可以在 PowerShell 通过 `$PROFILE` 变量来查询文件的位置。 对于 -Nix 来说,通常文件路径是 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` 或 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`。 @@ -136,7 +136,7 @@ description: Starship是一款轻量级、反应迅速、可自定义的高颜 #### Tcsh - 在 `~/.bashhrc` 的最后,添加以下内容: + 在 `~/.tcshrc` 的最后,添加以下内容: ```sh # ~/.tcshrc @@ -167,7 +167,7 @@ description: Starship是一款轻量级、反应迅速、可自定义的高颜 #### Xonsh - 在 `~/.bashhrc` 的最后,添加以下内容: + 在 `~/.xonshrc` 的最后,添加以下内容: ```sh # ~/.xonshrc diff --git a/docs/zh-CN/advanced-config/README.md b/docs/zh-CN/advanced-config/README.md index 1ed5b3b5..d4e3e227 100644 --- a/docs/zh-CN/advanced-config/README.md +++ b/docs/zh-CN/advanced-config/README.md @@ -205,7 +205,9 @@ Invoke-Expression (&starship init powershell) 注意:右侧提示和输入区显示在同一行。 如果需要在输入区的上方显示右对齐的组件,请查阅 [`fill` 组件](/config/#fill)。 -`right_format` 现支持 elvish、fish、zsh、xonsh、cmd。 +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. + +Note: Nushell 0.71.0 or later is required ### 示例 @@ -280,5 +282,5 @@ continuation_prompt = "▶▶" 并非每种类型的字符串都会被每个终端正确显示。 特别地,以下是已知的几种情况: - 许多终端默认禁用对 `blink` 的支持 -- `hidden` 在 iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564) 上不被支持。 +- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). - `strikethrough` 不被默认 macOS Terminal.app 支持 diff --git a/docs/zh-CN/config/README.md b/docs/zh-CN/config/README.md index 8a70ea13..053c003f 100644 --- a/docs/zh-CN/config/README.md +++ b/docs/zh-CN/config/README.md @@ -9,21 +9,23 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Starship 的所有配置都在此 [TOML](https://github.com/toml-lang/toml) 配置文件中完成: ```toml -# 设置配置范例,开启编辑器的自动补全 +# Get editor completions based on the config schema "$schema" = 'https://starship.rs/config-schema.json' -# 在命令之间插入空行 +# Inserts a blank line between shell prompts add_newline = true -# 将提示符的“❯”替换为“➜” -[character] # “character”是我们正在配置的组件 -success_symbol = "[➜](bold green)" # 设置“success_symbol” 字段为绿色加粗的“➜” +# 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' -# 禁用 package 组件,完全隐藏它的提示符 +# Disable the package module, hiding it from the prompt completely [package] disabled = true ``` +### Config File Location + 您可以使用 `STARSHIP_CONFIG` 环境变量更改默认配置文件的位置: ```sh @@ -70,6 +72,62 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') 依惯例,大多组件都有一个带有默认终端颜色的前缀(例如“nodejs”的 `via`),以及一个空格作为后缀。 +### Strings + +In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. + +The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. + +| Symbol | Type | Notes | +| ------ | ------------------------- | ------------------------------------------------------ | +| `'` | literal string | less escaping | +| `"` | string | more escaping | +| `'''` | multi-line literal string | less escaping | +| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | + +例如: + +```toml +# literal string +format = '☺\☻ ' + +# regular string +format = "☺\\☻ " + +# escaping Starship symbols +format = '\[\$\] ' +``` + +When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: + +```toml +# with literal string +format = ''' + +\$''' + +# with multiline basic string +format = """ + +\\$""" + +# with basic string +format = "\n\\$" +``` + +In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. + +```toml +format = """ +line1\ +line1\ +line1 +line2\ +line2\ +line2 +""" +``` + ### 格式设定 组件会根据定义的格式输出它所有的字段。 大多数组件可以通过 `format` 项来配置它的显示格式。 格式设定内可以包含文本、字段以及文本组。 @@ -80,9 +138,9 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') 例如: -- 格式设定 `$version` 由一个变量 `version` 组成。 -- 格式设定 `$git_branch$git_commit` 由两个变量 `git_branch`、`git_commit` 组成。 -- 格式设定 `$git_branch $git_commit` 由两个变量和一个空格组成。 +- `'$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. #### 文本组 @@ -94,20 +152,20 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') 例如: -- `[on](red bold)` 会输出一个加粗的红色 `on`。 -- `[⌘ $version](bold green)` 会先输出一个 `⌘`,之后是 `version` 字段的内容,都是绿色加粗的样式。 -- `[a [b](red) c](green)` 会依序输出绿色 `a`、红色 `b`、绿色 `c`。 +- `'[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. #### 样式设定 Starship 中的大多数组件允许您为其设置显示样式。 显示样式可以通过一个字符串字段(一般是 `style`)来设置。 以下的例子给出了一些样式字符串并描述了它们的效果。 样式字符串的完整语法请查阅 [高级配置指南](/advanced-config/)。 -- `"fg:green bg:blue"` 在蓝色背景上显示绿色文本 -- `"bg:blue fg:bright-green"` 在蓝色背景上显示亮绿色文本 -- `"bold fg:27"` 设置粗体字,用 27 号 [ANSI 标准色](https://i.stack.imgur.com/KTSQa.png) -- `"underline bg:#bf5700"` 在深橙色背景上显示带下划线文本 -- `"bold italic fg:purple"` 设置文本为粗体、意大利体,颜色为紫色 -- `""` 显式禁用所有样式 +- `'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 请注意,最终的显示样式将由您的终端模拟器控制。 例如,有的终端模拟器对于“bold”属性的文本是加亮颜色而不是加粗文字,有的颜色主题对“普通”和“明亮”两种属性的颜色使用相同的颜色值。 此外,要获得意大利体文本(一般设计为斜体),您的终端必须支持意大利体显示。 @@ -117,43 +175,20 @@ Starship 中的大多数组件允许您为其设置显示样式。 显示样式 例如: -- 如果变量 `region` 是 `None` 或者为空,`(@$region)` 将不会显示,否则 `@` 之后会显示 region 的值。 -- `(some text)` 将永远不会显示因为在括号里并没有变量。 -- 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\] )`. - -#### 特殊字符 - -以下符号在格式字符串中具有特殊用途,必须转义: `$ [ ] ( )`。 - -Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). 建议在你的配置中使用字面字符串(由单引号包围)。 如果你想使用一个基本的字符串(由双引号包围),你必须在双引号前面添加反斜杠符号进行转义(即使用\“abc\"输出"abc")。 - -For example, when you want to print a `$` symbol on a new line, the following configs for `format` are equivalent: - -```toml -# with basic string -format = "\n\\$" - -# with multiline basic string -format = """ - -\\$""" - -# with literal string -format = ''' - -\$''' -``` +- `'(@$region)'` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. +- `'(some text)'` will always show nothing since there are no variables wrapped in the braces. +- When `$combined` is a shortcut for `\[$a$b\]`, `'($combined)'` will show nothing only if `$a` and `$b` are both `None`. This works the same as `'(\[$a$b\] )'`. ### 错误匹配 -许多模块都有 detect_extensions, detect_files, 和 detect_folders 变量。 These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched. +许多模块都有 detect_extensions, detect_files, 和 detect_folders 变量。 These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading '!' character. The presence of _any_ negative indicator in the directory will result in the module not being matched. Extensions are matched against both the characters after the last dot in a filename, and the characters after the first dot in a filename. For example, `foo.bar.tar.gz` will be matched against `bar.tar.gz` and `gz` in the `detect_extensions` variable. Files whose name begins with a dot are not considered to have extensions at all. To see how this works in practice, you could match TypeScript but not MPEG Transport Stream files thus: ```toml -detect_extensions = ["ts", "!video.ts", "!audio.ts"] +detect_extensions = ['ts', '!video.ts', '!audio.ts'] ``` ## 提示符 @@ -165,11 +200,11 @@ detect_extensions = ["ts", "!video.ts", "!audio.ts"] | 选项 | 默认值 | 描述 | | ----------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `format` | [见下文](#default-prompt-format) | 配置提示符的格式。 | -| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | +| `right_format` | `''` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | | `scan_timeout` | `30` | Starship 扫描文件的超时时间(单位:毫秒)。 | | `command_timeout` | `500` | Startship 执行命令的超时时间(单位:毫秒)。 | | `add_newline` | `true` | 在 shell 提示符之间插入空行。 | -| `palette` | `""` | Sets which color palette from `palettes` to use. | +| `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | ### 示例 @@ -178,10 +213,10 @@ detect_extensions = ["ts", "!video.ts", "!audio.ts"] # ~/.config/starship.toml # Use custom format -format = """ +format = ''' [┌───────────────────>](bold green) [│](bold green)$directory$rust$package -[└─>](bold green) """ +[└─>](bold green) ''' # Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 @@ -189,23 +224,23 @@ scan_timeout = 10 # Disable the blank line at the start of the prompt add_newline = false -# Set "foo" as custom color palette -palette = "foo" +# Set 'foo' as custom color palette +palette = 'foo' # Define custom colors [palettes.foo] # Overwrite existing color -blue = "21" +blue = '21' # Define new color -mustard = "#af8700" +mustard = '#af8700' ``` ### 默认提示符格式 -如果没有提供`format`字段或者它的值是空的,将会使用默认的`format`配置来指定提示符的格式。 默认设置如下: +如果没有提供`format`字段或者它的值是空的,将会使用默认的`format`配置来指定提示符的格式。 默认配置如下: ```toml -format = "$all" +format = '$all' # Which is equivalent to format = """ @@ -236,7 +271,9 @@ $elixir\ $elm\ $erlang\ $golang\ +$guix_shell\ $haskell\ +$haxe\ $helm\ $java\ $julia\ @@ -245,6 +282,7 @@ $lua\ $nim\ $nodejs\ $ocaml\ +$opa\ $perl\ $php\ $pulumi\ @@ -281,6 +319,7 @@ $jobs\ $battery\ $time\ $status\ +$os\ $container\ $shell\ $character""" @@ -289,8 +328,8 @@ $character""" 如果你只是想扩展默认的格式,你可以使用 `$all`; 你另外添加到格式中的modules不会重复出现。 例如: ```toml -# 将目录信息移到第二行 -format = "$all$directory$character" +# Move the directory to the second line +format = '$all$directory$character' ``` ## AWS @@ -305,15 +344,17 @@ When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. +When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. + ### 配置项 | 选项 | 默认值 | 描述 | | ------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | 组件格式化模板。 | -| `symbol` | `"☁️ "` | 这个字段的内容会显示在当前 AWS 配置信息之前。 | -| `region_aliases` | | 地区缩写列表,用来显示在 AWS 主机名之后。 | -| `profile_aliases` | | Table of profile aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | 此组件的样式。 | +| `symbol` | `'☁️ '` | 这个字段的内容会显示在当前 AWS 配置信息之前。 | +| `region_aliases` | `{}` | 地区缩写列表,用来显示在 AWS 主机名之后。 | +| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | +| `style` | `'bold yellow'` | 此组件的样式。 | | `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | 禁用 `AWS` 组件。 | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -339,11 +380,11 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL [aws] format = 'on [$symbol($profile )(\($region\) )]($style)' -style = "bold blue" -symbol = "🅰 " +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' [aws.profile_aliases] CompanyGroupFrobozzOnCallAccess = 'Frobozz' ``` @@ -354,12 +395,12 @@ CompanyGroupFrobozzOnCallAccess = 'Frobozz' # ~/.config/starship.toml [aws] -format = "on [$symbol$region]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$region]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' ``` #### Display profile @@ -368,34 +409,48 @@ us-east-1 = "va" # ~/.config/starship.toml [aws] -format = "on [$symbol$profile]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$profile]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.profile_aliases] Enterprise_Naming_Scheme-voidstars = 'void**' ``` ## Azure -The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription, as defined in the `~/.azure/azureProfile.json` file. +The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription or the username, as defined in the `~/.azure/azureProfile.json` file. ### 配置项 | 字段 | 默认值 | 描述 | | ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `"on [$symbol($subscription)]($style) "` | The format for the Azure module to render. | -| `symbol` | `"ﴃ "` | The symbol used in the format. | -| `style` | `"blue bold"` | The style used in the format. | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'ﴃ '` | The symbol used in the format. | +| `style` | `'blue bold'` | The style used in the format. | | `disabled` | `true` | Disables the `azure` module. | -### 示例 +### Examples + +#### Display Subscription Name ```toml # ~/.config/starship.toml [azure] disabled = false -format = "on [$symbol($subscription)]($style) " +format = 'on [$symbol($subscription)]($style) ' +symbol = 'ﴃ ' +style = 'blue bold' +``` + +#### Display Username + +```toml +# ~/.config/starship.toml + +[azure] +disabled = false +format = "on [$symbol($username)]($style) " symbol = "ﴃ " style = "blue bold" ``` @@ -408,12 +463,12 @@ style = "blue bold" | 选项 | 默认值 | 描述 | | -------------------- | --------------------------------- | ---------------- | -| `full_symbol` | `" "` | 显示于电池充满时。 | -| `charging_symbol` | `" "` | 显示于正在充电时。 | -| `discharging_symbol` | `" "` | 显示于电池放电时。 | -| `unknown_symbol` | `" "` | 显示于电池状态未知时 | -| `empty_symbol` | `" "` | 显示于电池状态为空时 | -| `format` | `"[$symbol$percentage]($style) "` | 组件格式化模板。 | +| `full_symbol` | `' '` | 显示于电池充满时。 | +| `charging_symbol` | `' '` | 显示于正在充电时。 | +| `discharging_symbol` | `' '` | 显示于电池放电时。 | +| `unknown_symbol` | `' '` | 显示于电池状态未知时 | +| `empty_symbol` | `' '` | 显示于电池状态为空时 | +| `format` | `'[$symbol$percentage]($style) '` | 组件格式化模板。 | | `display` | [见下文](#battery-display) | 电量显示阈值和样式。 | | `disabled` | `false` | 禁用 `battery` 组件。 | @@ -423,19 +478,19 @@ style = "blue bold" # ~/.config/starship.toml [battery] -full_symbol = "🔋 " -charging_symbol = "⚡️ " -discharging_symbol = "💀 " +full_symbol = '🔋 ' +charging_symbol = '⚡️ ' +discharging_symbol = '💀 ' ``` ### Battery 组件的显示 -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). 如果 `display` 没有设置, 默认设置如下: +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). 如果 `display` 没有设置, 默认配置如下: ```toml [[battery.display]] threshold = 10 -style = "bold red" +style = 'bold red' ``` The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. @@ -447,21 +502,21 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r | 选项 | 默认值 | 描述 | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | | `threshold` | `10` | 当前显示设置的电量上限(见示例) | -| `style` | `"red bold"` | 若组件被显示,则使用此样式 | +| `style` | `'red bold'` | 若组件被显示,则使用此样式 | | `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. | | `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. | #### 示例 ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% threshold = 10 -style = "bold red" +style = 'bold red' -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% threshold = 30 -style = "bold yellow" -discharging_symbol = "💦" +style = 'bold yellow' +discharging_symbol = '💦' # when capacity is over 30%, the battery indicator will not be displayed ``` @@ -477,13 +532,13 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil | 选项 | 默认值 | 描述 | | ------------------- | ----------------------------------------------- | ----------------------------------------------------- | -| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. | -| `version_format` | `"v${raw}"` | The version format. | -| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. | +| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. | +| `version_format` | `'v${raw}'` | The version format. | +| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | -| `style` | `"bold blue"` | 此组件的样式。 | +| `style` | `'bold blue'` | 此组件的样式。 | | `disabled` | `false` | Disables the `elixir` module. | ### Variables @@ -502,7 +557,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil # ~/.config/starship.toml [buf] -symbol = "🦬 " +symbol = '🦬 ' ``` ## Bun @@ -516,13 +571,13 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🍞 "` | A format string representing the symbol of Node.js. | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["bun.lockb", "bunfig.toml"]` | Which filenames should trigger this module. | +| `detect_files` | `['bun.lockb', 'bunfig.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | 此组件的样式。 | +| `style` | `'bold red'` | 此组件的样式。 | | `disabled` | `false` | Disables the `bun` module. | ### Variables @@ -541,7 +596,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. # ~/.config/starship.toml [bun] -format = "via [🍔 $version](bold green) " +format = 'via [🍔 $version](bold green) ' ``` ## C @@ -552,14 +607,14 @@ The `c` module shows some information about your C compiler. By default the modu | 选项 | 默认值 | 描述 | | ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version(-$name) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"C "` | The symbol used before displaying the compiler details | -| `detect_extensions` | `["c", "h"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ "cc", "--version" ], [ "gcc", "--version" ], [ "clang", "--version" ] ] | How to detect what the compiler is | -| `style` | `"bold 149"` | 此组件的样式。 | +| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | +| `style` | `'bold 149'` | 此组件的样式。 | | `disabled` | `false` | Disables the `c` module. | ### Variables @@ -577,7 +632,7 @@ NB that `version` is not in the default format. The `commands` option accepts a list of commands to determine the compiler version and name. -Each command is represented as a list of the executable name, followed by its arguments, usually something like `["mycc", "--version"]`. Starship will try executing each command until it gets a result on STDOUT. +Each command is represented as a list of the executable name, followed by its arguments, usually something like `['mycc', '--version']`. Starship will try executing each command until it gets a result on STDOUT. If a C compiler is not supported by this module, you can request it by [raising an issue on GitHub](https://github.com/starship/starship/). @@ -587,7 +642,7 @@ If a C compiler is not supported by this module, you can request it by [raising # ~/.config/starship.toml [c] -format = "via [$name $version]($style)" +format = 'via [$name $version]($style)' ``` ## Character @@ -611,13 +666,13 @@ By default it only changes color. If you also want to change its shape take a lo | 选项 | 默认值 | 描述 | | --------------------------- | -------------------- | --------------------------------------------------------------------------------------- | -| `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. | -| `vimcmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | -| `vimcmd_replace_one_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim `replace_one` mode. | -| `vimcmd_replace_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim replace mode. | -| `vimcmd_visual_symbol` | `"[❮](bold yellow)"` | The format string used before the text input if the shell is in vim replace mode. | +| `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. | +| `vimcmd_symbol` | `'[❮](bold green)'` | The format string used before the text input if the shell is in vim normal mode. | +| `vimcmd_replace_one_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim `replace_one` mode. | +| `vimcmd_replace_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim replace mode. | +| `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | | `disabled` | `false` | 禁用 `character` 组件。 | ### Variables @@ -634,8 +689,8 @@ By default it only changes color. If you also want to change its shape take a lo # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[✗](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[✗](bold red) ' ``` #### Without custom error shape @@ -644,8 +699,8 @@ error_symbol = "[✗](bold red) " # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[➜](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[➜](bold red) ' ``` #### With custom vim shape @@ -654,7 +709,7 @@ error_symbol = "[➜](bold red) " # ~/.config/starship.toml [character] -vicmd_symbol = "[V](bold green) " +vicmd_symbol = '[V](bold green) ' ``` ## CMake @@ -668,13 +723,13 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | 选项 | 默认值 | 描述 | | ------------------- | -------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"△ "` | The symbol used before the version of cmake. | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'△ '` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this module | -| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | +| `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | -| `style` | `"bold blue"` | 此组件的样式。 | +| `style` | `'bold blue'` | 此组件的样式。 | | `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -698,11 +753,11 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold blue"` | 此组件的样式。 | -| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Which extensions should trigger this module. | +| `symbol` | `'⚙️ '` | The symbol used before displaying the version of COBOL. | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold blue'` | 此组件的样式。 | +| `detect_extensions` | `['cbl', 'cob', 'CBL', 'COB']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `cobol` module. | @@ -735,8 +790,8 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `min_time` | `2_000` | 显示此组件所需的最短执行时长(单位:毫秒)。 | | `show_milliseconds` | `false` | 除了秒数外在执行时长中额外显示毫秒。 | -| `format` | `"took [$duration]($style) "` | 组件格式化模板。 | -| `style` | `"bold yellow"` | 此组件的样式。 | +| `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). | @@ -758,7 +813,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t [cmd_duration] min_time = 500 -format = "underwent [$duration](bold yellow)" +format = 'underwent [$duration](bold yellow)' ``` ## Conda @@ -776,9 +831,9 @@ The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) e | 选项 | 默认值 | 描述 | | ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | 如果这个 conda 环境是通过 `conda create -p [path]` 创建的,环境路径的目录深度应该被截断到此数量。 `0` 表示不用截断。 另请参阅 [`directory`](#directory) 组件。 | -| `symbol` | `"🅒 "` | 在环境名之前显示的符号。 | -| `style` | `"bold green"` | 此组件的样式。 | -| `format` | `"via [$symbol$environment]($style) "` | 组件格式化模板。 | +| `symbol` | `'🅒 '` | 在环境名之前显示的符号。 | +| `style` | `'bold green'` | 此组件的样式。 | +| `format` | `'via [$symbol$environment]($style) '` | 组件格式化模板。 | | `ignore_base` | `true` | Ignores `base` environment when activated. | | `disabled` | `false` | 禁用 `conda` 组件。 | @@ -798,7 +853,7 @@ The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) e # ~/.config/starship.toml [conda] -format = "[$symbol$environment](dimmed green) " +format = '[$symbol$environment](dimmed green) ' ``` ## Container @@ -809,8 +864,8 @@ The `container` module displays a symbol and container name, if inside a contain | 选项 | 默认值 | 描述 | | ---------- | ---------------------------------- | ----------------------------------------- | -| `symbol` | `"⬢"` | The symbol shown, when inside a container | -| `style` | `"bold red dimmed"` | 此组件的样式。 | +| `symbol` | `'⬢'` | The symbol shown, when inside a container | +| `style` | `'bold red dimmed'` | 此组件的样式。 | | `format` | `'[$symbol \[$name\]]($style) '` | 组件格式化模板。 | | `disabled` | `false` | Disables the `container` module. | @@ -844,12 +899,12 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold red"` | 此组件的样式。 | -| `detect_extensions` | `["cr"]` | Which extensions should trigger this module. | -| `detect_files` | `["shard.yml"]` | Which filenames should trigger this module. | +| `symbol` | `'🔮 '` | The symbol used before displaying the version of crystal. | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold red'` | 此组件的样式。 | +| `detect_extensions` | `['cr']` | Which extensions should trigger this module. | +| `detect_files` | `['shard.yml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `crystal` module. | @@ -869,7 +924,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// # ~/.config/starship.toml [crystal] -format = "via [✨ $version](bold blue) " +format = 'via [✨ $version](bold blue) ' ``` ## Daml @@ -882,12 +937,12 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"Λ "` | A format string representing the symbol of Daml | -| `style` | `"bold cyan"` | 此组件的样式。 | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'Λ '` | A format string representing the symbol of Daml | +| `style` | `'bold cyan'` | 此组件的样式。 | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['daml.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `daml` module. | @@ -907,7 +962,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d # ~/.config/starship.toml [daml] -format = "via [D $version](bold bright-green) " +format = 'via [D $version](bold bright-green) ' ``` ## Dart @@ -922,13 +977,13 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `detect_extensions` | `["dart"]` | Which extensions should trigger this module. | -| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".dart_tool"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | 此组件的样式。 | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🎯 '` | A format string representing the symbol of Dart | +| `detect_extensions` | `['dart']` | Which extensions should trigger this module. | +| `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | Which filenames should trigger this module. | +| `detect_folders` | `['.dart_tool']` | Which folders should trigger this module. | +| `style` | `'bold blue'` | 此组件的样式。 | | `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -947,7 +1002,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d # ~/.config/starship.toml [dart] -format = "via [🔰 $version](bold red) " +format = 'via [🔰 $version](bold red) ' ``` ## Deno @@ -960,13 +1015,13 @@ The `deno` module shows you your currently installed version of [Deno](https://d | 选项 | 默认值 | 描述 | | ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦕 "` | A format string representing the symbol of Deno | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦕 '` | A format string representing the symbol of Deno | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["deno.json", "deno.jsonc", "mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. | +| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"green bold"` | 此组件的样式。 | +| `style` | `'green bold'` | 此组件的样式。 | | `disabled` | `false` | Disables the `deno` module. | ### Variables @@ -983,7 +1038,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d # ~/.config/starship.toml [deno] -format = "via [🦕 $version](green bold) " +format = 'via [🦕 $version](green bold) ' ``` ## Directory @@ -996,20 +1051,21 @@ format = "via [🦕 $version](green bold) " ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `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: "…/" | -| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | -| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) | +| 选项 | 默认值 | 描述 | +| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `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: '…/' | +| `before_repo_root_style` | | The style for the path segment above the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `'[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) '` | The format of a git repo when `before_repo_root_style` and `repo_root_style` is defined. | +| `home_symbol` | `'~'` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |

此组件有几个高级配置选项来控制当前目录路径的显示方式。 @@ -1024,8 +1080,8 @@ format = "via [🦕 $version](green bold) " ```toml [directory.substitutions] -"/Volumes/network/path" = "/net" -"src/com/long/java/path" = "mypath" +'/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`. @@ -1036,8 +1092,8 @@ format = "via [🦕 $version](green bold) " | 字段 | 示例 | 描述 | | --------- | --------------------- | -------------------------- | -| path | `"D:/Projects"` | The current directory path | -| style\* | `"black bold dimmed"` | `style`对应值 | +| path | `'D:/Projects'` | The current directory path | +| style\* | `'black bold dimmed'` | `style`对应值 | *: This variable can only be used as a part of a style string @@ -1048,11 +1104,11 @@ Let us consider the path `/path/to/home/git_repo/src/lib` | 字段 | 示例 | 描述 | | ------------------ | --------------------- | --------------------------------------- | -| before_root_path | `"/path/to/home/"` | The path before git root directory path | -| repo_root | `"git_repo"` | The git root directory name | -| path | `"/src/lib"` | The remaining path | -| style | `"black bold dimmed"` | `style`对应值 | -| repo_root_style | `"underline white"` | Style for git root directory name | +| before_root_path | `'/path/to/home/'` | The path before git root directory path | +| repo_root | `'git_repo'` | The git root directory name | +| path | `'/src/lib'` | The remaining path | +| style | `'black bold dimmed'` | `style`对应值 | +| repo_root_style | `'underline white'` | Style for git root directory name |
@@ -1063,7 +1119,7 @@ Let us consider the path `/path/to/home/git_repo/src/lib` [directory] truncation_length = 8 -truncation_symbol = "…/" +truncation_symbol = '…/' ``` ## Docker Context @@ -1074,13 +1130,13 @@ The `docker_context` module shows the currently active [Docker context](https:// | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | 组件格式化模板。 | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `format` | `'via [$symbol$context]($style) '` | 组件格式化模板。 | +| `symbol` | `'🐳 '` | The symbol used before displaying the Docker context. | | `only_with_files` | `true` | Only show when there's a match | | `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | +| `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | Which filenames should trigger this module (needs `only_with_files` to be true). | | `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | -| `style` | `"blue bold"` | 此组件的样式。 | +| `style` | `'blue bold'` | 此组件的样式。 | | `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -1099,7 +1155,7 @@ The `docker_context` module shows the currently active [Docker context](https:// # ~/.config/starship.toml [docker_context] -format = "via [🐋 $context](blue bold)" +format = 'via [🐋 $context](blue bold)' ``` ## Dotnet @@ -1127,14 +1183,14 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$var_cluster" +'dev.local.cluster.k8s' = 'dev' +'.*/openshift-cluster/.*' = 'openshift' +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' [kubernetes.user_aliases] -"dev.local.cluster.k8s" = "dev" -"root/.*" = "root" +'dev.local.cluster.k8s' = 'dev' +'root/.*' = 'root' ``` Only show the module in directories that contain a `k8s` file. @@ -2121,14 +2249,14 @@ Long and automatically generated cluster names can be identified and shortened u ```toml [kubernetes.context_aliases] # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -".*/openshift-cluster/.*" = "openshift" +'.*/openshift-cluster/.*' = 'openshift' # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$var_cluster" +'.*/(?P[\\w-]+)/.*' = '$var_cluster' # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' ``` ## Line Break @@ -2159,8 +2287,8 @@ The `localip` module shows the IPv4 address of the primary network interface. | 选项 | 默认值 | 描述 | | ---------- | ------------------------- | ------------------------------------------------------ | | `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | 组件格式化模板。 | -| `style` | `"bold yellow"` | 此组件的样式。 | +| `format` | `'[$localipv4]($style) '` | 组件格式化模板。 | +| `style` | `'bold yellow'` | 此组件的样式。 | | `disabled` | `true` | Disables the `localip` module. | ### Variables @@ -2179,7 +2307,7 @@ The `localip` module shows the IPv4 address of the primary network interface. [localip] ssh_only = false -format = "@[$localipv4](bold red) " +format = '@[$localipv4](bold red) ' disabled = false ``` @@ -2195,14 +2323,14 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------ | -------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | -| `detect_extensions` | `["lua"]` | Which extensions should trigger this module. | -| `detect_files` | `[".lua-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["lua"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | 此组件的样式。 | -| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🌙 '` | A format string representing the symbol of Lua. | +| `detect_extensions` | `['lua']` | Which extensions should trigger this module. | +| `detect_files` | `['.lua-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['lua']` | Which folders should trigger this module. | +| `style` | `'bold blue'` | 此组件的样式。 | +| `lua_binary` | `'lua'` | Configures the lua binary that Starship executes when getting the version. | | `disabled` | `false` | Disables the `lua` module. | ### Variables @@ -2221,7 +2349,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o # ~/.config/starship.toml [lua] -format = "via [🌕 $version](bold blue) " +format = 'via [🌕 $version](bold blue) ' ``` ## Memory Usage @@ -2241,9 +2369,9 @@ format = "via [🌕 $version](bold blue) " | 选项 | 默认值 | 描述 | | ----------- | ----------------------------------------------- | ---------------------- | | `threshold` | `75` | 隐藏内存使用情况,除非它超过这个百分比。 | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | 组件格式化模板。 | -| `symbol` | `"🐏"` | 这个字段的内容会显示在当前内存使用情况之前。 | -| `style` | `"bold dimmed white"` | 此组件的样式。 | +| `format` | `'via $symbol [${ram}( \| ${swap})]($style) '` | 组件格式化模板。 | +| `symbol` | `'🐏'` | 这个字段的内容会显示在当前内存使用情况之前。 | +| `style` | `'bold dimmed white'` | 此组件的样式。 | | `disabled` | `true` | 禁用 `memory_usage` 模块 | ### Variables @@ -2267,8 +2395,8 @@ format = "via [🌕 $version](bold blue) " [memory_usage] disabled = false threshold = -1 -symbol = " " -style = "bold dimmed green" +symbol = ' ' +style = 'bold dimmed green' ``` ## Meson @@ -2282,10 +2410,10 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. | 选项 | 默认值 | 描述 | | ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- | | `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | -| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. | -| `format` | `"via [$symbol$project]($style) "` | 组件格式化模板。 | -| `symbol` | `"⬢ "` | The symbol used before displaying the project name. | -| `style` | `"blue bold"` | 此组件的样式。 | +| `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | +| `format` | `'via [$symbol$project]($style) '` | 组件格式化模板。 | +| `symbol` | `'⬢ '` | The symbol used before displaying the project name. | +| `style` | `'blue bold'` | 此组件的样式。 | | `disabled` | `false` | Disables the `meson` module. | ### Variables @@ -2305,9 +2433,9 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. [meson] disabled = false -truncation_symbol = "--" -symbol = " " -style = "bold dimmed green" +truncation_symbol = '--' +symbol = ' ' +style = 'bold dimmed green' ``` ## Mercurial Branch @@ -2318,11 +2446,11 @@ style = "bold dimmed green" | 选项 | 默认值 | 描述 | | ------------------- | -------------------------------- | --------------------------------------------- | -| `symbol` | `" "` | 该字段的内容显示于当前仓库的 hg 书签或活动分支名之前。 | -| `style` | `"bold purple"` | 此组件的样式。 | -| `format` | `"on [$symbol$branch]($style) "` | 组件格式化模板。 | +| `symbol` | `' '` | 该字段的内容显示于当前仓库的 hg 书签或活动分支名之前。 | +| `style` | `'bold purple'` | 此组件的样式。 | +| `format` | `'on [$symbol$branch]($style) '` | 组件格式化模板。 | | `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | -| `truncation_symbol` | `"…"` | 此字段的内容用来表示分支名称被截断。 | +| `truncation_symbol` | `'…'` | 此字段的内容用来表示分支名称被截断。 | | `disabled` | `true` | 禁用 `hg_branch` 组件。 | ### Variables @@ -2341,16 +2469,16 @@ style = "bold dimmed green" # ~/.config/starship.toml [hg_branch] -format = "on [🌱 $branch](bold purple)" +format = 'on [🌱 $branch](bold purple)' truncation_length = 4 -truncation_symbol = "" +truncation_symbol = '' ``` ## Nim The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/). By default the module will be shown if any of the following conditions are met: -- 当前目录包含 `nim.cfg` 文件 +- 当前目录包含一个 `nim.cfg` 文件 - 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 @@ -2359,13 +2487,13 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | -| `detect_extensions` | `["nim", "nims", "nimble"]` | Which extensions should trigger this module. | -| `detect_files` | `["nim.cfg"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'👑 '` | The symbol used before displaying the version of Nim. | +| `detect_extensions` | `['nim', 'nims', 'nimble']` | Which extensions should trigger this module. | +| `detect_files` | `['nim.cfg']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | 此组件的样式。 | +| `style` | `'bold yellow'` | 此组件的样式。 | | `disabled` | `false` | Disables the `nim` module. | ### Variables @@ -2384,8 +2512,8 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang # ~/.config/starship.toml [nim] -style = "yellow" -symbol = "🎣 " +style = 'yellow' +symbol = '🎣 ' ``` ## Nix-shell @@ -2397,10 +2525,10 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | 选项 | 默认值 | 描述 | | ------------ | ---------------------------------------------- | ----------------------------------------------------- | | `format` | `'via [$symbol$state( \($name\))]($style) '` | 组件格式化模板。 | -| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | -| `style` | `"bold blue"` | 此组件的样式。 | -| `impure_msg` | `"impure"` | A format string shown when the shell is impure. | -| `pure_msg` | `"pure"` | A format string shown when the shell is pure. | +| `symbol` | `'❄️ '` | A format string representing the symbol of nix-shell. | +| `style` | `'bold blue'` | 此组件的样式。 | +| `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` | 禁用 `nix_shell` 组件。 | ### Variables @@ -2421,8 +2549,8 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ [nix_shell] disabled = true -impure_msg = "[impure shell](bold red)" -pure_msg = "[pure shell](bold green)" +impure_msg = '[impure shell](bold red)' +pure_msg = '[pure shell](bold green)' format = 'via [☃️ $state( \($name\))](bold blue) ' ``` @@ -2441,13 +2569,13 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string representing the symbol of Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts", "mts", "cts"]` | Which extensions should trigger this module. | -| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | -| `style` | `"bold green"` | 此组件的样式。 | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string representing the symbol of Node.js. | +| `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Which extensions should trigger this module. | +| `detect_files` | `['package.json', '.node-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['node_modules']` | Which folders should trigger this module. | +| `style` | `'bold green'` | 此组件的样式。 | | `disabled` | `false` | 禁用 `nodejs` 组件。 | | `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | @@ -2467,7 +2595,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n # ~/.config/starship.toml [nodejs] -format = "via [🤖 $version](bold green) " +format = 'via [🤖 $version](bold green) ' ``` ## OCaml @@ -2485,15 +2613,15 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | 选项 | 默认值 | 描述 | | ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | -| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | -| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | -| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Which extensions should trigger this module. | -| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Which filenames should trigger this module. | -| `detect_folders` | `["_opam", "esy.lock"]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | 此组件的样式。 | +| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐫 '` | The symbol used before displaying the version of OCaml. | +| `global_switch_indicator` | `''` | The format string used to represent global OPAM switch. | +| `local_switch_indicator` | `'*'` | The format string used to represent local OPAM switch. | +| `detect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | Which extensions should trigger this module. | +| `detect_files` | `['dune', 'dune-project', 'jbuild', 'jbuild-ignore', '.merlin']` | Which filenames should trigger this module. | +| `detect_folders` | `['_opam', 'esy.lock']` | Which folders should trigger this module. | +| `style` | `'bold yellow'` | 此组件的样式。 | | `disabled` | `false` | Disables the `ocaml` module. | ### Variables @@ -2514,7 +2642,43 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam # ~/.config/starship.toml [ocaml] -format = "via [🐪 $version]($style) " +format = 'via [🐪 $version]($style) ' +``` + +## Open Policy Agent + +The `opa` module shows the currently installed version of the OPA tool. By default the module will be shown if the current directory contains a `.rego` file. + +### 配置项 + +| 选项 | 默认值 | 描述 | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | +| `detect_extensions` | `['rego']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'bold blue'` | 此组件的样式。 | +| `disabled` | `false` | Disables the `opa` module. | + +### Variables + +| 字段 | 示例 | 描述 | +| --------- | --------- | -------------------- | +| version | `v0.44.0` | The version of `opa` | +| symbol | | `symbol`对应值 | +| style\* | | `style`对应值 | + +*: This variable can only be used as a part of a style string + +### 示例 + +```toml +# ~/.config/starship.toml + +[opa] +format = 'via [⛑️ $version](bold red) ' ``` ## OpenStack @@ -2526,8 +2690,8 @@ The `openstack` module shows the current OpenStack cloud and project. The module | 选项 | 默认值 | 描述 | | ---------- | ----------------------------------------------- | -------------------------------------------------------------- | | `format` | `'on [$symbol$cloud(\($project\))]($style) '` | 组件格式化模板。 | -| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | -| `style` | `"bold yellow"` | 此组件的样式。 | +| `symbol` | `'☁️ '` | The symbol used before displaying the current OpenStack cloud. | +| `style` | `'bold yellow'` | 此组件的样式。 | | `disabled` | `false` | Disables the `openstack` module. | ### Variables @@ -2548,8 +2712,105 @@ The `openstack` module shows the current OpenStack cloud and project. The module [openstack] format = 'on [$symbol$cloud(\($project\))]($style) ' -style = "bold yellow" -symbol = "☁️ " +style = 'bold yellow' +symbol = '☁️ ' +``` + +## OS + +The `os` module shows the current operating system. OS information is detected via the [os_info](https://lib.rs/crates/os_info) crate. + +::: warning + +The [os_info](https://lib.rs/crates/os_info) crate used by this module is known to be inaccurate on some systems. + +::: + +::: tip + +此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。 + +::: + +### 配置项 + +| 选项 | 默认值 | 描述 | +| ---------- | --------------------- | ------------------------------------------------------ | +| `format` | `"[$symbol]($style)"` | 组件格式化模板。 | +| `style` | `"bold white"` | 此组件的样式。 | +| `disabled` | `true` | Disables the `os` module. | +| `symbols` | | A table that maps each operating system to its symbol. | + +`symbols` allows you to define arbitrary symbols to display for each operating system type. Operating system types not defined by your configuration use the default symbols table below. All operating systems currently supported by the module are listed below. If you would like an operating system to be added, feel free to open a [feature request](https://github.com/starship/starship/issues/new/choose). + +```toml +# This is the default symbols table. +[os.symbols] +Alpine = "🏔️ " +Amazon = "🙂 " +Android = "🤖 " +Arch = "🎗️ " +CentOS = "💠 " +Debian = "🌀 " +DragonFly = "🐉 " +Emscripten = "🔗 " +EndeavourOS = "🚀 " +Fedora = "🎩 " +FreeBSD = "😈 " +Garuda = "🦅 " +Gentoo = "🗜️ " +HardenedBSD = "🛡️ " +Illumos = "🐦 " +Linux = "🐧 " +Macos = "🍎 " +Manjaro = "🥭 " +Mariner = "🌊 " +MidnightBSD = "🌘 " +Mint = "🌿 " +NetBSD = "🚩 " +NixOS = "❄️ " +OpenBSD = "🐡 " +openSUSE = "🦎 " +OracleLinux = "🦴 " +Pop = "🍭 " +Raspbian = "🍓 " +Redhat = "🎩 " +RedHatEnterprise = "🎩 " +Redox = "🧪 " +Solus = "⛵ " +SUSE = "🦎 " +Ubuntu = "🎯 " +Unknown = "❓ " +Windows = "🪟 " +``` + +### Variables + +| 字段 | 示例 | 描述 | +| --------- | ------------ | ------------------------------------------------------------------ | +| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | +| name | `Arch Linux` | The current operating system name | +| type | `Arch` | The current operating system type | +| codename | | The current operating system codename, if applicable | +| edition | | The current operating system edition, if applicable | +| version | | The current operating system version, if applicable | +| style\* | | `style`对应值 | + +*: This variable can only be used as a part of a style string + +### 示例 + +```toml +# ~/.config/starship.toml + +[os] +format = "on [($name )]($style)" +style = "bold blue" +disabled = false + +[os.symbols] +Windows = " " +Arch = "Arch is the best! " ``` ## Package Version @@ -2580,10 +2841,10 @@ symbol = "☁️ " | 选项 | 默认值 | 描述 | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"is [$symbol$version]($style) "` | 组件格式化模板。 | -| `symbol` | `"📦 "` | 这个字段的内容会显示在当前软件包版本之前。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold 208"` | 此组件的样式。 | +| `format` | `'is [$symbol$version]($style) '` | 组件格式化模板。 | +| `symbol` | `'📦 '` | 这个字段的内容会显示在当前软件包版本之前。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold 208'` | 此组件的样式。 | | `display_private` | `false` | Enable displaying version for packages marked as private. | | `disabled` | `false` | 禁用 `package` 组件。 | @@ -2603,7 +2864,7 @@ symbol = "☁️ " # ~/.config/starship.toml [package] -format = "via [🎁 $version](208 bold) " +format = 'via [🎁 $version](208 bold) ' ``` ## Perl @@ -2620,13 +2881,13 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe | 选项 | 默认值 | 描述 | | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | -| `detect_extensions` | `["pl", "pm", "pod"]` | Which extensions should trigger this module. | -| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | +| `detect_extensions` | `['pl', 'pm', 'pod']` | Which extensions should trigger this module. | +| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | 此组件的样式。 | +| `style` | `'bold 149'` | 此组件的样式。 | | `disabled` | `false` | Disables the `perl` module. | ### Variables @@ -2643,7 +2904,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe # ~/.config/starship.toml [perl] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## PHP @@ -2658,13 +2919,13 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | 这个字段的内容会显示在当前 PHP 版本之前。 | -| `detect_extensions` | `["php"]` | Which extensions should trigger this module. | -| `detect_files` | `["composer.json", ".php-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐘 '` | 这个字段的内容会显示在当前 PHP 版本之前。 | +| `detect_extensions` | `['php']` | Which extensions should trigger this module. | +| `detect_files` | `['composer.json', '.php-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"147 bold"` | 此组件的样式。 | +| `style` | `'147 bold'` | 此组件的样式。 | | `disabled` | `false` | 禁用 `php` 组件。 | ### Variables @@ -2683,7 +2944,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. # ~/.config/starship.toml [php] -format = "via [🔹 $version](147 bold) " +format = 'via [🔹 $version](147 bold) ' ``` ## Pulumi @@ -2705,10 +2966,10 @@ By default the module will be shown if any of the following conditions are met: | 选项 | 默认值 | 描述 | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string shown before the Pulumi stack. | -| `style` | `"bold 5"` | 此组件的样式。 | +| `format` | `'via [$symbol($username@)$stack]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string shown before the Pulumi stack. | +| `style` | `'bold 5'` | 此组件的样式。 | | `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | | `disabled` | `false` | Disables the `pulumi` module. | @@ -2732,7 +2993,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [pulumi] -format = "[🛥 ($version )$stack]($style) " +format = '[🛥 ($version )$stack]($style) ' ``` #### Without Pulumi version @@ -2740,28 +3001,28 @@ format = "[🛥 ($version )$stack]($style) " ```toml # ~/.config/starship.toml [pulumi] -symbol = "🛥 " -format = "[$symbol$stack]($style) " +symbol = '🛥 ' +format = '[$symbol$stack]($style) ' ``` ## PureScript The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met: -- 当前目录包含 `spago.dhall` 文件 +- 当前目录包含一个 `spago.dhall` 文件 - The current directory contains a file with the `.purs` extension ### 配置项 | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | -| `detect_extensions` | `["purs"]` | Which extensions should trigger this module. | -| `detect_files` | `["spago.dhall"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'<=> '` | The symbol used before displaying the version of PureScript. | +| `detect_extensions` | `['purs']` | Which extensions should trigger this module. | +| `detect_files` | `['spago.dhall']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold white"` | 此组件的样式。 | +| `style` | `'bold white'` | 此组件的样式。 | | `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -2780,7 +3041,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht # ~/.config/starship.toml [purescript] -format = "via [$symbol$version](bold white)" +format = 'via [$symbol$version](bold white)' ``` ## Python @@ -2796,7 +3057,7 @@ By default the module will be shown if any of the following conditions are met: - 当前目录包含一个名为`__init__.py`的文件 - 当前目录包含 `pyproject.toml` 文件 - 当前目录包含 `requirements.txt` 文件 -- 当前目录包含 `setup.py` 文件 +- 当前目录包含一个 `setup.py` 文件 - 当前目录包含一个 `tox.ini` 文件 - 当前目录包含一个使用 `.py` 扩展名的文件. - 当前处于一个活跃的 python 虚拟环境中 @@ -2806,14 +3067,14 @@ By default the module will be shown if any of the following conditions are met: | 选项 | 默认值 | 描述 | | -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | | `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | 用于表示Python的格式化字符串。 | -| `style` | `"yellow bold"` | 此组件的样式。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐍 '` | 用于表示Python的格式化字符串。 | +| `style` | `'yellow bold'` | 此组件的样式。 | | `pyenv_version_name` | `false` | 使用 pyenv 获取 Python 版本 | | `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | -| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `detect_extensions` | `["py"]` | Which extensions should trigger this module | -| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module | +| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | +| `detect_extensions` | `['py']` | Which extensions should trigger this module | +| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | | `disabled` | `false` | 禁用 `python` 组件。 | @@ -2821,7 +3082,7 @@ By default the module will be shown if any of the following conditions are met: 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. +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. ::: @@ -2829,11 +3090,11 @@ The default values and order for `python_binary` was chosen to first identify th | 字段 | 示例 | 描述 | | ------------ | --------------- | ------------------------------------------ | -| version | `"v3.8.1"` | `python`版本 | -| symbol | `"🐍 "` | `symbol`对应值 | -| style | `"yellow bold"` | `style`对应值 | -| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | -| virtualenv | `"venv"` | 当前`virtualenv`名称 | +| version | `'v3.8.1'` | `python`版本 | +| symbol | `'🐍 '` | `symbol`对应值 | +| style | `'yellow bold'` | `style`对应值 | +| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` | +| virtualenv | `'venv'` | 当前`virtualenv`名称 | ### 示例 @@ -2841,7 +3102,7 @@ The default values and order for `python_binary` was chosen to first identify th # ~/.config/starship.toml [python] -symbol = "👾 " +symbol = '👾 ' pyenv_version_name = true ``` @@ -2850,7 +3111,7 @@ pyenv_version_name = true [python] # Only use the `python3` binary to get the version. -python_binary = "python3" +python_binary = 'python3' ``` ```toml @@ -2869,7 +3130,7 @@ detect_extensions = [] # # Note this will only work when the venv is inside the project and it will only # work in the directory that contains the venv dir but maybe this is ok? -python_binary = ["./venv/bin/python", "python", "python3", "python2"] +python_binary = ['./venv/bin/python', 'python', 'python3', 'python2'] ``` ## R @@ -2888,13 +3149,13 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"📐"` | A format string representing the symbol of R. | -| `style` | `"blue bold"` | 此组件的样式。 | -| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module | -| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module | -| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'📐'` | A format string representing the symbol of R. | +| `style` | `'blue bold'` | 此组件的样式。 | +| `detect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | Which extensions should trigger this module | +| `detect_files` | `['.Rprofile']` | Which filenames should trigger this module | +| `detect_folders` | `['.Rproj.user']` | Which folders should trigger this module | | `disabled` | `false` | Disables the `r` module. | ### Variables @@ -2903,7 +3164,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | ------- | ------------- | ------------------ | | version | `v4.0.5` | The version of `R` | | symbol | | `symbol`对应值 | -| style | `"blue bold"` | `style`对应值 | +| style | `'blue bold'` | `style`对应值 | ### 示例 @@ -2911,7 +3172,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr # ~/.config/starship.toml [rlang] -format = "with [📐 $version](blue bold) " +format = 'with [📐 $version](blue bold) ' ``` ## Raku @@ -2925,13 +3186,13 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version-$vm_version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦋 "` | The symbol used before displaying the version of Raku | -| `detect_extensions` | `["p6", "pm6", "pod6", "raku", "rakumod"]` | Which extensions should trigger this module. | -| `detect_files` | `["META6.json"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version-$vm_version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦋 '` | The symbol used before displaying the version of Raku | +| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Which extensions should trigger this module. | +| `detect_files` | `['META6.json']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | 此组件的样式。 | +| `style` | `'bold 149'` | 此组件的样式。 | | `disabled` | `false` | Disables the `raku` module. | ### Variables @@ -2949,12 +3210,12 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra # ~/.config/starship.toml [raku] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## Red -By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). 此组件只有满足以下条件之一时才会被显示: +By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). 此组件将在符合以下任意条件时显示: - The current directory contains a file with `.red` or `.reds` extension @@ -2962,13 +3223,13 @@ By default the `red` module shows the currently installed version of [Red](https | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | -| `detect_extensions` | `["red"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🔺 '` | A format string representing the symbol of Red. | +| `detect_extensions` | `['red']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"red bold"` | 此组件的样式。 | +| `style` | `'red bold'` | 此组件的样式。 | | `disabled` | `false` | Disables the `red` module. | ### Variables @@ -2987,12 +3248,12 @@ By default the `red` module shows the currently installed version of [Red](https # ~/.config/starship.toml [red] -symbol = "🔴 " +symbol = '🔴 ' ``` ## Ruby -By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). 此组件只有满足以下条件之一时才会被显示: +By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). 此组件将在符合以下任意条件时显示: - 当前目录包含 `Gemfile` 文件 - The current directory contains a `.ruby-version` file @@ -3005,14 +3266,14 @@ Starship gets the current Ruby version by running `ruby -v`. | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. | -| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💎 '` | A format string representing the symbol of Ruby. | +| `detect_extensions` | `['rb']` | Which extensions should trigger this module. | +| `detect_files` | `['Gemfile', '.ruby-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | -| `style` | `"bold red"` | 此组件的样式。 | +| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Which environment variables should trigger this module. | +| `style` | `'bold red'` | 此组件的样式。 | | `disabled` | `false` | 禁用 `ruby` 组件。 | ### Variables @@ -3031,12 +3292,12 @@ Starship gets the current Ruby version by running `ruby -v`. # ~/.config/starship.toml [ruby] -symbol = "🔺 " +symbol = '🔺 ' ``` ## Rust -By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). 此组件只有满足以下条件之一时才会被显示: +By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). 此组件将在符合以下任意条件时显示: - 当前目录包含 `Cargo.toml` 文件 - 当前目录包含一个使用 `.rs` 扩展名的文件 @@ -3045,13 +3306,13 @@ By default the `rust` module shows the currently installed version of [Rust](htt | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. | -| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦀 '` | A format string representing the symbol of Rust | +| `detect_extensions` | `['rs']` | Which extensions should trigger this module. | +| `detect_files` | `['Cargo.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | 此组件的样式。 | +| `style` | `'bold red'` | 此组件的样式。 | | `disabled` | `false` | 禁用 `rust` 组件。 | ### Variables @@ -3072,7 +3333,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt # ~/.config/starship.toml [rust] -format = "via [⚙️ $version](red bold)" +format = 'via [⚙️ $version](red bold)' ``` ## Scala @@ -3087,13 +3348,13 @@ The `scala` module shows the currently installed version of [Scala](https://www. | 选项 | 默认值 | 描述 | | ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [${symbol}(${version} )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | -| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | -| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | -| `style` | `"red dimmed"` | 此组件的样式。 | +| `format` | `'via [${symbol}(${version} )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. | +| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. | +| `detect_folders` | `['.metals']` | Which folders should trigger this modules. | +| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. | +| `style` | `'red dimmed'` | 此组件的样式。 | | `disabled` | `false` | Disables the `scala` module. | ### Variables @@ -3112,7 +3373,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. # ~/.config/starship.toml [scala] -symbol = "🌟 " +symbol = '🌟 ' ``` ## Shell @@ -3129,19 +3390,19 @@ The `shell` module shows an indicator for currently used shell. | 选项 | 默认值 | 描述 | | ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `"bsh"` | A format string used to represent bash. | -| `fish_indicator` | `"fsh"` | A format string used to represent fish. | -| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. | -| `powershell_indicator` | `"psh"` | A format string used to represent powershell. | -| `ion_indicator` | `"ion"` | A format string used to represent ion. | -| `elvish_indicator` | `"esh"` | A format string used to represent elvish. | -| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. | -| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. | -| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. | -| `nu_indicator` | `"nu"` | A format string used to represent nu. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `"[$indicator]($style) "` | 组件格式化模板。 | -| `style` | `"white bold"` | 此组件的样式。 | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | 组件格式化模板。 | +| `style` | `'white bold'` | 此组件的样式。 | | `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3159,26 +3420,26 @@ The `shell` module shows an indicator for currently used shell. # ~/.config/starship.toml [shell] -fish_indicator = "" -powershell_indicator = "_" -unknown_indicator = "mystery shell" -style = "cyan bold" +fish_indicator = '' +powershell_indicator = '_' +unknown_indicator = 'mystery shell' +style = 'cyan bold' disabled = false ``` ## SHLVL -The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ('shell level') environment variable, if it is set to a number and meets or exceeds the specified threshold. ### 配置项 | 选项 | 默认值 | 描述 | | ----------- | ---------------------------- | ------------------------------------------------------------- | | `threshold` | `2` | Display threshold. | -| `format` | `"[$symbol$shlvl]($style) "` | 组件格式化模板。 | -| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. | +| `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"` | 此组件的样式。 | +| `style` | `'bold yellow'` | 此组件的样式。 | | `disabled` | `true` | Disables the `shlvl` module. | ### Variables @@ -3198,7 +3459,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int [shlvl] disabled = false -format = "$shlvl level(s) down" +format = '$shlvl level(s) down' threshold = 3 ``` @@ -3211,8 +3472,8 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | 选项 | 默认值 | 描述 | | ---------- | -------------------------------- | ------------------------------------------------ | | `format` | `'[$symbol\[$env\]]($style) '` | 组件格式化模板。 | -| `symbol` | `""` | A format string displayed before the image name. | -| `style` | `"bold dimmed blue"` | 此组件的样式。 | +| `symbol` | `''` | A format string displayed before the image name. | +| `style` | `'bold dimmed blue'` | 此组件的样式。 | | `disabled` | `false` | Disables the `singularity` module. | ### Variables @@ -3243,9 +3504,9 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | 选项 | 默认值 | 描述 | | ------------------- | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | The number of directories the environment path should be truncated to. `0` 表示不用截断。 另请参阅 [`directory`](#directory) 组件。 | -| `symbol` | `"🅢 "` | 在环境名之前显示的符号。 | -| `style` | `"bold blue"` | 此组件的样式。 | -| `format` | `"via [$symbol$environment]($style) "` | 组件格式化模板。 | +| `symbol` | `'🅢 '` | 在环境名之前显示的符号。 | +| `style` | `'bold blue'` | 此组件的样式。 | +| `format` | `'via [$symbol$environment]($style) '` | 组件格式化模板。 | | `disabled` | `false` | Disables the `spack` module. | ### Variables @@ -3264,7 +3525,7 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat # ~/.config/starship.toml [spack] -format = "[$symbol$environment](dimmed blue) " +format = '[$symbol$environment](dimmed blue) ' ``` ## Status @@ -3281,14 +3542,14 @@ The `status` module displays the exit code of the previous command. If $success_ | 选项 | 默认值 | 描述 | | --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `format` | `"[$symbol$status]($style) "` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `success_symbol` | `""` | The symbol displayed on program success | -| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | -| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | -| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | -| `style` | `"bold red"` | 此组件的样式。 | +| `format` | `'[$symbol$status]($style) '` | The format of the module | +| `symbol` | `'❌'` | The symbol displayed on program error | +| `success_symbol` | `''` | The symbol displayed on program success | +| `not_executable_symbol` | `'🚫'` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `'🔍'` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `'🧱'` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `'⚡'` | The symbol displayed on any signal | +| `style` | `'bold red'` | 此组件的样式。 | | `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code | | `pipestatus` | `false` | Enable pipestatus reporting | @@ -3320,9 +3581,9 @@ The `status` module displays the exit code of the previous command. If $success_ # ~/.config/starship.toml [status] -style = "bg:blue" -symbol = "🔴 " -success_symbol = "🟢 SUCCESS" +style = 'bg:blue' +symbol = '🔴 ' +success_symbol = '🟢 SUCCESS' format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false @@ -3342,9 +3603,9 @@ The `sudo` module displays if sudo credentials are currently cached. The module | 选项 | 默认值 | 描述 | | --------------- | ------------------------ | ------------------------------------------------------- | -| `format` | `"[as $symbol]($style)"` | The format of the module | -| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached | -| `style` | `"bold blue"` | 此组件的样式。 | +| `format` | `'[as $symbol]($style)'` | The format of the module | +| `symbol` | `'🧙 '` | The symbol displayed when credentials are cached | +| `style` | `'bold blue'` | 此组件的样式。 | | `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | | `disabled` | `true` | Disables the `sudo` module. | @@ -3363,8 +3624,8 @@ The `sudo` module displays if sudo credentials are currently cached. The module # ~/.config/starship.toml [sudo] -style = "bold green" -symbol = "👩‍💻 " +style = 'bold green' +symbol = '👩‍💻 ' disabled = false ``` @@ -3379,7 +3640,7 @@ disabled = false ## Swift -By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). 此组件只有满足以下条件之一时才会被显示: +By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). 此组件将在符合以下任意条件时显示: - The current directory contains a `Package.swift` file - The current directory contains a file with the `.swift` extension @@ -3388,13 +3649,13 @@ By default the `swift` module shows the currently installed version of [Swift](h | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `detect_extensions` | `["swift"]` | Which extensions should trigger this module. | -| `detect_files` | `["Package.swift"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐦 '` | A format string representing the symbol of Swift | +| `detect_extensions` | `['swift']` | Which extensions should trigger this module. | +| `detect_files` | `['Package.swift']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 202"` | 此组件的样式。 | +| `style` | `'bold 202'` | 此组件的样式。 | | `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -3413,7 +3674,7 @@ By default the `swift` module shows the currently installed version of [Swift](h # ~/.config/starship.toml [swift] -format = "via [🏎 $version](red bold)" +format = 'via [🏎 $version](red bold)' ``` ## Terraform @@ -3435,13 +3696,13 @@ By default the module will be shown if any of the following conditions are met: | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol$workspace]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💠'` | A format string shown before the terraform workspace. | +| `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | -| `style` | `"bold 105"` | 此组件的样式。 | +| `detect_folders` | `['.terraform']` | Which folders should trigger this module. | +| `style` | `'bold 105'` | 此组件的样式。 | | `disabled` | `false` | 禁用 `terraform` 组件。 | ### Variables @@ -3463,7 +3724,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [terraform] -format = "[🏎💨 $version$workspace]($style) " +format = '[🏎💨 $version$workspace]($style) ' ``` #### Without Terraform version @@ -3472,7 +3733,7 @@ format = "[🏎💨 $version$workspace]($style) " # ~/.config/starship.toml [terraform] -format = "[🏎💨 $workspace]($style) " +format = '[🏎💨 $workspace]($style) ' ``` ## Time @@ -3489,15 +3750,15 @@ format = "[🏎💨 $workspace]($style) " | 选项 | 默认值 | 描述 | | ----------------- | ----------------------- | ----------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | The format string for the module. | +| `format` | `'at [$time]($style) '` | The format string for the module. | | `use_12hr` | `false` | 启用 12 小时格式 | | `time_format` | 见下文解释 | 用来格式化时间显示的 [chrono 格式字符串](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) | -| `style` | `"bold yellow"` | 显示时间的样式。 | -| `utc_time_offset` | `"local"` | 设置所用 UTC 偏移量。 Range from -24 < x < 24. 允许使用浮点数来得到 30/45 分钟的时区偏移。 | +| `style` | `'bold yellow'` | 显示时间的样式。 | +| `utc_time_offset` | `'local'` | 设置所用 UTC 偏移量。 Range from -24 < x < 24. 允许使用浮点数来得到 30/45 分钟的时区偏移。 | | `disabled` | `true` | 禁用 `time` 组件。 | -| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | +| `time_range` | `'-'` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | -If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. 否则,其默认值为 `"%T"`。 Manually setting `time_format` will override the `use_12hr` setting. +If `use_12hr` is `true`, then `time_format` defaults to `'%r'`. Otherwise, it defaults to `'%T'`. Manually setting `time_format` will override the `use_12hr` setting. ### Variables @@ -3516,14 +3777,14 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. 否则,其默 [time] disabled = false format = '🕙[\[ $time \]]($style) ' -time_format = "%T" -utc_time_offset = "-5" -time_range = "10:00:00-14:00:00" +time_format = '%T' +utc_time_offset = '-5' +time_range = '10:00:00-14:00:00' ``` ## Username -`username` 组件显示当前活跃的用户名。 此组件只有满足以下条件之一时才会被显示: +`username` 组件显示当前活跃的用户名。 此组件将在符合以下任意条件时显示: - The current user is root/admin - 当前用户与登录用户不相同 @@ -3540,9 +3801,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | 选项 | 默认值 | 描述 | | ------------- | ----------------------- | ------------------------------------------- | -| `style_root` | `"bold red"` | The style used when the user is root/admin. | -| `style_user` | `"bold yellow"` | 非 root 用户使用的样式。 | -| `format` | `"[$user]($style) in "` | 组件格式化模板。 | +| `style_root` | `'bold red'` | The style used when the user is root/admin. | +| `style_user` | `'bold yellow'` | 非 root 用户使用的样式。 | +| `format` | `'[$user]($style) in '` | 组件格式化模板。 | | `show_always` | `false` | 总是显示 `username` 组件。 | | `disabled` | `false` | 禁用 `username` 组件。 | @@ -3550,8 +3811,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | 字段 | 示例 | 描述 | | ------- | ------------ | ------------------------------------------------------------------------------------------- | -| `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. | +| `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. | ### 示例 @@ -3559,9 +3820,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` # ~/.config/starship.toml [username] -style_user = "white bold" -style_root = "black bold" -format = "user: [$user]($style) " +style_user = 'white bold' +style_root = 'black bold' +format = 'user: [$user]($style) ' disabled = false show_always = true ``` @@ -3576,13 +3837,13 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'⍱ '` | A format string representing the symbol of Vagrant. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["Vagrantfile"]` | Which filenames should trigger this module. | +| `detect_files` | `['Vagrantfile']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"cyan bold"` | 此组件的样式。 | +| `style` | `'cyan bold'` | 此组件的样式。 | | `disabled` | `false` | Disables the `vagrant` module. | ### Variables @@ -3601,7 +3862,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// # ~/.config/starship.toml [vagrant] -format = "via [⍱ $version](bold white) " +format = 'via [⍱ $version](bold white) ' ``` ## V @@ -3615,13 +3876,13 @@ The `vlang` module shows you your currently installed version of [V](https://vla | 选项 | 默认值 | 描述 | | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"V "` | A format string representing the symbol of V | -| `detect_extensions` | `["v"]` | Which extensions should trigger this module. | -| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'V '` | A format string representing the symbol of V | +| `detect_extensions` | `['v']` | Which extensions should trigger this module. | +| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"blue bold"` | 此组件的样式。 | +| `style` | `'blue bold'` | 此组件的样式。 | | `disabled` | `false` | Disables the `vlang` module. | ### Variables @@ -3637,7 +3898,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla ```toml # ~/.config/starship.toml [vlang] -format = "via [V $version](blue bold) " +format = 'via [V $version](blue bold) ' ``` ## VCSH @@ -3648,9 +3909,9 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | 选项 | 默认值 | 描述 | | ---------- | -------------------------------- | ------------------------------------------------------ | -| `symbol` | | The symbol used before displaying the repository name. | -| `style` | `"bold yellow"` | 此组件的样式。 | -| `format` | `"vcsh [$symbol$repo]($style) "` | 组件格式化模板。 | +| `symbol` | `''` | The symbol used before displaying the repository name. | +| `style` | `'bold yellow'` | 此组件的样式。 | +| `format` | `'vcsh [$symbol$repo]($style) '` | 组件格式化模板。 | | `disabled` | `false` | Disables the `vcsh` module. | ### Variables @@ -3669,12 +3930,12 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v # ~/.config/starship.toml [vcsh] -format = "[🆅 $repo](bold blue) " +format = '[🆅 $repo](bold blue) ' ``` ## Zig -By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). 此组件只有满足以下条件之一时才会被显示: +By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). 此组件将在符合以下任意条件时显示: - The current directory contains a `.zig` file @@ -3682,12 +3943,12 @@ By default the the `zig` module shows the currently installed version of [Zig](h | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | 此组件的样式。 | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'↯ '` | The symbol used before displaying the version of Zig. | +| `style` | `'bold yellow'` | 此组件的样式。 | | `disabled` | `false` | Disables the `zig` module. | -| `detect_extensions` | `["zig"]` | Which extensions should trigger this module. | +| `detect_extensions` | `['zig']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -3707,7 +3968,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h # ~/.config/starship.toml [zig] -symbol = "⚡️ " +symbol = '⚡️ ' ``` ## Custom commands @@ -3752,16 +4013,16 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `command` | `''` | The command whose output should be printed. The command will be passed on stdin to the shell. | | `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `描述` | `""` | The description of the module that is shown when running `starship explain`. | +| `描述` | `''` | The description of the module that is shown when running `starship explain`. | | `detect_files` | `[]` | The files that will be searched in the working directory for a match. | | `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. | | `detect_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)"` | 组件格式化模板。 | +| `symbol` | `''` | The symbol used before displaying the command output. | +| `style` | `'bold green'` | 此组件的样式。 | +| `format` | `'[$symbol($output )]($style)'` | 组件格式化模板。 | | `disabled` | `false` | Disables this `custom` module. | | `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | | `use_stdin` | | An optional boolean value that overrides whether commands should be forwarded to the shell via the standard input or as an argument. If unset standard input is used by default, unless the shell does not support it (cmd, nushell). Setting this disables shell-specific argument handling. | @@ -3784,14 +4045,14 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt - 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. +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 -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. ```toml -shell = ["pwsh", "-Command", "-"] +shell = ['pwsh', '-Command', '-'] ``` ::: warning Make sure your custom shell configuration exits gracefully @@ -3812,19 +4073,19 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -detect_files = ["foo"] # can specify filters but wildcards are not supported -when = """ test "$HOME" = "$PWD" """ -format = " transcending [$output]($style)" +command = 'echo foo' # shows output of command +detect_files = ['foo'] # can specify filters but wildcards are not supported +when = ''' test "$HOME" = "$PWD" ''' +format = ' transcending [$output]($style)' [custom.time] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command', '-'] [custom.time-as-arg] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command'] use_stdin = false ``` diff --git a/docs/zh-CN/guide/README.md b/docs/zh-CN/guide/README.md index 236ea977..240fdd2d 100644 --- a/docs/zh-CN/guide/README.md +++ b/docs/zh-CN/guide/README.md @@ -219,7 +219,6 @@ curl -sS https://starship.rs/install.sh | sh | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | | Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | -| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | @@ -271,7 +270,7 @@ curl -sS https://starship.rs/install.sh | sh
Bash -在 `~/.bashhrc` 的最后,添加以下内容: +在 `~/.bashrc` 的最后,添加以下内容: ```sh eval "$(starship init bash)" @@ -359,7 +358,7 @@ Invoke-Expression (&starship init powershell)
Tcsh -在 `~/.bashhrc` 的最后,添加以下内容: +在 `~/.tcshrc` 的最后,添加以下内容: ```sh eval `starship init tcsh` @@ -370,7 +369,7 @@ eval `starship init tcsh`
Xonsh -在 `~/.bashhrc` 的最后,添加以下内容: +在 `~/.xonshrc` 的最后,添加以下内容: ```python execx($(starship init xonsh)) @@ -417,6 +416,14 @@ eval "$(starship init zsh)" - **[reujab/silver](https://github.com/reujab/silver)** – 带图标且可定制的类 Powerline 提示符,适用于所有 Shell。 +## ❤️ 赞助商 + +通过 [成为赞助商 ](https://github.com/sponsors/starship)来支持这个项目。 您的名字或 LOGO 将在此处显示,并链接到您的网站。 + +**支持者级别** + +- [Dimension](https://dimension.dev/) +


Starship 图标 diff --git a/docs/zh-CN/presets/README.md b/docs/zh-CN/presets/README.md index a0ab838f..f479c615 100644 --- a/docs/zh-CN/presets/README.md +++ b/docs/zh-CN/presets/README.md @@ -10,6 +10,14 @@ [![Nerd 字体符号预设截图](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font) +## [No Nerd Fonts](./no-nerd-font.md) + +This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt. + +::: tip This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). ::: + +[Click to view No Nerd Font preset](./no-nerd-font) + ## [Bracketed Segments](./bracketed-segments.md) 此预设使用括号来分隔所有组件的提示符,不使用 Starship 默认的分隔词(“via”,“on” 等等)。 @@ -28,6 +36,12 @@ [![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes) +## [No Empty Icons](./no-empty-icons.md) + +This preset does not show icons if the toolset is not found. + +[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Click to view No Runtime Versions preset")](./no-empty-icons.md) + ## [Pure Prompt](./pure-preset.md) 此预设模拟 [Pure](https://github.com/sindresorhus/pure) 的外观和行为。 @@ -39,3 +53,9 @@ 此预设的灵感来自于 [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json)。 它同时也演示了 Starship 的路径替换功能。 [![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png "Click to view Pure Prompt preset")](./pastel-powerline) + +## [Tokyo Night](./tokyo-night.md) + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) diff --git a/docs/zh-CN/presets/no-empty-icons.md b/docs/zh-CN/presets/no-empty-icons.md new file mode 100644 index 00000000..1360d8ec --- /dev/null +++ b/docs/zh-CN/presets/no-empty-icons.md @@ -0,0 +1,17 @@ +[返回全部预设](./README.md#no-empty-icons) + +# No Empty Icons Preset + +If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. + +![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) + +### 配置 + +```sh +starship preset no-empty-icons > ~/.config/starship.toml +``` + +[点击下载 TOML 文件](/presets/toml/no-empty-icons.toml) + +<<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/zh-CN/presets/no-nerd-font.md b/docs/zh-CN/presets/no-nerd-font.md new file mode 100644 index 00000000..6469044c --- /dev/null +++ b/docs/zh-CN/presets/no-nerd-font.md @@ -0,0 +1,19 @@ +[返回全部预设](./README.md#no-nerd-fonts) + +# No Nerd Fonts Preset + +This preset restricts the use of symbols to those from emoji and powerline sets. + +This means that even without a Nerd Font installed, you should be able to view all module symbols. + +This preset will become the default preset in a future release of starship. + +### 配置 + +```sh +starship preset no-nerd-font > ~/.config/starship.toml +``` + +[点击下载 TOML 文件](/presets/toml/no-nerd-font.toml) + +<<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/zh-CN/presets/tokyo-night.md b/docs/zh-CN/presets/tokyo-night.md new file mode 100644 index 00000000..60d9a0e5 --- /dev/null +++ b/docs/zh-CN/presets/tokyo-night.md @@ -0,0 +1,21 @@ +[返回全部预设](./README.md#pastel-powerline) + +# Tokyo Night Preset + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) + +### 前置要求 + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal + +### 配置 + +```sh +starship preset tokyo-night > ~/.config/starship.toml +``` + +[点击下载 TOML 文件](/presets/toml/tokyo-night.toml) + +<<< @/.vuepress/public/presets/toml/tokyo-night.toml diff --git a/docs/zh-TW/README.md b/docs/zh-TW/README.md index e93fb997..e93d3cdb 100644 --- a/docs/zh-TW/README.md +++ b/docs/zh-TW/README.md @@ -7,7 +7,7 @@ actionText: 馬上開始 → actionLink: ./guide/ features: - - title: 兼容性優先 + title: 相容性優先 details: 能夠在最常見的作業系統之中最常見的 shell 上運作。 在各處使用它吧! - title: 以 Rust 開發 @@ -176,7 +176,7 @@ description: Starship 是適合任何 shell 的最小、極速、高度客製化 ``` - #### Cmd + #### 命令提示字元 You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: diff --git a/docs/zh-TW/advanced-config/README.md b/docs/zh-TW/advanced-config/README.md index f0a5ac7e..05a5913a 100644 --- a/docs/zh-TW/advanced-config/README.md +++ b/docs/zh-TW/advanced-config/README.md @@ -205,7 +205,9 @@ Some shells support a right prompt which renders on the same line as the input. Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](/config/#fill). -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. + +Note: Nushell 0.71.0 or later is required ### 範例 @@ -280,5 +282,5 @@ The `none` token overrides all other tokens in a string if it is not part of a ` Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: - Many terminals disable support for `blink` by default -- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564). +- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). - `strikethrough` is not supported by the default macOS Terminal.app diff --git a/docs/zh-TW/config/README.md b/docs/zh-TW/config/README.md index 36496fad..9ab3f544 100644 --- a/docs/zh-TW/config/README.md +++ b/docs/zh-TW/config/README.md @@ -15,15 +15,17 @@ mkdir -p ~/.config && touch ~/.config/starship.toml # Inserts a blank line between shell prompts add_newline = true -# Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +# 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 ``` +### Config File Location + 你可以透過更改環境變數 `STARSHIP_CONFIG` 來變更設定檔存放的位置: ```sh @@ -70,6 +72,62 @@ os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. +### Strings + +In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. + +The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. + +| Symbol | Type | Notes | +| ------ | ------------------------- | ------------------------------------------------------ | +| `'` | literal string | less escaping | +| `"` | string | more escaping | +| `'''` | multi-line literal string | less escaping | +| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | + +For example: + +```toml +# literal string +format = '☺\☻ ' + +# regular string +format = "☺\\☻ " + +# escaping Starship symbols +format = '\[\$\] ' +``` + +When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: + +```toml +# with literal string +format = ''' + +\$''' + +# with multiline basic string +format = """ + +\\$""" + +# with basic string +format = "\n\\$" +``` + +In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. + +```toml +format = """ +line1\ +line1\ +line1 +line2\ +line2\ +line2 +""" +``` + ### Format Strings Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. @@ -80,9 +138,9 @@ A variable contains a `$` symbol followed by the name of the variable. The name 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. +- `'$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 @@ -94,20 +152,20 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri 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. +- `'[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. #### 風格字串 Starship 內大多數的模組允許你設定他們的顯示風格。 這要透過一個條目 (通常叫做 `style`),這個條目使用一個字串來進行設定。 這裡給幾個風格字串的例子,以及這些字串的功用。 對於完整語法的詳細說明,請參照 [進階設定指南](/advanced-config/)。 -- `"fg:green bg:blue"` 在一個藍色背景上設定綠色文字 -- `"bg:blue fg:bright-green"` 在一個藍色背景上設定亮綠色文字 -- `"bold fg:27"` 設定具有 [ANSI 顏色](https://i.stack.imgur.com/KTSQa.png) 27 號的粗體文字 -- `"underline bg:#bf5700"` 在一個燒橙色背景上設定有底線的文字 -- `"bold italic fg:purple"` 設定粗體、斜體且紫色的文字 -- `""` 明確地關閉所有風格 +- `'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 注意風格產出的樣子取決於你的終端機模擬器。 例如,有些終端機模擬器會提升顏色的亮度而不是讓文字變粗體,而且有些色彩主題對一般與加亮顏色使用的是相同色碼。 除此之外,為了要有斜體字,你的終端機一定要支援斜體。 @@ -117,43 +175,20 @@ A conditional format string wrapped in `(` and `)` will not render if all variab For example: -- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. -- `(some text)` will always show nothing since there are no variables wrapped in the braces. -- 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\] )`. - -#### Special characters - -The following symbols have special usage in a format string and must be escaped: `$ \ [ ] ( )`. - -Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). - -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 = ''' - -\$''' -``` +- `'(@$region)'` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. +- `'(some text)'` will always show nothing since there are no variables wrapped in the braces. +- When `$combined` is a shortcut for `\[$a$b\]`, `'($combined)'` will show nothing only if `$a` and `$b` are both `None`. This works the same as `'(\[$a$b\] )'`. ### Negative matching -Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched. +Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading '!' character. The presence of _any_ negative indicator in the directory will result in the module not being matched. Extensions are matched against both the characters after the last dot in a filename, and the characters after the first dot in a filename. For example, `foo.bar.tar.gz` will be matched against `bar.tar.gz` and `gz` in the `detect_extensions` variable. Files whose name begins with a dot are not considered to have extensions at all. To see how this works in practice, you could match TypeScript but not MPEG Transport Stream files thus: ```toml -detect_extensions = ["ts", "!video.ts", "!audio.ts"] +detect_extensions = ['ts', '!video.ts', '!audio.ts'] ``` ## 提示字元 @@ -165,11 +200,11 @@ detect_extensions = ["ts", "!video.ts", "!audio.ts"] | Option | 預設 | 說明 | | ----------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `format` | [連結](#default-prompt-format) | Configure the format of the prompt. | -| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | +| `right_format` | `''` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | | `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Inserts blank line between shell prompts. | -| `palette` | `""` | Sets which color palette from `palettes` to use. | +| `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | ### 範例 @@ -178,10 +213,10 @@ detect_extensions = ["ts", "!video.ts", "!audio.ts"] # ~/.config/starship.toml # Use custom format -format = """ +format = ''' [┌───────────────────>](bold green) [│](bold green)$directory$rust$package -[└─>](bold green) """ +[└─>](bold green) ''' # Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 @@ -189,15 +224,15 @@ scan_timeout = 10 # Disable the blank line at the start of the prompt add_newline = false -# Set "foo" as custom color palette -palette = "foo" +# Set 'foo' as custom color palette +palette = 'foo' # Define custom colors [palettes.foo] # Overwrite existing color -blue = "21" +blue = '21' # Define new color -mustard = "#af8700" +mustard = '#af8700' ``` ### Default Prompt Format @@ -205,7 +240,7 @@ mustard = "#af8700" The default `format` is used to define the format of the prompt, if empty or no `format` is provided. 預設如下: ```toml -format = "$all" +format = '$all' # Which is equivalent to format = """ @@ -236,7 +271,9 @@ $elixir\ $elm\ $erlang\ $golang\ +$guix_shell\ $haskell\ +$haxe\ $helm\ $java\ $julia\ @@ -245,6 +282,7 @@ $lua\ $nim\ $nodejs\ $ocaml\ +$opa\ $perl\ $php\ $pulumi\ @@ -281,6 +319,7 @@ $jobs\ $battery\ $time\ $status\ +$os\ $container\ $shell\ $character""" @@ -290,7 +329,7 @@ If you just want to extend the default format, you can use `$all`; modules you e ```toml # Move the directory to the second line -format = "$all$directory$character" +format = '$all$directory$character' ``` ## AWS @@ -305,15 +344,17 @@ When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. +When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. + ### 選項 | Option | 預設 | 說明 | | ------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | The format for the module. | -| `symbol` | `"☁️ "` | 顯示在目前 AWS 配置之前的符號。 | -| `region_aliases` | | 除了AWS名稱外,顯示區域別名表 | -| `profile_aliases` | | Table of profile aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | 這個模組的風格。 | +| `symbol` | `'☁️ '` | 顯示在目前 AWS 配置之前的符號。 | +| `region_aliases` | `{}` | 除了AWS名稱外,顯示區域別名表 | +| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | +| `style` | `'bold yellow'` | 這個模組的風格。 | | `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | 停用 `AWS` 模組。 | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -339,11 +380,11 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL [aws] format = 'on [$symbol($profile )(\($region\) )]($style)' -style = "bold blue" -symbol = "🅰 " +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' [aws.profile_aliases] CompanyGroupFrobozzOnCallAccess = 'Frobozz' ``` @@ -354,12 +395,12 @@ CompanyGroupFrobozzOnCallAccess = 'Frobozz' # ~/.config/starship.toml [aws] -format = "on [$symbol$region]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$region]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.region_aliases] -ap-southeast-2 = "au" -us-east-1 = "va" +ap-southeast-2 = 'au' +us-east-1 = 'va' ``` #### Display profile @@ -368,34 +409,48 @@ us-east-1 = "va" # ~/.config/starship.toml [aws] -format = "on [$symbol$profile]($style) " -style = "bold blue" -symbol = "🅰 " +format = 'on [$symbol$profile]($style) ' +style = 'bold blue' +symbol = '🅰 ' [aws.profile_aliases] Enterprise_Naming_Scheme-voidstars = 'void**' ``` ## Azure -The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription, as defined in the `~/.azure/azureProfile.json` file. +The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription or the username, as defined in the `~/.azure/azureProfile.json` file. ### 選項 | 變數 | 預設 | 說明 | | ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `"on [$symbol($subscription)]($style) "` | The format for the Azure module to render. | -| `symbol` | `"ﴃ "` | The symbol used in the format. | -| `style` | `"blue bold"` | The style used in the format. | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'ﴃ '` | The symbol used in the format. | +| `style` | `'blue bold'` | The style used in the format. | | `disabled` | `true` | Disables the `azure` module. | -### 範例 +### Examples + +#### Display Subscription Name ```toml # ~/.config/starship.toml [azure] disabled = false -format = "on [$symbol($subscription)]($style) " +format = 'on [$symbol($subscription)]($style) ' +symbol = 'ﴃ ' +style = 'blue bold' +``` + +#### Display Username + +```toml +# ~/.config/starship.toml + +[azure] +disabled = false +format = "on [$symbol($username)]($style) " symbol = "ﴃ " style = "blue bold" ``` @@ -408,12 +463,12 @@ style = "blue bold" | Option | 預設 | 說明 | | -------------------- | --------------------------------- | -------------------------- | -| `full_symbol` | `" "` | 當電池充飽時顯示的符號。 | -| `charging_symbol` | `" "` | 當電池正在充電時顯示的符號。 | -| `discharging_symbol` | `" "` | 當電池正在放電時顯示的符號。 | -| `unknown_symbol` | `" "` | 當電池狀態不明時顯示的符號。 | -| `empty_symbol` | `" "` | 當電池沒電時顯示的符號。 | -| `format` | `"[$symbol$percentage]($style) "` | The format for the module. | +| `full_symbol` | `' '` | 當電池充飽時顯示的符號。 | +| `charging_symbol` | `' '` | 當電池正在充電時顯示的符號。 | +| `discharging_symbol` | `' '` | 當電池正在放電時顯示的符號。 | +| `unknown_symbol` | `' '` | 當電池狀態不明時顯示的符號。 | +| `empty_symbol` | `' '` | 當電池沒電時顯示的符號。 | +| `format` | `'[$symbol$percentage]($style) '` | The format for the module. | | `display` | [連結](#battery-display) | 顯示的門檻與模組的風格。 | | `disabled` | `false` | 停用 `battery` 模組。 | @@ -423,9 +478,9 @@ style = "blue bold" # ~/.config/starship.toml [battery] -full_symbol = "🔋 " -charging_symbol = "⚡️ " -discharging_symbol = "💀 " +full_symbol = '🔋 ' +charging_symbol = '⚡️ ' +discharging_symbol = '💀 ' ``` ### 電池顯示 @@ -435,7 +490,7 @@ The `display` configuration option is used to define when the battery indicator ```toml [[battery.display]] threshold = 10 -style = "bold red" +style = 'bold red' ``` The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. @@ -447,21 +502,21 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r | Option | 預設 | 說明 | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | | `threshold` | `10` | 顯示選項的上界。 | -| `style` | `"red bold"` | 顯示選項使用時的風格。 | +| `style` | `'red bold'` | 顯示選項使用時的風格。 | | `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. | | `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. | #### 範例 ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% threshold = 10 -style = "bold red" +style = 'bold red' -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% threshold = 30 -style = "bold yellow" -discharging_symbol = "💦" +style = 'bold yellow' +discharging_symbol = '💦' # when capacity is over 30%, the battery indicator will not be displayed ``` @@ -477,13 +532,13 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil | Option | 預設 | 說明 | | ------------------- | ----------------------------------------------- | ----------------------------------------------------- | -| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. | -| `version_format` | `"v${raw}"` | The version format. | -| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. | +| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. | +| `version_format` | `'v${raw}'` | The version format. | +| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | -| `style` | `"bold blue"` | 這個模組的風格。 | +| `style` | `'bold blue'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `elixir` module. | ### Variables @@ -502,7 +557,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil # ~/.config/starship.toml [buf] -symbol = "🦬 " +symbol = '🦬 ' ``` ## Bun @@ -516,13 +571,13 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | Option | 預設 | 說明 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🍞 "` | A format string representing the symbol of Node.js. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["bun.lockb", "bunfig.toml"]` | Which filenames should trigger this module. | +| `detect_files` | `['bun.lockb', 'bunfig.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | 這個模組的風格。 | +| `style` | `'bold red'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `bun` module. | ### Variables @@ -541,7 +596,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. # ~/.config/starship.toml [bun] -format = "via [🍔 $version](bold green) " +format = 'via [🍔 $version](bold green) ' ``` ## C @@ -552,14 +607,14 @@ The `c` module shows some information about your C compiler. By default the modu | Option | 預設 | 說明 | | ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version(-$name) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"C "` | The symbol used before displaying the compiler details | -| `detect_extensions` | `["c", "h"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ "cc", "--version" ], [ "gcc", "--version" ], [ "clang", "--version" ] ] | How to detect what the compiler is | -| `style` | `"bold 149"` | 這個模組的風格。 | +| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | +| `style` | `'bold 149'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `c` module. | ### Variables @@ -577,7 +632,7 @@ NB that `version` is not in the default format. The `commands` option accepts a list of commands to determine the compiler version and name. -Each command is represented as a list of the executable name, followed by its arguments, usually something like `["mycc", "--version"]`. Starship will try executing each command until it gets a result on STDOUT. +Each command is represented as a list of the executable name, followed by its arguments, usually something like `['mycc', '--version']`. Starship will try executing each command until it gets a result on STDOUT. If a C compiler is not supported by this module, you can request it by [raising an issue on GitHub](https://github.com/starship/starship/). @@ -587,7 +642,7 @@ If a C compiler is not supported by this module, you can request it by [raising # ~/.config/starship.toml [c] -format = "via [$name $version]($style)" +format = 'via [$name $version]($style)' ``` ## 字元 @@ -611,13 +666,13 @@ By default it only changes color. If you also want to change its shape take a lo | Option | 預設 | 說明 | | --------------------------- | -------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"$symbol "` | The format string used before the text input. | -| `success_symbol` | `"[❯](bold green)"` | The format string used before the text input if the previous command succeeded. | -| `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. | -| `vimcmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | -| `vimcmd_replace_one_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim `replace_one` mode. | -| `vimcmd_replace_symbol` | `"[❮](bold purple)"` | The format string used before the text input if the shell is in vim replace mode. | -| `vimcmd_visual_symbol` | `"[❮](bold yellow)"` | The format string used before the text input if the shell is in vim replace mode. | +| `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. | +| `vimcmd_symbol` | `'[❮](bold green)'` | The format string used before the text input if the shell is in vim normal mode. | +| `vimcmd_replace_one_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim `replace_one` mode. | +| `vimcmd_replace_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim replace mode. | +| `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | | `disabled` | `false` | 停用 `character` 模組。 | ### Variables @@ -634,8 +689,8 @@ By default it only changes color. If you also want to change its shape take a lo # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[✗](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[✗](bold red) ' ``` #### Without custom error shape @@ -644,8 +699,8 @@ error_symbol = "[✗](bold red) " # ~/.config/starship.toml [character] -success_symbol = "[➜](bold green) " -error_symbol = "[➜](bold red) " +success_symbol = '[➜](bold green) ' +error_symbol = '[➜](bold red) ' ``` #### With custom vim shape @@ -654,7 +709,7 @@ error_symbol = "[➜](bold red) " # ~/.config/starship.toml [character] -vicmd_symbol = "[V](bold green) " +vicmd_symbol = '[V](bold green) ' ``` ## CMake @@ -668,13 +723,13 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | Option | 預設 | 說明 | | ------------------- | -------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"△ "` | The symbol used before the version of cmake. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'△ '` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this module | -| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | +| `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | -| `style` | `"bold blue"` | 這個模組的風格。 | +| `style` | `'bold blue'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -698,11 +753,11 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | Option | 預設 | 說明 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold blue"` | 這個模組的風格。 | -| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Which extensions should trigger this module. | +| `symbol` | `'⚙️ '` | The symbol used before displaying the version of COBOL. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold blue'` | 這個模組的風格。 | +| `detect_extensions` | `['cbl', 'cob', 'CBL', 'COB']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `cobol` module. | @@ -735,8 +790,8 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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"` | 這個模組的風格。 | +| `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). | @@ -758,7 +813,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t [cmd_duration] min_time = 500 -format = "underwent [$duration](bold yellow)" +format = 'underwent [$duration](bold yellow)' ``` ## Conda @@ -776,9 +831,9 @@ 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` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `symbol` | `'🅒 '` | 環境名稱前使用的符號。 | +| `style` | `'bold green'` | 這個模組的風格。 | +| `format` | `'via [$symbol$environment]($style) '` | The format for the module. | | `ignore_base` | `true` | Ignores `base` environment when activated. | | `disabled` | `false` | 停用 `conda` 模組。 | @@ -798,7 +853,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c # ~/.config/starship.toml [conda] -format = "[$symbol$environment](dimmed green) " +format = '[$symbol$environment](dimmed green) ' ``` ## Container @@ -809,8 +864,8 @@ The `container` module displays a symbol and container name, if inside a contain | Option | 預設 | 說明 | | ---------- | ---------------------------------- | ----------------------------------------- | -| `symbol` | `"⬢"` | The symbol shown, when inside a container | -| `style` | `"bold red dimmed"` | 這個模組的風格。 | +| `symbol` | `'⬢'` | The symbol shown, when inside a container | +| `style` | `'bold red dimmed'` | 這個模組的風格。 | | `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `container` module. | @@ -844,12 +899,12 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | Option | 預設 | 說明 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold red"` | 這個模組的風格。 | -| `detect_extensions` | `["cr"]` | Which extensions should trigger this module. | -| `detect_files` | `["shard.yml"]` | Which filenames should trigger this module. | +| `symbol` | `'🔮 '` | The symbol used before displaying the version of crystal. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold red'` | 這個模組的風格。 | +| `detect_extensions` | `['cr']` | Which extensions should trigger this module. | +| `detect_files` | `['shard.yml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `crystal` module. | @@ -869,7 +924,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// # ~/.config/starship.toml [crystal] -format = "via [✨ $version](bold blue) " +format = 'via [✨ $version](bold blue) ' ``` ## Daml @@ -882,12 +937,12 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d | Option | 預設 | 說明 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"Λ "` | A format string representing the symbol of Daml | -| `style` | `"bold cyan"` | 這個模組的風格。 | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'Λ '` | A format string representing the symbol of Daml | +| `style` | `'bold cyan'` | 這個模組的風格。 | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. | +| `detect_files` | `['daml.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `daml` module. | @@ -907,7 +962,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d # ~/.config/starship.toml [daml] -format = "via [D $version](bold bright-green) " +format = 'via [D $version](bold bright-green) ' ``` ## Dart @@ -922,13 +977,13 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | Option | 預設 | 說明 | | ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `detect_extensions` | `["dart"]` | Which extensions should trigger this module. | -| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".dart_tool"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | 這個模組的風格。 | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🎯 '` | A format string representing the symbol of Dart | +| `detect_extensions` | `['dart']` | Which extensions should trigger this module. | +| `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | Which filenames should trigger this module. | +| `detect_folders` | `['.dart_tool']` | Which folders should trigger this module. | +| `style` | `'bold blue'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -947,7 +1002,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d # ~/.config/starship.toml [dart] -format = "via [🔰 $version](bold red) " +format = 'via [🔰 $version](bold red) ' ``` ## Deno @@ -960,13 +1015,13 @@ The `deno` module shows you your currently installed version of [Deno](https://d | Option | 預設 | 說明 | | ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦕 "` | A format string representing the symbol of Deno | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦕 '` | A format string representing the symbol of Deno | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["deno.json", "deno.jsonc", "mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. | +| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"green bold"` | 這個模組的風格。 | +| `style` | `'green bold'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `deno` module. | ### Variables @@ -983,7 +1038,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d # ~/.config/starship.toml [deno] -format = "via [🦕 $version](green bold) " +format = 'via [🦕 $version](green bold) ' ``` ## 資料夾 @@ -996,20 +1051,21 @@ format = "via [🦕 $version](green bold) " ### 選項 -| 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: "…/" | -| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | -| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) | +| 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: '…/' | +| `before_repo_root_style` | | The style for the path segment above the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `'[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) '` | The format of a git repo when `before_repo_root_style` and `repo_root_style` is defined. | +| `home_symbol` | `'~'` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |

這個模組有些進階設定選項可以控制顯示資料夾。 @@ -1024,8 +1080,8 @@ format = "via [🦕 $version](green bold) " ```toml [directory.substitutions] -"/Volumes/network/path" = "/net" -"src/com/long/java/path" = "mypath" +'/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`. @@ -1036,8 +1092,8 @@ format = "via [🦕 $version](green bold) " | 變數 | 範例 | 說明 | | --------- | --------------------- | ----------------------------------- | -| path | `"D:/Projects"` | The current directory path | -| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | +| 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 @@ -1048,11 +1104,11 @@ Let us consider the path `/path/to/home/git_repo/src/lib` | 變數 | 範例 | 說明 | | ------------------ | --------------------- | --------------------------------------- | -| before_root_path | `"/path/to/home/"` | The path before git root directory path | -| repo_root | `"git_repo"` | The git root directory name | -| path | `"/src/lib"` | The remaining path | -| style | `"black bold dimmed"` | Mirrors the value of option `style` | -| repo_root_style | `"underline white"` | Style for git root directory name | +| before_root_path | `'/path/to/home/'` | The path before git root directory path | +| repo_root | `'git_repo'` | The git root directory name | +| path | `'/src/lib'` | The remaining path | +| style | `'black bold dimmed'` | Mirrors the value of option `style` | +| repo_root_style | `'underline white'` | Style for git root directory name |
@@ -1063,7 +1119,7 @@ Let us consider the path `/path/to/home/git_repo/src/lib` [directory] truncation_length = 8 -truncation_symbol = "…/" +truncation_symbol = '…/' ``` ## Docker Context @@ -1074,13 +1130,13 @@ The `docker_context` module shows the currently active [Docker context](https:// | Option | 預設 | 說明 | | ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `format` | `'via [$symbol$context]($style) '` | The format for the module. | +| `symbol` | `'🐳 '` | The symbol used before displaying the Docker context. | | `only_with_files` | `true` | Only show when there's a match | | `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | +| `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | Which filenames should trigger this module (needs `only_with_files` to be true). | | `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | -| `style` | `"blue bold"` | 這個模組的風格。 | +| `style` | `'blue bold'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -1099,7 +1155,7 @@ The `docker_context` module shows the currently active [Docker context](https:// # ~/.config/starship.toml [docker_context] -format = "via [🐋 $context](blue bold)" +format = 'via [🐋 $context](blue bold)' ``` ## Dotnet @@ -1127,14 +1183,14 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$var_cluster" +'dev.local.cluster.k8s' = 'dev' +'.*/openshift-cluster/.*' = 'openshift' +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' [kubernetes.user_aliases] -"dev.local.cluster.k8s" = "dev" -"root/.*" = "root" +'dev.local.cluster.k8s' = 'dev' +'root/.*' = 'root' ``` Only show the module in directories that contain a `k8s` file. @@ -2121,14 +2249,14 @@ Long and automatically generated cluster names can be identified and shortened u ```toml [kubernetes.context_aliases] # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -".*/openshift-cluster/.*" = "openshift" +'.*/openshift-cluster/.*' = 'openshift' # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$var_cluster" +'.*/(?P[\\w-]+)/.*' = '$var_cluster' # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' ``` ## 換行 @@ -2159,8 +2287,8 @@ The `localip` module shows the IPv4 address of the primary network interface. | Option | 預設 | 說明 | | ---------- | ------------------------- | ------------------------------------------------------ | | `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | 這個模組的風格。 | +| `format` | `'[$localipv4]($style) '` | The format for the module. | +| `style` | `'bold yellow'` | 這個模組的風格。 | | `disabled` | `true` | Disables the `localip` module. | ### Variables @@ -2179,7 +2307,7 @@ The `localip` module shows the IPv4 address of the primary network interface. [localip] ssh_only = false -format = "@[$localipv4](bold red) " +format = '@[$localipv4](bold red) ' disabled = false ``` @@ -2195,14 +2323,14 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | Option | 預設 | 說明 | | ------------------- | ------------------------------------ | -------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | -| `detect_extensions` | `["lua"]` | Which extensions should trigger this module. | -| `detect_files` | `[".lua-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["lua"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | 這個模組的風格。 | -| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🌙 '` | A format string representing the symbol of Lua. | +| `detect_extensions` | `['lua']` | Which extensions should trigger this module. | +| `detect_files` | `['.lua-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['lua']` | Which folders should trigger this module. | +| `style` | `'bold blue'` | 這個模組的風格。 | +| `lua_binary` | `'lua'` | Configures the lua binary that Starship executes when getting the version. | | `disabled` | `false` | Disables the `lua` module. | ### Variables @@ -2221,7 +2349,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o # ~/.config/starship.toml [lua] -format = "via [🌕 $version](bold blue) " +format = 'via [🌕 $version](bold blue) ' ``` ## 記憶體使用量 @@ -2241,9 +2369,9 @@ format = "via [🌕 $version](bold blue) " | Option | 預設 | 說明 | | ----------- | ----------------------------------------------- | -------------------------- | | `threshold` | `75` | 將記憶體使用量隱藏,除非使用量超過指定值。 | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | The format for the module. | -| `symbol` | `"🐏"` | 顯示在記憶體使用量之前的符號。 | -| `style` | `"bold dimmed white"` | 這個模組的風格。 | +| `format` | `'via $symbol [${ram}( \| ${swap})]($style) '` | The format for the module. | +| `symbol` | `'🐏'` | 顯示在記憶體使用量之前的符號。 | +| `style` | `'bold dimmed white'` | 這個模組的風格。 | | `disabled` | `true` | 停用 `memory_usage` 模組。 | ### Variables @@ -2267,8 +2395,8 @@ format = "via [🌕 $version](bold blue) " [memory_usage] disabled = false threshold = -1 -symbol = " " -style = "bold dimmed green" +symbol = ' ' +style = 'bold dimmed green' ``` ## Meson @@ -2282,10 +2410,10 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. | Option | 預設 | 說明 | | ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- | | `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | -| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. | -| `format` | `"via [$symbol$project]($style) "` | The format for the module. | -| `symbol` | `"⬢ "` | The symbol used before displaying the project name. | -| `style` | `"blue bold"` | 這個模組的風格。 | +| `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | +| `format` | `'via [$symbol$project]($style) '` | The format for the module. | +| `symbol` | `'⬢ '` | The symbol used before displaying the project name. | +| `style` | `'blue bold'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `meson` module. | ### Variables @@ -2305,9 +2433,9 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. [meson] disabled = false -truncation_symbol = "--" -symbol = " " -style = "bold dimmed green" +truncation_symbol = '--' +symbol = ' ' +style = 'bold dimmed green' ``` ## Mercurial Branch @@ -2318,11 +2446,11 @@ The `hg_branch` module shows the active branch of the repo in your current direc | Option | 預設 | 說明 | | ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | -| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | -| `style` | `"bold purple"` | 這個模組的風格。 | -| `format` | `"on [$symbol$branch]($style) "` | The format for the module. | +| `symbol` | `' '` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `style` | `'bold purple'` | 這個模組的風格。 | +| `format` | `'on [$symbol$branch]($style) '` | The format for the module. | | `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | -| `truncation_symbol` | `"…"` | 用來指示分支名稱被縮減的符號。 | +| `truncation_symbol` | `'…'` | 用來指示分支名稱被縮減的符號。 | | `disabled` | `true` | Disables the `hg_branch` module. | ### Variables @@ -2341,16 +2469,16 @@ The `hg_branch` module shows the active branch of the repo in your current direc # ~/.config/starship.toml [hg_branch] -format = "on [🌱 $branch](bold purple)" +format = 'on [🌱 $branch](bold purple)' truncation_length = 4 -truncation_symbol = "" +truncation_symbol = '' ``` ## Nim The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/). By default the module will be shown if any of the following conditions are met: -- 現在資料夾中含有一個 `nim.cfg` 檔案 +- 目前資料夾中有一個 `nim.cfg` 檔案 - 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 @@ -2359,13 +2487,13 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | Option | 預設 | 說明 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | -| `detect_extensions` | `["nim", "nims", "nimble"]` | Which extensions should trigger this module. | -| `detect_files` | `["nim.cfg"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'👑 '` | The symbol used before displaying the version of Nim. | +| `detect_extensions` | `['nim', 'nims', 'nimble']` | Which extensions should trigger this module. | +| `detect_files` | `['nim.cfg']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | 這個模組的風格。 | +| `style` | `'bold yellow'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `nim` module. | ### Variables @@ -2384,8 +2512,8 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang # ~/.config/starship.toml [nim] -style = "yellow" -symbol = "🎣 " +style = 'yellow' +symbol = '🎣 ' ``` ## Nix-shell @@ -2397,10 +2525,10 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | Option | 預設 | 說明 | | ------------ | ---------------------------------------------- | ----------------------------------------------------- | | `format` | `'via [$symbol$state( \($name\))]($style) '` | The format for the module. | -| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | -| `style` | `"bold blue"` | 這個模組的風格。 | -| `impure_msg` | `"impure"` | A format string shown when the shell is impure. | -| `pure_msg` | `"pure"` | A format string shown when the shell is pure. | +| `symbol` | `'❄️ '` | A format string representing the symbol of nix-shell. | +| `style` | `'bold blue'` | 這個模組的風格。 | +| `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` | 停用 `nix_shell` 模組。 | ### Variables @@ -2421,8 +2549,8 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ [nix_shell] disabled = true -impure_msg = "[impure shell](bold red)" -pure_msg = "[pure shell](bold green)" +impure_msg = '[impure shell](bold red)' +pure_msg = '[pure shell](bold green)' format = 'via [☃️ $state( \($name\))](bold blue) ' ``` @@ -2441,13 +2569,13 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | Option | 預設 | 說明 | | ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string representing the symbol of Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts", "mts", "cts"]` | Which extensions should trigger this module. | -| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | -| `style` | `"bold green"` | 這個模組的風格。 | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string representing the symbol of Node.js. | +| `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Which extensions should trigger this module. | +| `detect_files` | `['package.json', '.node-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['node_modules']` | Which folders should trigger this module. | +| `style` | `'bold green'` | 這個模組的風格。 | | `disabled` | `false` | 停用 `nodejs` 模組。 | | `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | @@ -2467,7 +2595,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n # ~/.config/starship.toml [nodejs] -format = "via [🤖 $version](bold green) " +format = 'via [🤖 $version](bold green) ' ``` ## OCaml @@ -2485,15 +2613,15 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | Option | 預設 | 說明 | | ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | -| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | -| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | -| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Which extensions should trigger this module. | -| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Which filenames should trigger this module. | -| `detect_folders` | `["_opam", "esy.lock"]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | 這個模組的風格。 | +| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐫 '` | The symbol used before displaying the version of OCaml. | +| `global_switch_indicator` | `''` | The format string used to represent global OPAM switch. | +| `local_switch_indicator` | `'*'` | The format string used to represent local OPAM switch. | +| `detect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | Which extensions should trigger this module. | +| `detect_files` | `['dune', 'dune-project', 'jbuild', 'jbuild-ignore', '.merlin']` | Which filenames should trigger this module. | +| `detect_folders` | `['_opam', 'esy.lock']` | Which folders should trigger this module. | +| `style` | `'bold yellow'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `ocaml` module. | ### Variables @@ -2514,7 +2642,43 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam # ~/.config/starship.toml [ocaml] -format = "via [🐪 $version]($style) " +format = 'via [🐪 $version]($style) ' +``` + +## Open Policy Agent + +The `opa` module shows the currently installed version of the OPA tool. By default the module will be shown if the current directory contains a `.rego` file. + +### 選項 + +| Option | 預設 | 說明 | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | +| `detect_extensions` | `['rego']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'bold blue'` | 這個模組的風格。 | +| `disabled` | `false` | Disables the `opa` module. | + +### Variables + +| 變數 | 範例 | 說明 | +| --------- | --------- | ------------------------------------ | +| version | `v0.44.0` | The version of `opa` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### 範例 + +```toml +# ~/.config/starship.toml + +[opa] +format = 'via [⛑️ $version](bold red) ' ``` ## OpenStack @@ -2526,8 +2690,8 @@ The `openstack` module shows the current OpenStack cloud and project. The module | Option | 預設 | 說明 | | ---------- | ----------------------------------------------- | -------------------------------------------------------------- | | `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | -| `style` | `"bold yellow"` | 這個模組的風格。 | +| `symbol` | `'☁️ '` | The symbol used before displaying the current OpenStack cloud. | +| `style` | `'bold yellow'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `openstack` module. | ### Variables @@ -2548,8 +2712,105 @@ The `openstack` module shows the current OpenStack cloud and project. The module [openstack] format = 'on [$symbol$cloud(\($project\))]($style) ' -style = "bold yellow" -symbol = "☁️ " +style = 'bold yellow' +symbol = '☁️ ' +``` + +## OS + +The `os` module shows the current operating system. OS information is detected via the [os_info](https://lib.rs/crates/os_info) crate. + +::: warning + +The [os_info](https://lib.rs/crates/os_info) crate used by this module is known to be inaccurate on some systems. + +::: + +::: tip + +這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。 + +::: + +### 選項 + +| Option | 預設 | 說明 | +| ---------- | --------------------- | ------------------------------------------------------ | +| `format` | `"[$symbol]($style)"` | The format for the module. | +| `style` | `"bold white"` | 這個模組的風格。 | +| `disabled` | `true` | Disables the `os` module. | +| `symbols` | | A table that maps each operating system to its symbol. | + +`symbols` allows you to define arbitrary symbols to display for each operating system type. Operating system types not defined by your configuration use the default symbols table below. All operating systems currently supported by the module are listed below. If you would like an operating system to be added, feel free to open a [feature request](https://github.com/starship/starship/issues/new/choose). + +```toml +# This is the default symbols table. +[os.symbols] +Alpine = "🏔️ " +Amazon = "🙂 " +Android = "🤖 " +Arch = "🎗️ " +CentOS = "💠 " +Debian = "🌀 " +DragonFly = "🐉 " +Emscripten = "🔗 " +EndeavourOS = "🚀 " +Fedora = "🎩 " +FreeBSD = "😈 " +Garuda = "🦅 " +Gentoo = "🗜️ " +HardenedBSD = "🛡️ " +Illumos = "🐦 " +Linux = "🐧 " +Macos = "🍎 " +Manjaro = "🥭 " +Mariner = "🌊 " +MidnightBSD = "🌘 " +Mint = "🌿 " +NetBSD = "🚩 " +NixOS = "❄️ " +OpenBSD = "🐡 " +openSUSE = "🦎 " +OracleLinux = "🦴 " +Pop = "🍭 " +Raspbian = "🍓 " +Redhat = "🎩 " +RedHatEnterprise = "🎩 " +Redox = "🧪 " +Solus = "⛵ " +SUSE = "🦎 " +Ubuntu = "🎯 " +Unknown = "❓ " +Windows = "🪟 " +``` + +### Variables + +| 變數 | 範例 | 說明 | +| --------- | ------------ | ------------------------------------------------------------------ | +| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | +| name | `Arch Linux` | The current operating system name | +| type | `Arch` | The current operating system type | +| codename | | The current operating system codename, if applicable | +| edition | | The current operating system edition, if applicable | +| version | | The current operating system version, if applicable | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### 範例 + +```toml +# ~/.config/starship.toml + +[os] +format = "on [($name )]($style)" +style = "bold blue" +disabled = false + +[os.symbols] +Windows = " " +Arch = "Arch is the best! " ``` ## 套件版本 @@ -2580,10 +2841,10 @@ The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並 | Option | 預設 | 說明 | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"is [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"📦 "` | 顯示在套件的版本之前的符號。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold 208"` | 這個模組的風格。 | +| `format` | `'is [$symbol$version]($style) '` | The format for the module. | +| `symbol` | `'📦 '` | 顯示在套件的版本之前的符號。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold 208'` | 這個模組的風格。 | | `display_private` | `false` | Enable displaying version for packages marked as private. | | `disabled` | `false` | 停用 `package` 模組。 | @@ -2603,7 +2864,7 @@ The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並 # ~/.config/starship.toml [package] -format = "via [🎁 $version](208 bold) " +format = 'via [🎁 $version](208 bold) ' ``` ## Perl @@ -2620,13 +2881,13 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe | Option | 預設 | 說明 | | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | -| `detect_extensions` | `["pl", "pm", "pod"]` | Which extensions should trigger this module. | -| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | +| `detect_extensions` | `['pl', 'pm', 'pod']` | Which extensions should trigger this module. | +| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | 這個模組的風格。 | +| `style` | `'bold 149'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `perl` module. | ### Variables @@ -2643,14 +2904,14 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe # ~/.config/starship.toml [perl] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## PHP The `php` module shows the currently installed version of [PHP](https://www.php.net/). By default the module will be shown if any of the following conditions are met: -- 現在資料夾中含有一個 `composer.json` 檔案 +- The current directory contains a `composer.json` file - The current directory contains a `.php-version` file - The current directory contains a `.php` extension @@ -2658,13 +2919,13 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | Option | 預設 | 說明 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | -| `detect_extensions` | `["php"]` | Which extensions should trigger this module. | -| `detect_files` | `["composer.json", ".php-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐘 '` | The symbol used before displaying the version of PHP. | +| `detect_extensions` | `['php']` | Which extensions should trigger this module. | +| `detect_files` | `['composer.json', '.php-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"147 bold"` | 這個模組的風格。 | +| `style` | `'147 bold'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `php` module. | ### Variables @@ -2683,7 +2944,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. # ~/.config/starship.toml [php] -format = "via [🔹 $version](147 bold) " +format = 'via [🔹 $version](147 bold) ' ``` ## Pulumi @@ -2705,10 +2966,10 @@ By default the module will be shown if any of the following conditions are met: | Option | 預設 | 說明 | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string shown before the Pulumi stack. | -| `style` | `"bold 5"` | 這個模組的風格。 | +| `format` | `'via [$symbol($username@)$stack]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string shown before the Pulumi stack. | +| `style` | `'bold 5'` | 這個模組的風格。 | | `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | | `disabled` | `false` | Disables the `pulumi` module. | @@ -2732,7 +2993,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [pulumi] -format = "[🛥 ($version )$stack]($style) " +format = '[🛥 ($version )$stack]($style) ' ``` #### Without Pulumi version @@ -2740,28 +3001,28 @@ format = "[🛥 ($version )$stack]($style) " ```toml # ~/.config/starship.toml [pulumi] -symbol = "🛥 " -format = "[$symbol$stack]($style) " +symbol = '🛥 ' +format = '[$symbol$stack]($style) ' ``` ## PureScript The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met: -- 現在資料夾中含有一個 `spago.dhall` 檔案 +- 目前資料夾中有一個 `spago.dhall` 檔案 - The current directory contains a file with the `.purs` extension ### 選項 | Option | 預設 | 說明 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | -| `detect_extensions` | `["purs"]` | Which extensions should trigger this module. | -| `detect_files` | `["spago.dhall"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'<=> '` | The symbol used before displaying the version of PureScript. | +| `detect_extensions` | `['purs']` | Which extensions should trigger this module. | +| `detect_files` | `['spago.dhall']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold white"` | 這個模組的風格。 | +| `style` | `'bold white'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -2780,7 +3041,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht # ~/.config/starship.toml [purescript] -format = "via [$symbol$version](bold white)" +format = 'via [$symbol$version](bold white)' ``` ## Python @@ -2796,7 +3057,7 @@ By default the module will be shown if any of the following conditions are met: - The current directory contains a `__init__.py` file - 目前資料夾中有一個 `pyproject.toml` 檔案 - 目前資料夾中有一個 `requirements.txt` 檔案 -- 現在資料夾中含有一個 `setup.py` 檔案 +- 目前資料夾中有一個 `setup.py` 檔案 - 目前資料夾中有一個 `tox.ini` 檔案 - 目前資料夾中有一個 `.py` 副檔名的檔案. - A virtual environment is currently activated @@ -2806,14 +3067,14 @@ By default the module will be shown if any of the following conditions are met: | Option | 預設 | 說明 | | -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | | `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | 這個模組的風格。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐍 '` | A format string representing the symbol of Python | +| `style` | `'yellow bold'` | 這個模組的風格。 | | `pyenv_version_name` | `false` | 使用 pyenv 取得 Python 的版本。 | | `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | -| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `detect_extensions` | `["py"]` | Which extensions should trigger this module | -| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module | +| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | +| `detect_extensions` | `['py']` | Which extensions should trigger this module | +| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | | `disabled` | `false` | 停用 `python` 模組。 | @@ -2821,7 +3082,7 @@ By default the module will be shown if any of the following conditions are met: 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. +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. ::: @@ -2829,11 +3090,11 @@ The default values and order for `python_binary` was chosen to first identify th | 變數 | 範例 | 說明 | | ------------ | --------------- | ------------------------------------------ | -| 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 | +| 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 | ### 範例 @@ -2841,7 +3102,7 @@ The default values and order for `python_binary` was chosen to first identify th # ~/.config/starship.toml [python] -symbol = "👾 " +symbol = '👾 ' pyenv_version_name = true ``` @@ -2850,7 +3111,7 @@ pyenv_version_name = true [python] # Only use the `python3` binary to get the version. -python_binary = "python3" +python_binary = 'python3' ``` ```toml @@ -2869,7 +3130,7 @@ detect_extensions = [] # # Note this will only work when the venv is inside the project and it will only # work in the directory that contains the venv dir but maybe this is ok? -python_binary = ["./venv/bin/python", "python", "python3", "python2"] +python_binary = ['./venv/bin/python', 'python', 'python3', 'python2'] ``` ## R @@ -2888,13 +3149,13 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | Option | 預設 | 說明 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"📐"` | A format string representing the symbol of R. | -| `style` | `"blue bold"` | 這個模組的風格。 | -| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module | -| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module | -| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'📐'` | A format string representing the symbol of R. | +| `style` | `'blue bold'` | 這個模組的風格。 | +| `detect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | Which extensions should trigger this module | +| `detect_files` | `['.Rprofile']` | Which filenames should trigger this module | +| `detect_folders` | `['.Rproj.user']` | Which folders should trigger this module | | `disabled` | `false` | Disables the `r` module. | ### Variables @@ -2903,7 +3164,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | ------- | ------------- | ------------------------------------ | | version | `v4.0.5` | The version of `R` | | symbol | | Mirrors the value of option `symbol` | -| style | `"blue bold"` | Mirrors the value of option `style` | +| style | `'blue bold'` | Mirrors the value of option `style` | ### 範例 @@ -2911,7 +3172,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr # ~/.config/starship.toml [rlang] -format = "with [📐 $version](blue bold) " +format = 'with [📐 $version](blue bold) ' ``` ## Raku @@ -2925,13 +3186,13 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra | Option | 預設 | 說明 | | ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version-$vm_version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦋 "` | The symbol used before displaying the version of Raku | -| `detect_extensions` | `["p6", "pm6", "pod6", "raku", "rakumod"]` | Which extensions should trigger this module. | -| `detect_files` | `["META6.json"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version-$vm_version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦋 '` | The symbol used before displaying the version of Raku | +| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Which extensions should trigger this module. | +| `detect_files` | `['META6.json']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | 這個模組的風格。 | +| `style` | `'bold 149'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `raku` module. | ### Variables @@ -2949,12 +3210,12 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra # ~/.config/starship.toml [raku] -format = "via [🦪 $version]($style) " +format = 'via [🦪 $version]($style) ' ``` ## Red -By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). 這個模組在下列其中一個條件達成時顯示: +By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). 這個模組將在下列其中一個條件滿足時顯示: - The current directory contains a file with `.red` or `.reds` extension @@ -2962,13 +3223,13 @@ By default the `red` module shows the currently installed version of [Red](https | Option | 預設 | 說明 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | -| `detect_extensions` | `["red"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🔺 '` | A format string representing the symbol of Red. | +| `detect_extensions` | `['red']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"red bold"` | 這個模組的風格。 | +| `style` | `'red bold'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `red` module. | ### Variables @@ -2987,12 +3248,12 @@ By default the `red` module shows the currently installed version of [Red](https # ~/.config/starship.toml [red] -symbol = "🔴 " +symbol = '🔴 ' ``` ## Ruby -By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). 這個模組在下列其中一個條件達成時顯示: +By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). 這個模組將在下列其中一個條件滿足時顯示: - 目前資料夾中有一個 `Gemfile` 檔案 - The current directory contains a `.ruby-version` file @@ -3005,14 +3266,14 @@ Starship gets the current Ruby version by running `ruby -v`. | Option | 預設 | 說明 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. | -| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💎 '` | A format string representing the symbol of Ruby. | +| `detect_extensions` | `['rb']` | Which extensions should trigger this module. | +| `detect_files` | `['Gemfile', '.ruby-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | -| `style` | `"bold red"` | 這個模組的風格。 | +| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Which environment variables should trigger this module. | +| `style` | `'bold red'` | 這個模組的風格。 | | `disabled` | `false` | 停用 `ruby` 模組。 | ### Variables @@ -3031,12 +3292,12 @@ Starship gets the current Ruby version by running `ruby -v`. # ~/.config/starship.toml [ruby] -symbol = "🔺 " +symbol = '🔺 ' ``` ## Rust -By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). 這個模組在下列其中一個條件達成時顯示: +By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). 這個模組將在下列其中一個條件滿足時顯示: - 目前資料夾中有一個 `Cargo.toml` 檔案 - 現在資料夾中包含一個檔案具有 `.rs` 副檔名 @@ -3045,13 +3306,13 @@ By default the `rust` module shows the currently installed version of [Rust](htt | Option | 預設 | 說明 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. | -| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦀 '` | A format string representing the symbol of Rust | +| `detect_extensions` | `['rs']` | Which extensions should trigger this module. | +| `detect_files` | `['Cargo.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | 這個模組的風格。 | +| `style` | `'bold red'` | 這個模組的風格。 | | `disabled` | `false` | 停用 `rust` 模組。 | ### Variables @@ -3072,7 +3333,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt # ~/.config/starship.toml [rust] -format = "via [⚙️ $version](red bold)" +format = 'via [⚙️ $version](red bold)' ``` ## Scala @@ -3087,13 +3348,13 @@ The `scala` module shows the currently installed version of [Scala](https://www. | Option | 預設 | 說明 | | ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | -| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | -| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | -| `style` | `"red dimmed"` | 這個模組的風格。 | +| `format` | `'via [${symbol}(${version} )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. | +| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. | +| `detect_folders` | `['.metals']` | Which folders should trigger this modules. | +| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. | +| `style` | `'red dimmed'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `scala` module. | ### Variables @@ -3112,7 +3373,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. # ~/.config/starship.toml [scala] -symbol = "🌟 " +symbol = '🌟 ' ``` ## Shell @@ -3129,19 +3390,19 @@ The `shell` module shows an indicator for currently used shell. | Option | 預設 | 說明 | | ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `"bsh"` | A format string used to represent bash. | -| `fish_indicator` | `"fsh"` | A format string used to represent fish. | -| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. | -| `powershell_indicator` | `"psh"` | A format string used to represent powershell. | -| `ion_indicator` | `"ion"` | A format string used to represent ion. | -| `elvish_indicator` | `"esh"` | A format string used to represent elvish. | -| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. | -| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. | -| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. | -| `nu_indicator` | `"nu"` | A format string used to represent nu. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `"[$indicator]($style) "` | The format for the module. | -| `style` | `"white bold"` | 這個模組的風格。 | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `style` | `'white bold'` | 這個模組的風格。 | | `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3159,26 +3420,26 @@ The `shell` module shows an indicator for currently used shell. # ~/.config/starship.toml [shell] -fish_indicator = "" -powershell_indicator = "_" -unknown_indicator = "mystery shell" -style = "cyan bold" +fish_indicator = '' +powershell_indicator = '_' +unknown_indicator = 'mystery shell' +style = 'cyan bold' disabled = false ``` ## SHLVL -The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ('shell level') environment variable, if it is set to a number and meets or exceeds the specified threshold. ### 選項 | Option | 預設 | 說明 | | ----------- | ---------------------------- | ------------------------------------------------------------- | | `threshold` | `2` | Display threshold. | -| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. | -| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. | +| `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"` | 這個模組的風格。 | +| `style` | `'bold yellow'` | 這個模組的風格。 | | `disabled` | `true` | Disables the `shlvl` module. | ### Variables @@ -3198,7 +3459,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int [shlvl] disabled = false -format = "$shlvl level(s) down" +format = '$shlvl level(s) down' threshold = 3 ``` @@ -3211,8 +3472,8 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | Option | 預設 | 說明 | | ---------- | -------------------------------- | ------------------------------------------------ | | `format` | `'[$symbol\[$env\]]($style) '` | The format for the module. | -| `symbol` | `""` | A format string displayed before the image name. | -| `style` | `"bold dimmed blue"` | 這個模組的風格。 | +| `symbol` | `''` | A format string displayed before the image name. | +| `style` | `'bold dimmed blue'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `singularity` module. | ### Variables @@ -3243,9 +3504,9 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | Option | 預設 | 說明 | | ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | The number of directories the environment path should be truncated to. `0` 表示不截斷 也請參考 [`directory`](#directory)模組 | -| `symbol` | `"🅢 "` | 環境名稱前使用的符號。 | -| `style` | `"bold blue"` | 這個模組的風格。 | -| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `symbol` | `'🅢 '` | 環境名稱前使用的符號。 | +| `style` | `'bold blue'` | 這個模組的風格。 | +| `format` | `'via [$symbol$environment]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `spack` module. | ### Variables @@ -3264,7 +3525,7 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat # ~/.config/starship.toml [spack] -format = "[$symbol$environment](dimmed blue) " +format = '[$symbol$environment](dimmed blue) ' ``` ## Status @@ -3281,14 +3542,14 @@ The `status` module displays the exit code of the previous command. If $success_ | Option | 預設 | 說明 | | --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `format` | `"[$symbol$status]($style) "` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `success_symbol` | `""` | The symbol displayed on program success | -| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | -| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | -| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | -| `style` | `"bold red"` | 這個模組的風格。 | +| `format` | `'[$symbol$status]($style) '` | The format of the module | +| `symbol` | `'❌'` | The symbol displayed on program error | +| `success_symbol` | `''` | The symbol displayed on program success | +| `not_executable_symbol` | `'🚫'` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `'🔍'` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `'🧱'` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `'⚡'` | The symbol displayed on any signal | +| `style` | `'bold red'` | 這個模組的風格。 | | `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code | | `pipestatus` | `false` | Enable pipestatus reporting | @@ -3320,9 +3581,9 @@ The `status` module displays the exit code of the previous command. If $success_ # ~/.config/starship.toml [status] -style = "bg:blue" -symbol = "🔴 " -success_symbol = "🟢 SUCCESS" +style = 'bg:blue' +symbol = '🔴 ' +success_symbol = '🟢 SUCCESS' format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' map_symbol = true disabled = false @@ -3342,9 +3603,9 @@ The `sudo` module displays if sudo credentials are currently cached. The module | Option | 預設 | 說明 | | --------------- | ------------------------ | ------------------------------------------------------- | -| `format` | `"[as $symbol]($style)"` | The format of the module | -| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached | -| `style` | `"bold blue"` | 這個模組的風格。 | +| `format` | `'[as $symbol]($style)'` | The format of the module | +| `symbol` | `'🧙 '` | The symbol displayed when credentials are cached | +| `style` | `'bold blue'` | 這個模組的風格。 | | `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | | `disabled` | `true` | Disables the `sudo` module. | @@ -3363,8 +3624,8 @@ The `sudo` module displays if sudo credentials are currently cached. The module # ~/.config/starship.toml [sudo] -style = "bold green" -symbol = "👩‍💻 " +style = 'bold green' +symbol = '👩‍💻 ' disabled = false ``` @@ -3379,7 +3640,7 @@ disabled = false ## Swift -By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). 這個模組在下列其中一個條件達成時顯示: +By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). 這個模組將在下列其中一個條件滿足時顯示: - The current directory contains a `Package.swift` file - The current directory contains a file with the `.swift` extension @@ -3388,13 +3649,13 @@ By default the `swift` module shows the currently installed version of [Swift](h | Option | 預設 | 說明 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `detect_extensions` | `["swift"]` | Which extensions should trigger this module. | -| `detect_files` | `["Package.swift"]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐦 '` | A format string representing the symbol of Swift | +| `detect_extensions` | `['swift']` | Which extensions should trigger this module. | +| `detect_files` | `['Package.swift']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 202"` | 這個模組的風格。 | +| `style` | `'bold 202'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -3413,7 +3674,7 @@ By default the `swift` module shows the currently installed version of [Swift](h # ~/.config/starship.toml [swift] -format = "via [🏎 $version](red bold)" +format = 'via [🏎 $version](red bold)' ``` ## Terraform @@ -3435,13 +3696,13 @@ By default the module will be shown if any of the following conditions are met: | Option | 預設 | 說明 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol$workspace]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💠'` | A format string shown before the terraform workspace. | +| `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | -| `style` | `"bold 105"` | 這個模組的風格。 | +| `detect_folders` | `['.terraform']` | Which folders should trigger this module. | +| `style` | `'bold 105'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `terraform` module. | ### Variables @@ -3463,7 +3724,7 @@ By default the module will be shown if any of the following conditions are met: # ~/.config/starship.toml [terraform] -format = "[🏎💨 $version$workspace]($style) " +format = '[🏎💨 $version$workspace]($style) ' ``` #### Without Terraform version @@ -3472,7 +3733,7 @@ format = "[🏎💨 $version$workspace]($style) " # ~/.config/starship.toml [terraform] -format = "[🏎💨 $workspace]($style) " +format = '[🏎💨 $workspace]($style) ' ``` ## 時間 @@ -3489,15 +3750,15 @@ format = "[🏎💨 $workspace]($style) " | Option | 預設 | 說明 | | ----------------- | ----------------------- | ----------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | The format string for the module. | +| `format` | `'at [$time]($style) '` | The format string for the module. | | `use_12hr` | `false` | 啟用 12 小時格式。 | | `time_format` | 請看下列 | 用來顯示時間的 [chrono 格式字串](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)。 | -| `style` | `"bold yellow"` | 這個模組的時間的風格。 | -| `utc_time_offset` | `"local"` | 設定相對於 UTC 的時差。 Range from -24 < x < 24. 允許使用浮點數來表示 30/45 分鐘時差的時區。 | +| `style` | `'bold yellow'` | 這個模組的時間的風格。 | +| `utc_time_offset` | `'local'` | 設定相對於 UTC 的時差。 Range from -24 < x < 24. 允許使用浮點數來表示 30/45 分鐘時差的時區。 | | `disabled` | `true` | 停用 `time` 模組。 | -| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | +| `time_range` | `'-'` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | -If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. 不然的話,它會被預設為 `"%T"`。 Manually setting `time_format` will override the `use_12hr` setting. +If `use_12hr` is `true`, then `time_format` defaults to `'%r'`. Otherwise, it defaults to `'%T'`. Manually setting `time_format` will override the `use_12hr` setting. ### Variables @@ -3516,14 +3777,14 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. 不然的話, [time] disabled = false format = '🕙[\[ $time \]]($style) ' -time_format = "%T" -utc_time_offset = "-5" -time_range = "10:00:00-14:00:00" +time_format = '%T' +utc_time_offset = '-5' +time_range = '10:00:00-14:00:00' ``` ## 使用者名稱 -`username` 模組顯示現在使用中的使用者名稱。 這個模組在下列其中一個條件達成時顯示: +`username` 模組顯示現在使用中的使用者名稱。 這個模組將在下列其中一個條件滿足時顯示: - The current user is root/admin - 目前使用者並非登入時的使用者 @@ -3540,9 +3801,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | Option | 預設 | 說明 | | ------------- | ----------------------- | ------------------------------------------- | -| `style_root` | `"bold red"` | The style used when the user is root/admin. | -| `style_user` | `"bold yellow"` | 非 root 使用者時使用的風格。 | -| `format` | `"[$user]($style) in "` | The format for the module. | +| `style_root` | `'bold red'` | The style used when the user is root/admin. | +| `style_user` | `'bold yellow'` | 非 root 使用者時使用的風格。 | +| `format` | `'[$user]($style) in '` | The format for the module. | | `show_always` | `false` | 總是顯示 `username` 模組。 | | `disabled` | `false` | 停用 `username` 模組。 | @@ -3550,8 +3811,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | 變數 | 範例 | 說明 | | ------- | ------------ | ------------------------------------------------------------------------------------------- | -| `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. | +| `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. | ### 範例 @@ -3559,9 +3820,9 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` # ~/.config/starship.toml [username] -style_user = "white bold" -style_root = "black bold" -format = "user: [$user]($style) " +style_user = 'white bold' +style_root = 'black bold' +format = 'user: [$user]($style) ' disabled = false show_always = true ``` @@ -3576,13 +3837,13 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | Option | 預設 | 說明 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'⍱ '` | A format string representing the symbol of Vagrant. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["Vagrantfile"]` | Which filenames should trigger this module. | +| `detect_files` | `['Vagrantfile']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"cyan bold"` | 這個模組的風格。 | +| `style` | `'cyan bold'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `vagrant` module. | ### Variables @@ -3601,7 +3862,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// # ~/.config/starship.toml [vagrant] -format = "via [⍱ $version](bold white) " +format = 'via [⍱ $version](bold white) ' ``` ## V @@ -3615,13 +3876,13 @@ The `vlang` module shows you your currently installed version of [V](https://vla | Option | 預設 | 說明 | | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"V "` | A format string representing the symbol of V | -| `detect_extensions` | `["v"]` | Which extensions should trigger this module. | -| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Which filenames should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'V '` | A format string representing the symbol of V | +| `detect_extensions` | `['v']` | Which extensions should trigger this module. | +| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"blue bold"` | 這個模組的風格。 | +| `style` | `'blue bold'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `vlang` module. | ### Variables @@ -3637,7 +3898,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla ```toml # ~/.config/starship.toml [vlang] -format = "via [V $version](blue bold) " +format = 'via [V $version](blue bold) ' ``` ## VCSH @@ -3648,9 +3909,9 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | Option | 預設 | 說明 | | ---------- | -------------------------------- | ------------------------------------------------------ | -| `symbol` | | The symbol used before displaying the repository name. | -| `style` | `"bold yellow"` | 這個模組的風格。 | -| `format` | `"vcsh [$symbol$repo]($style) "` | The format for the module. | +| `symbol` | `''` | The symbol used before displaying the repository name. | +| `style` | `'bold yellow'` | 這個模組的風格。 | +| `format` | `'vcsh [$symbol$repo]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `vcsh` module. | ### Variables @@ -3669,12 +3930,12 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v # ~/.config/starship.toml [vcsh] -format = "[🆅 $repo](bold blue) " +format = '[🆅 $repo](bold blue) ' ``` ## Zig -By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). 這個模組在下列其中一個條件達成時顯示: +By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). 這個模組將在下列其中一個條件滿足時顯示: - The current directory contains a `.zig` file @@ -3682,12 +3943,12 @@ By default the the `zig` module shows the currently installed version of [Zig](h | Option | 預設 | 說明 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | 這個模組的風格。 | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'↯ '` | The symbol used before displaying the version of Zig. | +| `style` | `'bold yellow'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `zig` module. | -| `detect_extensions` | `["zig"]` | Which extensions should trigger this module. | +| `detect_extensions` | `['zig']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -3707,7 +3968,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h # ~/.config/starship.toml [zig] -symbol = "⚡️ " +symbol = '⚡️ ' ``` ## Custom commands @@ -3752,16 +4013,16 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | Option | 預設 | 說明 | | ------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `command` | `''` | The command whose output should be printed. The command will be passed on stdin to the shell. | | `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `說明` | `""` | The description of the module that is shown when running `starship explain`. | +| `說明` | `''` | The description of the module that is shown when running `starship explain`. | | `detect_files` | `[]` | The files that will be searched in the working directory for a match. | | `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. | | `detect_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. | +| `symbol` | `''` | The symbol used before displaying the command output. | +| `style` | `'bold green'` | 這個模組的風格。 | +| `format` | `'[$symbol($output )]($style)'` | The format for the module. | | `disabled` | `false` | Disables this `custom` module. | | `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | | `use_stdin` | | An optional boolean value that overrides whether commands should be forwarded to the shell via the standard input or as an argument. If unset standard input is used by default, unless the shell does not support it (cmd, nushell). Setting this disables shell-specific argument handling. | @@ -3784,14 +4045,14 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt - 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. +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 -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. ```toml -shell = ["pwsh", "-Command", "-"] +shell = ['pwsh', '-Command', '-'] ``` ::: warning Make sure your custom shell configuration exits gracefully @@ -3812,19 +4073,19 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -detect_files = ["foo"] # can specify filters but wildcards are not supported -when = """ test "$HOME" = "$PWD" """ -format = " transcending [$output]($style)" +command = 'echo foo' # shows output of command +detect_files = ['foo'] # can specify filters but wildcards are not supported +when = ''' test "$HOME" = "$PWD" ''' +format = ' transcending [$output]($style)' [custom.time] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command', '-'] [custom.time-as-arg] -command = "time /T" -detect_extensions = ["pst"] # filters *.pst files -shell = ["pwsh.exe", "-NoProfile", "-Command"] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command'] use_stdin = false ``` diff --git a/docs/zh-TW/guide/README.md b/docs/zh-TW/guide/README.md index 84d17788..b02a231b 100644 --- a/docs/zh-TW/guide/README.md +++ b/docs/zh-TW/guide/README.md @@ -152,12 +152,12 @@ **適合任何 shell 的最小、極速、無限客製化的提示字元!** -- **快:**很快 —— 非常非常快! 🚀 -- **可客製化:**全方面定制你的提示字元。 -- **通用:**適用於任何 Shell 以及作業系統。 -- **智能:**一目了然地顯示相關信息。 -- **豐富的功能:**支援所以有你喜歡的工具。 -- **易用:**安裝快速 —— 幾分鐘內就可以開始使用。 +- **效率:**很快 – _非常非常_快! 🚀 +- **客製化:**全方面設定你的提示字元。 +- **通用性:**適用於任何 Shell 以及作業系統。 +- **智慧:**一目了然地顯示相關資訊。 +- **豐富的功能:**支援所有你喜歡的工具。 +- **易用:**安裝快速 – 幾分鐘內即可開始使用。

探索 Starship 文件  ▶ @@ -171,9 +171,9 @@ - 安裝至少一個 [Nerd Font](https://www.nerdfonts.com/) 字體,並在終端中啟用(例如,你可以試試 [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads))。 -### Step 1. Install Starship +### 第一步 安裝 Starship -Select your operating system from the list below to view installation instructions: +瀏覽各系統的安裝指示

Android @@ -219,7 +219,6 @@ Alternatively, install Starship using any of the following package managers: | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | | Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | -| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` | | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | @@ -264,9 +263,9 @@ Install Starship using any of the following package managers:
-### Step 2. Setup your shell to use Starship +### 第二步 為您的 shell 安裝 Starship -Configure your shell to initialize starship. Select yours from the list below: +設定您的 shell 以啟用 Starship。 請從下列選單選取您的 shell:
Bash @@ -280,7 +279,7 @@ eval "$(starship init bash)"
-Cmd +命令提示字元 You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: @@ -389,15 +388,15 @@ eval "$(starship init zsh)"
-### Step 3. Configure Starship +### 第三步 設定 Starship -Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy! +開啟一個新的 shell,您應該可以看到新的美麗 shell 提示字元。 若您對預設值感到滿意,盡情享受! -If you're looking to further customize Starship: +如果您想要更加客製化 Startship : -- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking +- **[設定](https://starship.rs/config/)**:學習如何設定 Starship 來微調提示字元的外觀 -- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others +- **[其他預設組態](https://starship.rs/presets/)**:從別人的設定當中獲得啟發 ## 🤝 貢獻 @@ -417,6 +416,14 @@ If you're looking to further customize Starship: - **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons. +## ❤️ Sponsors + +Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website. + +**Supporter Tier** + +- [Dimension](https://dimension.dev/) +


Starship rocket icon diff --git a/docs/zh-TW/presets/README.md b/docs/zh-TW/presets/README.md index 8ac78edb..35413ed1 100644 --- a/docs/zh-TW/presets/README.md +++ b/docs/zh-TW/presets/README.md @@ -10,6 +10,14 @@ This preset changes the symbols for each module to use Nerd Font symbols. [![Nerd Font 預設樣式的截圖](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font) +## [No Nerd Fonts](./no-nerd-font.md) + +This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt. + +::: tip This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). ::: + +[Click to view No Nerd Font preset](./no-nerd-font) + ## [括號片段](./bracketed-segments.md) 這個預設樣式使所有模組使用括號片段內的格式顯示,而非使用 Starship 預設("via", "on", etc.)。 @@ -28,6 +36,12 @@ This preset changes the symbols for each module into plain text. Great if you do [![隱藏運行版本預設樣式的截圖](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes) +## [No Empty Icons](./no-empty-icons.md) + +This preset does not show icons if the toolset is not found. + +[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Click to view No Runtime Versions preset")](./no-empty-icons.md) + ## [Pure Prompt](./pure-preset.md) This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). @@ -39,3 +53,9 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship. [![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png "Click to view Pure Prompt preset")](./pastel-powerline) + +## [Tokyo Night](./tokyo-night.md) + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) diff --git a/docs/zh-TW/presets/no-empty-icons.md b/docs/zh-TW/presets/no-empty-icons.md new file mode 100644 index 00000000..bec3e0d1 --- /dev/null +++ b/docs/zh-TW/presets/no-empty-icons.md @@ -0,0 +1,17 @@ +[Return to Presets](./README.md#no-empty-icons) + +# No Empty Icons Preset + +If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. + +![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) + +### 設定 + +```sh +starship preset no-empty-icons > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-empty-icons.toml) + +<<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/zh-TW/presets/no-nerd-font.md b/docs/zh-TW/presets/no-nerd-font.md new file mode 100644 index 00000000..dacac623 --- /dev/null +++ b/docs/zh-TW/presets/no-nerd-font.md @@ -0,0 +1,19 @@ +[Return to Presets](./README.md#no-nerd-fonts) + +# No Nerd Fonts Preset + +This preset restricts the use of symbols to those from emoji and powerline sets. + +This means that even without a Nerd Font installed, you should be able to view all module symbols. + +This preset will become the default preset in a future release of starship. + +### 設定 + +```sh +starship preset no-nerd-font > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-nerd-font.toml) + +<<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/zh-TW/presets/tokyo-night.md b/docs/zh-TW/presets/tokyo-night.md new file mode 100644 index 00000000..e2ecc99c --- /dev/null +++ b/docs/zh-TW/presets/tokyo-night.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#pastel-powerline) + +# Tokyo Night Preset + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) + +### 先決要求 + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal + +### 設定 + +```sh +starship preset tokyo-night > ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/tokyo-night.toml) + +<<< @/.vuepress/public/presets/toml/tokyo-night.toml