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

This commit is contained in:
Matan Kushner 2022-08-14 15:31:27 -04:00 committed by GitHub
parent 37f350a476
commit 47f22c82c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
149 changed files with 3427 additions and 764 deletions

View File

@ -8,6 +8,52 @@ The configurations in this section are subject to change in future releases of S
:::
## TransientPrompt in PowerShell
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`.
By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do
```powershell
function Invoke-Starship-TransientFunction {
&starship module character
}
Invoke-Expression (&starship init powershell)
Enable-TransientPrompt
```
## TransientPrompt and TransientRightPrompt in Cmd
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <value>` where \<value\> can be one of:
- `always`: always replace the previous prompt
- `same_dir`: replace the previous prompt only if the working directory is same
- `off`: do not replace the prompt (i.e. turn off transience)
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
```lua
function starship_transient_prompt_func(prompt)
return io.popen("starship module character"
.." --keymap="..rl.getvariable('keymap')
):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
```lua
function starship_transient_rprompt_func(prompt)
return io.popen("starship module time"):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
## Custom pre-prompt and pre-execution Commands in Cmd
Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements:
@ -185,6 +231,9 @@ Style strings are a list of words, separated by whitespace. The words are not ca
- `underline`
- `dimmed`
- `inverted`
- `blink`
- `hidden`
- `strikethrough`
- `bg:<color>`
- `fg:<color>`
- `<color>`
@ -201,3 +250,9 @@ A color specifier can be one of the following:
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
If multiple colors are specified for foreground/background, the last one in the string will take priority.
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
- Many terminals disable support for `blink` by default
- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564).
- `strikethrough` is not supported by the default macOS Terminal.app

View File

@ -144,6 +144,18 @@ format = '''
\$'''
```
### Negative matching
Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched.
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"]
```
## Prompt
This is the list of prompt-wide configuration options.
@ -201,11 +213,9 @@ $git_status\
$hg_branch\
$docker_context\
$package\
$buf\
$c\
$cmake\
$cobol\
$container\
$daml\
$dart\
$deno\
@ -228,6 +238,7 @@ $php\
$pulumi\
$purescript\
$python\
$raku\
$rlang\
$red\
$ruby\
@ -238,6 +249,7 @@ $terraform\
$vlang\
$vagrant\
$zig\
$buf\
$nix_shell\
$conda\
$spack\
@ -256,6 +268,7 @@ $jobs\
$battery\
$time\
$status\
$container\
$shell\
$character"""
```
@ -479,6 +492,45 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
symbol = "🦬 "
```
## Bun
The `bun` module shows the currently installed version of the [bun](https://bun.sh) JavaScript runtime. By default the module will be shown if any of the following conditions are met:
- The current directory contains a `bun.lockb` file
- The current directory contains a `bunfig.toml` 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 Node.js. |
| `detect_extensions` | `[]` | Which extensions 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. |
| `disabled` | `false` | Disables the `bun` module. |
### Variables
| Variable | مثال | الوصف |
| --------- | -------- | ------------------------------------ |
| 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
### مثال
```toml
# ~/.config/starship.toml
[bun]
format = "via [🍔 $version](bold green) "
```
## C
The `c` module shows some information about your C compiler. By default the module will be shown if the current directory contains a `.c` or `.h` file.
@ -1986,18 +2038,23 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
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.
:::
### Options
| Option | الافتراضي | الوصف |
| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
| `style` | `"cyan bold"` | The style for the module. |
| `context_aliases` | | Table of context aliases to display. |
| `user_aliases` | | Table of user aliases to display. |
| `disabled` | `true` | Disables the `kubernetes` module. |
| Option | الافتراضي | الوصف |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
| `style` | `"cyan bold"` | The style for the module. |
| `context_aliases` | | Table of context aliases to display. |
| `user_aliases` | | Table of user aliases to display. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `disabled` | `true` | Disables the `kubernetes` module. |
### Variables
@ -2029,6 +2086,16 @@ disabled = false
"root/.*" = "root"
```
Only show the module in directories that contain a `k8s` file.
```toml
# ~/.config/starship.toml
[kubernetes]
disabled = false
detect_files = ['k8s']
```
#### Regex Matching
Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
@ -2579,7 +2646,7 @@ By default the Pulumi version is not shown, since it takes an order of magnitude
By default the module will be shown if any of the following conditions are met:
- The current directory contains either `Pulumi.yaml` or `Pulumi.yml`
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml`
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` unless `search_upwards` is set to `false`
### Options
@ -2589,6 +2656,7 @@ By default the module will be shown if any of the following conditions are met:
| `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
@ -3158,22 +3226,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options
| Option | الافتراضي | الوصف |
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | The style for the module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | `|` | |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `disabled` | `true` | Disables the `status` module. |
| Option | الافتراضي | الوصف |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | The style for the module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Variables

View File

@ -8,6 +8,10 @@ This preset changes the format of all the built-in modules to show their segment
### Configuration
```sh
starship preset bracketed-segments > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/bracketed-segments.toml)
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml

View File

@ -12,6 +12,10 @@ This preset changes the symbols for each module to use Nerd Font symbols.
### Configuration
```sh
starship preset nerd-font-symbols > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/nerd-font-symbols.toml)
<<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml

View File

@ -8,6 +8,10 @@ This preset hides the version of language runtimes. If you work in containers or
### Configuration
```sh
starship preset no-runtime-versions > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/no-runtime-versions.toml)
<<< @/.vuepress/public/presets/toml/no-runtime-versions.toml

View File

@ -12,6 +12,10 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m
### Configuration
```sh
starship preset pastel-powerline > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/pastel-powerline.toml)
<<< @/.vuepress/public/presets/toml/pastel-powerline.toml

View File

@ -8,6 +8,10 @@ This preset changes the symbols for each module into plain text. Great if you do
### Configuration
```sh
starship preset plain-text-symbols > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/plain-text-symbols.toml)
<<< @/.vuepress/public/presets/toml/plain-text-symbols.toml

View File

@ -8,6 +8,10 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso
### Configuration
```sh
starship preset pure-preset > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/pure-preset.toml)
<<< @/.vuepress/public/presets/toml/pure-preset.toml

View File

@ -8,6 +8,52 @@
:::
## TransientPrompt in PowerShell
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`.
By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do
```powershell
function Invoke-Starship-TransientFunction {
&starship module character
}
Invoke-Expression (&starship init powershell)
Enable-TransientPrompt
```
## TransientPrompt and TransientRightPrompt in Cmd
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <value>` where \<value\> can be one of:
- `always`: always replace the previous prompt
- `same_dir`: replace the previous prompt only if the working directory is same
- `off`: do not replace the prompt (i.e. turn off transience)
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
```lua
function starship_transient_prompt_func(prompt)
return io.popen("starship module character"
.." --keymap="..rl.getvariable('keymap')
):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
```lua
function starship_transient_rprompt_func(prompt)
return io.popen("starship module time"):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
## Custom pre-prompt and pre-execution Commands in Cmd
Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements:
@ -185,6 +231,9 @@ Style strings are a list of words, separated by whitespace. The words are not ca
- `بنهێڵ`
- `کاڵ کراو`
- `پێچەوانە کراو`
- `blink`
- `hidden`
- `strikethrough`
- `bg:<color>`
- `fg:<color>`
- `<color>`
@ -201,3 +250,9 @@ A color specifier can be one of the following:
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
If multiple colors are specified for foreground/background, the last one in the string will take priority.
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
- Many terminals disable support for `blink` by default
- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564).
- `strikethrough` is not supported by the default macOS Terminal.app

View File

@ -144,6 +144,18 @@ format = '''
\$'''
```
### Negative matching
Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched.
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"]
```
## Prompt
This is the list of prompt-wide configuration options.
@ -201,11 +213,9 @@ $git_status\
$hg_branch\
$docker_context\
$package\
$buf\
$c\
$cmake\
$cobol\
$container\
$daml\
$dart\
$deno\
@ -228,6 +238,7 @@ $php\
$pulumi\
$purescript\
$python\
$raku\
$rlang\
$red\
$ruby\
@ -238,6 +249,7 @@ $terraform\
$vlang\
$vagrant\
$zig\
$buf\
$nix_shell\
$conda\
$spack\
@ -256,6 +268,7 @@ $jobs\
$battery\
$time\
$status\
$container\
$shell\
$character"""
```
@ -479,6 +492,45 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
symbol = "🦬 "
```
## Bun
The `bun` module shows the currently installed version of the [bun](https://bun.sh) JavaScript runtime. By default the module will be shown if any of the following conditions are met:
- The current directory contains a `bun.lockb` file
- The current directory contains a `bunfig.toml` 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 Node.js. |
| `detect_extensions` | `[]` | Which extensions 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. |
| `disabled` | `false` | Disables the `bun` module. |
### Variables
| گۆڕاو | نموونە | 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
### نموونە
```toml
# ~/.config/starship.toml
[bun]
format = "via [🍔 $version](bold green) "
```
## C
The `c` module shows some information about your C compiler. By default the module will be shown if the current directory contains a `.c` or `.h` file.
@ -1986,18 +2038,23 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
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.
:::
### Options
| Option | Default | Description |
| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
| `style` | `"cyan bold"` | The style for the module. |
| `context_aliases` | | Table of context aliases to display. |
| `user_aliases` | | Table of user aliases to display. |
| `disabled` | `true` | Disables the `kubernetes` module. |
| Option | Default | Description |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
| `style` | `"cyan bold"` | The style for the module. |
| `context_aliases` | | Table of context aliases to display. |
| `user_aliases` | | Table of user aliases to display. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `disabled` | `true` | Disables the `kubernetes` module. |
### Variables
@ -2029,6 +2086,16 @@ disabled = false
"root/.*" = "root"
```
Only show the module in directories that contain a `k8s` file.
```toml
# ~/.config/starship.toml
[kubernetes]
disabled = false
detect_files = ['k8s']
```
#### Regex Matching
Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
@ -2579,7 +2646,7 @@ By default the Pulumi version is not shown, since it takes an order of magnitude
By default the module will be shown if any of the following conditions are met:
- The current directory contains either `Pulumi.yaml` or `Pulumi.yml`
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml`
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` unless `search_upwards` is set to `false`
### Options
@ -2589,6 +2656,7 @@ By default the module will be shown if any of the following conditions are met:
| `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
@ -3158,22 +3226,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` | `|` | |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `disabled` | `true` | Disables the `status` module. |
| Option | Default | Description |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | The style for the module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Variables

View File

@ -8,6 +8,10 @@ This preset changes the format of all the built-in modules to show their segment
### ڕێکخستن
```sh
starship preset bracketed-segments > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/bracketed-segments.toml)
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml

View File

@ -12,6 +12,10 @@ This preset changes the symbols for each module to use Nerd Font symbols.
### ڕێکخستن
```sh
starship preset nerd-font-symbols > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/nerd-font-symbols.toml)
<<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml

View File

@ -8,6 +8,10 @@
### ڕێکخستن
```sh
starship preset no-runtime-versions > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/no-runtime-versions.toml)
<<< @/.vuepress/public/presets/toml/no-runtime-versions.toml

View File

@ -12,6 +12,10 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m
### ڕێکخستن
```sh
starship preset pastel-powerline > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/pastel-powerline.toml)
<<< @/.vuepress/public/presets/toml/pastel-powerline.toml

View File

@ -8,6 +8,10 @@ This preset changes the symbols for each module into plain text. Great if you do
### ڕێکخستن
```sh
starship preset plain-text-symbols > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/plain-text-symbols.toml)
<<< @/.vuepress/public/presets/toml/plain-text-symbols.toml

View File

@ -8,6 +8,10 @@
### ڕێکخستن
```sh
starship preset pure-preset > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/pure-preset.toml)
<<< @/.vuepress/public/presets/toml/pure-preset.toml

View File

@ -8,6 +8,52 @@ Die hier beschriebenen Konfigurationen werden sich mit kommenden Updates von Sta
:::
## TransientPrompt in PowerShell
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`.
By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do
```powershell
function Invoke-Starship-TransientFunction {
&starship module character
}
Invoke-Expression (&starship init powershell)
Enable-TransientPrompt
```
## TransientPrompt and TransientRightPrompt in Cmd
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <value>` where \<value\> can be one of:
- `always`: always replace the previous prompt
- `same_dir`: replace the previous prompt only if the working directory is same
- `off`: do not replace the prompt (i.e. turn off transience)
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
```lua
function starship_transient_prompt_func(prompt)
return io.popen("starship module character"
.." --keymap="..rl.getvariable('keymap')
):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
```lua
function starship_transient_rprompt_func(prompt)
return io.popen("starship module time"):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
## Custom pre-prompt and pre-execution Commands in Cmd
Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements:
@ -185,6 +231,9 @@ Style-String sind Wortlisten, getrennt durch Leerzeichen. Die Wörter haben kein
- `underline`
- `dimmed`
- `invertiert`
- `blink`
- `hidden`
- `strikethrough`
- `bg:<color>`
- `fg:<color>`
- `<color>`
@ -201,3 +250,9 @@ Eine Farbspezifikation kann wie folgt aussehen:
- Eine Zahl zwischen 0-255. Dies ergibt einen [8-bit ANSI-Farbcode](https://i.stack.imgur.com/KTSQa.png).
Wenn mehrere Farben für Vordergrund oder Hintergrund angegeben werden, hat die letzte Farbe der Zeichenkette Priorität.
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
- Many terminals disable support for `blink` by default
- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564).
- `strikethrough` is not supported by the default macOS Terminal.app

View File

@ -144,6 +144,18 @@ format = '''
\$'''
```
### Negative matching
Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched.
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"]
```
## Prompt
Dies ist eine Liste mit Prompt-weiten Konfigurationsoptionen.
@ -201,11 +213,9 @@ $git_status\
$hg_branch\
$docker_context\
$package\
$buf\
$c\
$cmake\
$cobol\
$container\
$daml\
$dart\
$deno\
@ -228,6 +238,7 @@ $php\
$pulumi\
$purescript\
$python\
$raku\
$rlang\
$red\
$ruby\
@ -238,6 +249,7 @@ $terraform\
$vlang\
$vagrant\
$zig\
$buf\
$nix_shell\
$conda\
$spack\
@ -256,6 +268,7 @@ $jobs\
$battery\
$time\
$status\
$container\
$shell\
$character"""
```
@ -479,6 +492,45 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
symbol = "🦬 "
```
## Bun
The `bun` module shows the currently installed version of the [bun](https://bun.sh) JavaScript runtime. By default the module will be shown if any of the following conditions are met:
- Das aktuelle Verzeichnis enthält eine `bun.lockb`-Datei
- Das aktuelle Verzeichnis enthält eine `bunfig.toml`-Datei
### 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 Node.js. |
| `detect_extensions` | `[]` | Which extensions 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. |
| `disabled` | `false` | Disables the `bun` module. |
### Variables
| Variable | Beispiel | Beschreibung |
| --------- | -------- | ------------------------------------- |
| version | `v0.1.4` | The version of `bun` |
| 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
[bun]
format = "via [🍔 $version](bold green) "
```
## C
The `c` module shows some information about your C compiler. By default the module will be shown if the current directory contains a `.c` or `.h` file.
@ -811,7 +863,7 @@ format = "via [✨ $version](bold blue) "
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. By default the module will be shown if any of the following conditions are met:
- The current directory contains a `daml.yaml` file
- Das aktuelle Verzeichnis enthält eine `daml.yaml`-Datei
### Optionen
@ -851,7 +903,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d
- The current directory contains a file with `.dart` extension
- The current directory contains a `.dart_tool` directory
- The current directory contains a `pubspec.yaml`, `pubspec.yml` or `pubspec.lock` file
- Das aktuelle Verzeichnis enthält `pubspec.yaml`, `pubspec.yml` oder `pubspec.lock`
### Optionen
@ -1007,7 +1059,7 @@ The `docker_context` module shows the currently active [Docker context](https://
### Optionen
| Option | Standartwert | Beschreibung |
| Option | Standardwert | Beschreibung |
| ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `format` | `"via [$symbol$context]($style) "` | Das Format für das Modul. |
| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. |
@ -1986,18 +2038,23 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
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.
:::
### Optionen
| Option | Standardwert | Beschreibung |
| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | Das Format für das Modul. |
| `style` | `"cyan bold"` | Stil für dieses Modul. |
| `context_aliases` | | Table of context aliases to display. |
| `user_aliases` | | Table of user aliases to display. |
| `disabled` | `true` | Deaktiviert das `kubernetes`-Modul. |
| Option | Standardwert | Beschreibung |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | Das Format für das Modul. |
| `style` | `"cyan bold"` | Stil für dieses Modul. |
| `context_aliases` | | Table of context aliases to display. |
| `user_aliases` | | Table of user aliases to display. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `disabled` | `true` | Deaktiviert das `kubernetes`-Modul. |
### Variables
@ -2029,6 +2086,16 @@ disabled = false
"root/.*" = "root"
```
Only show the module in directories that contain a `k8s` file.
```toml
# ~/.config/starship.toml
[kubernetes]
disabled = false
detect_files = ['k8s']
```
#### Regex Matching
Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
@ -2579,7 +2646,7 @@ By default the Pulumi version is not shown, since it takes an order of magnitude
By default the module will be shown if any of the following conditions are met:
- The current directory contains either `Pulumi.yaml` or `Pulumi.yml`
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml`
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` unless `search_upwards` is set to `false`
### Optionen
@ -2589,6 +2656,7 @@ By default the module will be shown if any of the following conditions are met:
| `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. |
### Variables
@ -3158,22 +3226,23 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis
### Optionen
| Option | Standardwert | Beschreibung |
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | Stil für dieses Modul. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | `|` | |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `disabled` | `true` | Disables the `status` module. |
| Option | Standardwert | Beschreibung |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | Stil für dieses Modul. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Variables

View File

@ -8,6 +8,10 @@ This preset changes the format of all the built-in modules to show their segment
### Konfiguration
```sh
starship preset bracketed-segments > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/bracketed-segments.toml)
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml

View File

@ -12,6 +12,10 @@ This preset changes the symbols for each module to use Nerd Font symbols.
### Konfiguration
```sh
starship preset nerd-font-symbols > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/nerd-font-symbols.toml)
<<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml

View File

@ -8,6 +8,10 @@ This preset hides the version of language runtimes. If you work in containers or
### Konfiguration
```sh
starship preset no-runtime-versions > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/no-runtime-versions.toml)
<<< @/.vuepress/public/presets/toml/no-runtime-versions.toml

View File

@ -12,6 +12,10 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m
### Konfiguration
```sh
starship preset pastel-powerline > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/pastel-powerline.toml)
<<< @/.vuepress/public/presets/toml/pastel-powerline.toml

View File

@ -8,6 +8,10 @@ This preset changes the symbols for each module into plain text. Great if you do
### Konfiguration
```sh
starship preset plain-text-symbols > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/plain-text-symbols.toml)
<<< @/.vuepress/public/presets/toml/plain-text-symbols.toml

View File

@ -8,6 +8,10 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso
### Konfiguration
```sh
starship preset pure-preset > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/pure-preset.toml)
<<< @/.vuepress/public/presets/toml/pure-preset.toml

View File

@ -8,6 +8,52 @@ Las configuraciones de esta sección están sujetos a cambios en futuras version
:::
## TransientPrompt in PowerShell
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`.
By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do
```powershell
function Invoke-Starship-TransientFunction {
&starship module character
}
Invoke-Expression (&starship init powershell)
Enable-TransientPrompt
```
## TransientPrompt and TransientRightPrompt in Cmd
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <value>` where \<value\> can be one of:
- `always`: always replace the previous prompt
- `same_dir`: replace the previous prompt only if the working directory is same
- `off`: do not replace the prompt (i.e. turn off transience)
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
```lua
function starship_transient_prompt_func(prompt)
return io.popen("starship module character"
.." --keymap="..rl.getvariable('keymap')
):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
```lua
function starship_transient_rprompt_func(prompt)
return io.popen("starship module time"):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
## Comandos pre-prompt y pre-ejecución personalizados en Cmd
Clink proporciona una API extremadamente flexible para ejecutar comandos pre-prompt y pre-ejecución en la shell de Cmd. Es bastante sencillo de usar con Starship. Haz los siguientes cambios a tu archivo `starship.lua` según tus requisitos:
@ -185,6 +231,9 @@ Las cadenas de estilo son una lista de palabras, separadas por espacios en blanc
- `underline`
- `dimmed`
- `inverted`
- `parpadear`
- `oculto`
- `tachado`
- `bg:<color>`
- `fg:<color>`
- `<color>`
@ -201,3 +250,9 @@ Un especificador de color puede ser uno de los siguientes:
- Un número entre 0-255. Esto especifica un [Código de color ANSI de 8-bits](https://i.stack.imgur.com/KTSQa.png).
Si se especifican varios colores para el primer plano/fondo, el último en la cadena tendrá prioridad.
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
- Many terminals disable support for `blink` by default
- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564).
- `strikethrough` is not supported by the default macOS Terminal.app

View File

@ -144,6 +144,18 @@ format = '''
\$'''
```
### Coincidencia negativa
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"]
```
## Prompt
Esta es la lista de opciones de configuración.
@ -176,7 +188,7 @@ scan_timeout = 10
add_newline = false
```
### Formato por Defecto del Prompt
### Formato predeterminado 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:
@ -201,11 +213,9 @@ $git_status\
$hg_branch\
$docker_context\
$package\
$buf\
$c\
$cmake\
$cobol\
$container\
$daml\
$dart\
$deno\
@ -228,6 +238,7 @@ $php\
$pulumi\
$purescript\
$python\
$raku\
$rlang\
$red\
$ruby\
@ -238,6 +249,7 @@ $terraform\
$vlang\
$vagrant\
$zig\
$buf\
$nix_shell\
$conda\
$spack\
@ -256,6 +268,7 @@ $jobs\
$battery\
$time\
$status\
$container\
$shell\
$character"""
```
@ -479,6 +492,45 @@ El módulo `buf` muestra la versión instalada de [Buf](https://buf.build). Por
symbol = "🦬 "
```
## Bun
The `bun` module shows the currently installed version of the [bun](https://bun.sh) JavaScript runtime. Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones:
- El directorio actual contiene un fichero `bun.lockb`
- El directorio actual contiene un fichero `bunfig.toml`
### 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` | `"🍞 "` | Una cadena de formato que representa el símbolo de Node.js. |
| `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_folders` | `[]` | Qué carpetas deberían activar este módulo. |
| `style` | `"bold red"` | El estilo del módulo. |
| `disabled` | `false` | Disables the `bun` module. |
### Variables
| Variable | Ejemplo | Descripción |
| --------- | -------- | -------------------------------------- |
| version | `v0.1.4` | The version of `bun` |
| 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
[bun]
format = "via [🍔 $version](bold green) "
```
## C
El módulo `c` muestra información sobre su compilador de C. Por defecto el módulo se mostrará si el directorio actual contiene un archivo `.c` o `.h`.
@ -811,11 +863,11 @@ format = "via [✨ $version](bold blue) "
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. Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones:
- The current directory contains a `daml.yaml` file
- El directorio actual contiene un fichero `daml.yaml`
### Opciones
| Opción | Por defecto | Descripción |
| Opción | Predeterminado | Descripción |
| ------------------- | ---------------------------------- | --------------------------------------------------------------------------------------- |
| `format` | `via [$symbol($version )]($style)` | El formato del módulo. |
| `version_format` | `v${raw}` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` |
@ -864,7 +916,7 @@ El módulo `dart` muestra la versión instalada de [Dart](https://dart.dev/). Po
| `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`. |
| `disabled` | `false` | Desactiva el módulo `dart`. |
### Variables
@ -941,7 +993,7 @@ Por ejemplo, dado `~/Dev/Nix/nixpkgs/pkgs` donde `nixpkgs` es la raíz del repos
| `read_only` | `"🔒"` | El símbolo que indica si el directorio actual es de sólo lectura. |
| `read_only_style` | `"red"` | El estilo para el símbolo de sólo lectura. |
| `truncation_symbol` | `""` | El símbolo a prefijar a las rutas truncadas. ej: "…/" |
| `repo_root_style` | `Ninguno` | El estilo para la raíz del repositorio de git. El valor por defecto es equivalente al `style`. |
| `repo_root_style` | `None` | 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) |
@ -949,9 +1001,9 @@ Por ejemplo, dado `~/Dev/Nix/nixpkgs/pkgs` donde `nixpkgs` es la raíz del repos
<details>
<summary>Este módulo tiene algunas opciones avanzadas de configuración que controlan cómo se muestra el directorio.</summary>
| Opción avanzada | Predeterminado | Descripción |
| Opciones avanzadas | Predeterminado | Descripción |
| --------------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sustituciones` | | Una tabla de sustituciones que se deben hacer a la ruta. |
| `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. |
@ -985,7 +1037,7 @@ Consideremos la ruta `/path/to/home/git_repo/src/lib`
| ------------------ | --------------------- | --------------------------------------------------- |
| 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 |
| 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 |
@ -1001,7 +1053,7 @@ truncation_length = 8
truncation_symbol = "…/"
```
## Contexto de Docker
## Docker context
El módulo `docker_context` muestra el [contexto de Docker](https://docs.docker.com/engine/context/working-with-contexts/) actualmente activo si no está definido en `default` o si las variables de entorno `DOCKER_MACHINE_NAME`, `DOCKER_HOST` o `DOCKER_CONTEXT` están definidas (como se entiende para sobrescribir el contexto en uso).
@ -1145,7 +1197,7 @@ El módulo `elm` muestra la versión instalada de [Elm](https://elm-lang.org/).
### Opciones
| Opción | Por defecto | Descripción |
| Opción | Predeterminado | Descripción |
| ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. |
| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` |
@ -1199,13 +1251,13 @@ 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. |
| `predeterminado` | | 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` | Desactiva el módulo `env_var`. |
| 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`. |
### Variables
@ -1278,7 +1330,7 @@ El módulo `erlang` muestra la versión instalada de [Erlang/OTP](https://erlang
format = "via [e $version](bold red) "
```
## Rellenar
## Llenar
El módulo `fill` llena cualquier espacio extra en la línea con un símbolo. Si múltiples módulos `fill` están presentes en una línea, dividirán el espacio equitativamente entre ellos. Esto es útil para alinear otros módulos.
@ -1320,19 +1372,19 @@ El módulo `gcloud` muestra la configuración actual para el CLI de [`gcloud`](h
| `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`. |
| `disabled` | `false` | Desactiva el módulo `gcloud`. |
### Variables
| Variable | Ejemplo | Descripción |
| --------- | ---------------- | ----------------------------------------------------------------------------- |
| region | `us-central1` | La actual región GCP |
| cuenta | `foo` | El perfil actual de GCP |
| domain | `example.com` | El dominio actual del perfil GCP |
| proyecto | | El proyecto GCP actual |
| activo | `predeterminado` | El nombre de configuración activo escrito en `~/.config/gcloud/active_config` |
| symbol | | Refleja el valor de la opción `symbol` |
| style\* | | Refleja el valor de la opción `style` |
| Variable | Ejemplo | Descripción |
| --------- | ------------- | ----------------------------------------------------------------------------- |
| region | `us-central1` | La región GCP actual |
| account | `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` |
| 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
@ -1380,7 +1432,7 @@ format = 'on [$symbol$account(@$domain)(\($project\))]($style) '
very-long-project-name = "vlpn"
```
## Rama Git
## Git Branch
El módulo `git_branch` muestra la rama activa del repositorio en tu directorio actual.
@ -1395,7 +1447,7 @@ El módulo `git_branch` muestra la rama activa del repositorio en tu directorio
| `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 a evitar ser visualizados. Útil para "master" o "main". |
| `ignore_branches` | `[]` | Una lista de nombres para evitar mostrar. Útil para "master" o "main". |
| `disabled` | `false` | Desactiva el módulo `git_branch`. |
### Variables
@ -1403,7 +1455,7 @@ El módulo `git_branch` muestra la rama activa del repositorio en tu directorio
| 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 | `origen` | El nombre remoto. |
| 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` |
@ -1428,7 +1480,7 @@ El módulo `git_commit` muestra el hash de la confirmación actual y también la
### Opciones
| Opción | Por defecto | Descripción |
| Opción | Predeterminado | Descripción |
| -------------------- | ---------------------------------- | -------------------------------------------------------------------------------------- |
| `commit_hash_length` | `7` | La longitud del hash del commit de git mostrado. |
| `format` | `"[\\($hash$tag\\)]($style) "` | El formato del módulo. |
@ -1436,7 +1488,7 @@ El módulo `git_commit` muestra el hash de la confirmación actual y también la
| `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_symbol` | `" 🏷 "` | Símbolo de etiqueta prefijando la información mostrada |
| `disabled` | `false` | Deshabilita el módulo `git_commit`. |
| `disabled` | `false` | Desactiva el módulo `git_commit`. |
### Variables
@ -1466,7 +1518,7 @@ El módulo `git_state` se mostrará en directorios que son parte de un repositor
| Opción | Predeterminado | Descripción |
| -------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `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. |
| `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. |
@ -1474,13 +1526,13 @@ El módulo `git_state` se mostrará en directorios que son parte de un repositor
| `am_or_rebase` | `"AM/REBASE"` | Una cadena de formato que se muestra cuando un ambiguo `apply-builbox` o `rebase` está en progreso. |
| `style` | `"bold yellow"` | El estilo del módulo. |
| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | El formato del módulo. |
| `disabled` | `false` | Deshabilita el módulo `git_state`. |
| `disabled` | `false` | Desactiva el módulo `git_state`. |
### Variables
| Variable | Ejemplo | Descripción |
| ---------------- | ---------- | ------------------------------------- |
| state | `REBASING` | The current state of the repo |
| state | `REBASING` | El estado actual del repositorio |
| progress_current | `1` | El progreso de la operación actual |
| progress_total | `2` | El progreso total de la operación |
| style\* | | Refleja el valor de la opción `style` |
@ -1521,8 +1573,8 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable
| Variable | Ejemplo | Descripción |
| ----------------- | ------- | --------------------------------------------- |
| añadido | `1` | El número actual de líneas añadidas |
| borrado | `2` | El número actual de líneas eliminadas |
| added | `1` | El número actual de líneas añadidas |
| deleted | `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` |
@ -1552,18 +1604,18 @@ El módulo Git Status es muy lento en los directorios de Windows (por ejemplo ba
| Opción | Predeterminado | Descripción |
| ------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | El formato predeterminado para `git_status` |
| `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` |
| `sin seguimiento` | `"?"` | El formato de `untracked` |
| `untracked` | `"?"` | El formato de `untracked` |
| `stashed` | `"$"` | El formato de `stashed` |
| `modificado` | `"!"` | El formato de `modified` |
| `modified` | `"!"` | El formato de `modified` |
| `staged` | `"+"` | El formato de `staged` |
| `renamed` | `"»"` | El formato de `renamed` |
| `eliminado` | `"✘"` | El formato de `deleted` |
| `deleted` | `"✘"` | 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`. |
@ -1573,18 +1625,18 @@ El módulo Git Status es muy lento en los directorios de Windows (por ejemplo ba
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. |
| `sin seguimiento` | Muestra `untracked` cuando hay archivos sin rastrear en el directorio de trabajo. |
| `stashed` | Muestra `stashed` cuando existe un "stash" 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 "stash". |
| `renamed` | Muestra `renamed` cuando un archivo renombrado ha sido añadido al área de "stash". |
| `borrado` | 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. |
| `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` |
*: Esta variable sólo puede ser usada como parte de una cadena de estilo
@ -1737,7 +1789,7 @@ El módulo `helm` muestra la versión instalada de [Helm](https://helm.sh/). Por
| `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` | Deshabilita el módulo `helm`. |
| `disabled` | `false` | Desactiva el módulo `helm`. |
### Variables
@ -1764,22 +1816,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$hostname]($style) in "` | El formato del módulo. |
| `style` | `"bold dimmed green"` | El estilo del módulo. |
| `disabled` | `false` | Desactiva el módulo `hostname`. |
| Opción | Por defecto | Descripción |
| ------------ | -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ssh_only` | `true` | 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`. |
### Variables
| 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 |
| 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 |
*: Esta variable sólo puede ser usada como parte de una cadena de estilo
@ -1813,7 +1865,7 @@ El módulo `java` muestra la versión instalada de [Java](https://www.oracle.com
| `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` | Deshabilita el módulo `java`. |
| `disabled` | `false` | Desactiva el módulo `java`. |
### Variables
@ -1840,7 +1892,7 @@ El módulo `jobs` muestra el número actual de tareas en ejecución. El módulo
La funcionalidad por defecto es:
- 0 tareas -> No se muestra nada.
- 0 tareas -> Nada se muestra.
- 1 tarea -> `symbol` se muestra.
- 2 tareas o más -> `symbol` + `number` son mostrados.
@ -1858,7 +1910,7 @@ La opción `threshold` está obsoleta, pero si deseas usarla, el módulo mostrar
### Opciones
| Opción | Por defecto | Descripción |
| Opción | Predeterminado | 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`. |
@ -1874,7 +1926,7 @@ La opción `threshold` está obsoleta, pero si deseas usarla, el módulo mostrar
| Variable | Ejemplo | Descripción |
| --------- | ------- | -------------------------------------- |
| número | `1` | El número de tareas |
| number | `1` | El número de tareas |
| symbol | | Refleja el valor de la opción `symbol` |
| style\* | | Refleja el valor de la opción `style` |
@ -1910,7 +1962,7 @@ El módulo `julia` muestra la versión instalada de [Julia](https://julialang.or
| `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` | Deshabilita el módulo `julia`. |
| `disabled` | `false` | Desactiva el módulo `julia`. |
### Variables
@ -1986,26 +2038,31 @@ Muestra el nombre actual del [contexto de Kubernetes](https://kubernetes.io/docs
Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `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.
:::
### Opciones
| Opción | Predeterminado | Descripción |
| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------------- |
| `symbol` | `"☸ "` | Una cadena de formato que representa el símbolo mostrado antes del Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | El formato del módulo. |
| `style` | `"cyan bold"` | El estilo del módulo. |
| `context_aliases` | | Tabla de alias de contexto a mostrar. |
| `user_aliases` | | Table of user aliases to display. |
| `disabled` | `true` | Desactiva el módulo `kubernetes`. |
| Opción | Predeterminado | Descripción |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------------- |
| `symbol` | `"☸ "` | Una cadena de formato que representa el símbolo mostrado antes del Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | El formato del módulo. |
| `style` | `"cyan bold"` | El estilo del módulo. |
| `context_aliases` | | Tabla de alias de contexto a mostrar. |
| `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. |
| `disabled` | `true` | Desactiva el módulo `kubernetes`. |
### Variables
| Variable | Ejemplo | Descripción |
| --------- | -------------------- | ----------------------------------------------------------- |
| contexto | `starship-context` | El nombre del contexto actual de kubernetes |
| context | `starship-context` | El nombre del contexto actual de kubernetes |
| namespace | `starship-namespace` | Si se establece, el espacio de nombres actual de kubernetes |
| usuario | `starship-user` | Si se establece, el espacio de nombres actual de kubernetes |
| user | `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` |
@ -2029,6 +2086,16 @@ disabled = false
"root/.*" = "root"
```
Only show the module in directories that contain a `k8s` file.
```toml
# ~/.config/starship.toml
[kubernetes]
disabled = false
detect_files = ['k8s']
```
#### Busqueda por Regex
Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
@ -2069,7 +2136,7 @@ El módulo `line_break` separa el indicador en dos líneas.
disabled = true
```
## IP local
## Local IP
El módulo `localip` muestra la dirección IPv4 de la interfaz de red principal.
@ -2143,7 +2210,7 @@ El módulo `lua` muestra la versión instalada de [Lua](http://www.lua.org/). Po
format = "via [🌕 $version](bold blue) "
```
## Uso de la memoria
## Memoria utilizada
El módulo `memory_usage` muestra la memoria del sistema actual y el uso de memoria de intercambio.
@ -2190,7 +2257,7 @@ symbol = " "
style = "bold dimmed green"
```
## Rama Mercurial
## Mercurial Branch
El módulo `hg_branch` muestra la rama activa del repositorio en su directorio actual.
@ -2209,7 +2276,7 @@ El módulo `hg_branch` muestra la rama activa del repositorio en su directorio a
| Variable | Ejemplo | Descripción |
| --------- | -------- | -------------------------------------- |
| rama | `master` | La rama mercurial activa |
| branch | `master` | La rama de mercurial activa |
| symbol | | Refleja el valor de la opción `symbol` |
| style\* | | Refleja el valor de la opción `style` |
@ -2414,8 +2481,8 @@ El módulo `openstack` muestra la nube OpenStack actual y el proyecto. El módul
| Variable | Ejemplo | Descripción |
| --------- | ------- | -------------------------------------- |
| nube | `corp` | La nube OpenStack actual |
| proyecto | `dev` | El actual proyecto OpenStack |
| cloud | `corp` | La nube OpenStack actual |
| project | `dev` | El proyecto OpenStack actual |
| symbol | | Refleja el valor de la opción `symbol` |
| style\* | | Refleja el valor de la opción `style` |
@ -2579,7 +2646,7 @@ Por defecto la versión de Pulumi no se muestra, ya que toma un orden de magnitu
Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones:
- El directorio actual contiene `Pulumi.yaml` o `Pulumi.yml`
- Un directorio padre contiene `Pulumi.yaml` o `Pulumi.yml`
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` unless `search_upwards` is set to `false`
### Opciones
@ -2589,6 +2656,7 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes
| `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`. |
### Variables
@ -2795,10 +2863,10 @@ format = "with [📐 $version](blue bold) "
## Raku
The `raku` module shows the currently installed version of [Raku](https://www.raku.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones:
El módulo `raku` muestra la versión instalada de [Raku](https://www.raku.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones:
- The current directory contains a `META6.json` file
- The current directory contains a `.p6`, `.pm6`, `.raku`, `.rakumod` or `.pod6`
- El directorio actual contiene un archivo `META6.json`
- El directorio actual contiene un `.p6`, `.pm6`, `.raku`, `.rakumod` o `.pod6`
### Opciones
@ -2806,21 +2874,21 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra
| ------------------- | ------------------------------------------------ | --------------------------------------------------------------------------------------- |
| `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` | `"🦋 "` | The symbol used before displaying the version of Raku |
| `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. |
| `disabled` | `false` | Disables the `raku` module. |
| `disabled` | `false` | Deshabilita el módulo `raku`. |
### Variables
| Variable | Ejemplo | Descripción |
| ---------- | ------- | -------------------------------------- |
| version | `v6.d` | The version of `raku` |
| vm_version | `moar` | The version of VM `raku` is built on |
| symbol | | Refleja el valor de la opción `symbol` |
| style\* | | Refleja el valor de la opción `style` |
| Variable | Ejemplo | Descripción |
| ---------- | ------- | ---------------------------------------------------------- |
| version | `v6.d` | La versión de `raku` |
| vm_version | `moar` | La versión de la máquina virtual `raku` está construida en |
| symbol | | Refleja el valor de la opción `symbol` |
| style\* | | Refleja el valor de la opción `style` |
### Ejemplo
@ -2828,7 +2896,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra
# ~/.config/starship.toml
[raku]
format = "via [🦪 $version]($style) "
format = "vía [🦪 $version]($style) "
```
## Red
@ -3158,22 +3226,23 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable
### Opciones
| Opción | Por defecto | Descripción |
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------ |
| `format` | `"[$symbol$status]($style) "` | El formato del módulo |
| `symbol` | `"✖"` | El símbolo mostrado en error del programa |
| `success_symbol` | `""` | El símbolo mostrado en el éxito del programa |
| `not_executable_symbol` | `"🚫"` | El símbolo mostrado cuando el archivo no es ejecutable |
| `not_found_symbol` | `"🔍"` | El símbolo mostrado cuando no se encuentra el comando |
| `sigint_symbol` | `"🧱"` | El símbolo mostrado en SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | El símbolo mostrado en cualquier señal |
| `style` | `"bold red"` | El estilo del módulo. |
| `recognize_signal_code` | `true` | Activar mapeo de señales desde el código de salida |
| `map_symbol` | `false` | Activar mapeo de símbolos desde el código de salida |
| `pipestatus` | `false` | Habilita el reporte de pipstatus |
| `pipestatus_separator` | `|` | |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | El formato del módulo cuando el comando es un pipeline |
| `disabled` | `true` | Desactiva el módulo `status`. |
| Opción | Por defecto | Descripción |
| --------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| `format` | `"[$symbol$status]($style) "` | El formato del módulo |
| `symbol` | `"✖"` | El símbolo mostrado en error del programa |
| `success_symbol` | `""` | El símbolo mostrado en el éxito del programa |
| `not_executable_symbol` | `"🚫"` | El símbolo mostrado cuando el archivo no es ejecutable |
| `not_found_symbol` | `"🔍"` | El símbolo mostrado cuando no se encuentra el comando |
| `sigint_symbol` | `"🧱"` | El símbolo mostrado en SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | El símbolo mostrado en cualquier señal |
| `style` | `"bold red"` | El estilo del módulo. |
| `recognize_signal_code` | `true` | Activar mapeo de señales desde el código de salida |
| `map_symbol` | `false` | Activar mapeo de símbolos desde el código de salida |
| `pipestatus` | `false` | Habilita el reporte de pipstatus |
| `pipestatus_separator` | <code>&vert;</code> | El símbolo usado para separar segmentos de pipestatus |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | El formato del módulo cuando el comando es un pipeline |
| `pipestatus_segment_format` | | Cuando se especifica, reemplaza `formato` al formatear segmentos de pipestatus |
| `disabled` | `true` | Desactiva el módulo `status`. |
### Variables
@ -3324,12 +3393,12 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes
### Variables
| Variable | Ejemplo | Descripción |
| --------- | ---------------- | ----------------------------------------- |
| version | `v0.12.24` | La versión de `terraform` |
| workspace | `predeterminado` | El espacio de trabajo actual de Terraform |
| symbol | | Refleja el valor de la opción `symbol` |
| style\* | | Refleja el valor de la opción `style` |
| Variable | Ejemplo | Descripción |
| --------- | ---------- | ----------------------------------------- |
| version | `v0.12.24` | La versión de `terraform` |
| workspace | `default` | El espacio de trabajo actual de Terraform |
| symbol | | Refleja el valor de la opción `symbol` |
| style\* | | Refleja el valor de la opción `style` |
*: Esta variable sólo puede ser usada como parte de una cadena de estilo
@ -3365,7 +3434,7 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable
### Opciones
| Opción | Por defecto | Descripción |
| Opción | Predeterminado | Descripción |
| ----------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | `"at [$time]($style) "` | La cadena de formato para el módulo. |
| `use_12hr` | `false` | Habilita el formato de 12 horas |
@ -3426,10 +3495,10 @@ La conexión SSH se detecta comprobando las variables de entorno `SSH_CONNECTION
### 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. |
| `usuario` | `"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. |
| `user` | `"matchai"` | El ID de usuario conectado actualmente. |
### Ejemplo

View File

@ -251,7 +251,7 @@ Alternativamente, instale Starship usando cualquiera de los siguientes gestores
<details>
<summary>Windows</summary>
Install the latest version for your system with the MSI-installers from the [releases section](https://github.com/starship/starship/releases/latest).
Instale la última versión para su sistema con los MSI-Installers de la sección [lanzamientos](https://github.com/starship/starship/releases/latest).
Instalar Starship usando cualquiera de los siguientes gestores de paquetes:

View File

@ -8,6 +8,10 @@ Este preajuste cambia el formato de todos los módulos incorporados para mostrar
### Configuración
```sh
starship preset bracketed-segments > ~/.config/starship.toml
```
[Clic para descargar TOML](/presets/toml/bracketed-segments.toml)
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml

View File

@ -12,6 +12,10 @@ Este preajuste cambia los símbolos de cada módulo para usar símbolos Nerd Fon
### Configuración
```sh
starship preset nerd-font-symbols > ~/.config/starship.toml
```
[Clic para descargar TOML](/presets/toml/nerd-font-symbols.toml)
<<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml

View File

@ -8,6 +8,10 @@ Este preajuste oculta la versión de los tiempos de ejecución del idioma. Si tr
### Configuración
```sh
starship preset no-runtime-versions > ~/.config/starship.toml
```
[Clic para descargar TOML](/presets/toml/no-runtime-versions.toml)
<<< @/.vuepress/public/presets/toml/no-runtime-versions.toml

View File

@ -12,6 +12,10 @@ Este preajuste está inspirado en [M365Princess](https://github.com/JanDeDobbele
### Configuración
```sh
starship preset pastel-powerline > ~/.config/starship.toml
```
[Clic para descargar TOML](/presets/toml/pastel-powerline.toml)
<<< @/.vuepress/public/presets/toml/pastel-powerline.toml

View File

@ -8,6 +8,10 @@ Este preajuste cambia los símbolos a texto sin formato. Bueno si usted no tiene
### Configuración
```sh
starship preset plain-text-symbols > ~/.config/starship.toml
```
[Clic para descargar TOML](/presets/toml/plain-text-symbols.toml)
<<< @/.vuepress/public/presets/toml/plain-text-symbols.toml

View File

@ -8,6 +8,10 @@ Esta preajuste emula la apariencia y el comportamiento de [Pure](https://github.
### Configuración
```sh
starship preset pure-preset > ~/.config/starship.toml
```
[Clic para descargar TOML](/presets/toml/pure-preset.toml)
<<< @/.vuepress/public/presets/toml/pure-preset.toml

View File

@ -8,6 +8,52 @@ Les configurations dans cette section sont sujettes à modification dans les fut
:::
## TransientPrompt in PowerShell
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`.
By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do
```powershell
function Invoke-Starship-TransientFunction {
&starship module character
}
Invoke-Expression (&starship init powershell)
Enable-TransientPrompt
```
## TransientPrompt and TransientRightPrompt in Cmd
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <value>` where \<value\> can be one of:
- `always`: always replace the previous prompt
- `same_dir`: replace the previous prompt only if the working directory is same
- `off`: do not replace the prompt (i.e. turn off transience)
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
```lua
function starship_transient_prompt_func(prompt)
return io.popen("starship module character"
.." --keymap="..rl.getvariable('keymap')
):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
```lua
function starship_transient_rprompt_func(prompt)
return io.popen("starship module time"):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
## Commandes pré-invite et pré-exécution personnalisées dans Cmd
Clink fournit des APIs extrêmement flexibles pour exécuter des commandes pre-invite et pre-exec dans Cmd. Il est assez simple à utiliser avec Starship. Effectuez les modifications suivantes dans votre fichier `starship.lua`, en fonction de vos besoins:
@ -32,7 +78,7 @@ end
load(io.popen('starship init cmd'):read("*a"))()
```
## Commandes pré-invite et pré-exécution personnalisées en Bash
## Commandes pré-commande et pré-exécution personnalisées en Bash
Bash n'a pas de structure officielle préexec/précmd comme la plupart des autres shells. C'est pourquoi il est difficile de fournir des hooks entièrement personnalisables dans `bash`. Cependant, Starship vous permet dans une certaine mesure d'insérer vos propres fonctions dans la procédure de rendu du prompt :
@ -71,7 +117,7 @@ function Invoke-Starship-PreCommand {
## Modifier le titre des fenêtres
Certaines commandes du shell changeront automatiquement le titre de la fenêtre (par exemple, pour refléter le dossier courant). Fish le fait même par défaut. Starship ne fait pas ça, mais cest assez facile dajouter cette fonctionnalité à `bash`, `zsh`, `cmd` ou `powershell`.
Certaines commandes du shell changeront automatiquement le titre de la fenêtre (par exemple, pour refléter votre répertoire de travail). Fish le fait même par défaut. Starship ne fait pas ça, mais cest assez facile dajouter cette fonctionnalité à `bash`, `zsh`, `cmd` ou `powershell`.
Tout d'abord, définissez une fonction de changement de titre de fenêtre (identique en bash et zsh) :
@ -97,7 +143,7 @@ precmd_functions+=(set_titre_fenetre)
Si vous aimez le résultat, ajoutez ces lignes à votre fichier de configuration shell (`~/.bashrc` ou `~/.zshrc`) pour le rendre permanent.
Par exemple, si vous voulez afficher votre dossier courant dans le titre de l'onglet de votre terminal, ajoutez le code suivant à votre `~/.bashrc` ou `~/.zshrc`:
Par exemple, si vous voulez afficher votre répertoire actuel dans le titre de l'onglet de votre terminal, ajoutez le code suivant à votre `~/.bashrc` ou `~/.zshrc`:
```bash
function set_win_title(){
@ -185,6 +231,9 @@ Les chaînes de style sont une liste de mots, séparés par des espaces blancs.
- `underline`
- `dimmed`
- `inverted`
- `blink`
- `hidden`
- `strikethrough`
- `bg:<couleur>`
- `fg:<couleur>`
- `<couleur>`
@ -201,3 +250,9 @@ Un spécificateur de couleur peut être l'un des éléments suivants :
- Un nombre entre 0 et 255. Ceci spécifie un [code de couleur ANSI 8 bits](https://i.stack.imgur.com/KTSQa.png).
Si plusieurs couleurs sont spécifiées pour le premier plan/arrière-plan, la dernière dans le string prendra la priorité.
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
- Many terminals disable support for `blink` by default
- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564).
- `strikethrough` is not supported by the default macOS Terminal.app

View File

@ -144,6 +144,18 @@ format = '''
\$'''
```
### Negative matching
Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched.
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"]
```
## Invite
Voici la liste des options de configuration de l'invite en lui-même.
@ -169,7 +181,7 @@ format = """
[](bold green)$directory$rust$package
[└─>](bold green) """
# Attendez 10 millisecondes pour que starship vérifie les fichiers dans le dossier courant.
# Attendez 10 millisecondes pour que starship vérifie les fichiers dans le répertoire de travail.
scan_timeout = 10
# Désactive la nouvelle ligne au début de l'invite
@ -201,11 +213,9 @@ $git_status\
$hg_branch\
$docker_context\
$package\
$buf\
$c\
$cmake\
$cobol\
$container\
$daml\
$dart\
$deno\
@ -228,6 +238,7 @@ $php\
$pulumi\
$purescript\
$python\
$raku\
$rlang\
$red\
$ruby\
@ -238,6 +249,7 @@ $terraform\
$vlang\
$vagrant\
$zig\
$buf\
$nix_shell\
$conda\
$spack\
@ -256,6 +268,7 @@ $jobs\
$battery\
$time\
$status\
$container\
$shell\
$character"""
```
@ -479,6 +492,45 @@ Le module `buf` affiche la version de [Buf](https://buf.build) installée. Par d
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:
- 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. |
### Variables
| Variable | Exemple | Description |
| --------- | -------- | -------------------------------------- |
| version | `v0.1.4` | The version of `bun` |
| 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
[bun]
format = "via [🍔 $version](bold green) "
```
## C
Le module `c` affiche des informations à propos de votre compilateur C. Par défaut, ce module sera affiché si le dossier courant contient un fichier `.c` ou `.h`.
@ -654,7 +706,7 @@ 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 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 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.
::: warning N'interceptez pas le signal DEBUG avec Bash
@ -772,8 +824,8 @@ format = "[$symbol \\[$name\\]]($style) "
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 dossier courant contient un fichier `shard.yml`
- Le dossier courant contient un fichier `.cr`
- Le répertoire courant contient un fichier `shard.yml`
- Le répertoire courant contient un fichier `.cr`
### Options
@ -811,7 +863,7 @@ format = "via [✨ $version](bold blue) "
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 current directory contains a `daml.yaml` file
- Le répertoire courant contient un fichier `daml.yaml`
### Options
@ -1060,7 +1112,7 @@ Le module affichera aussi le Moniker de Framework Cible (<https://docs.microsoft
### Options
| Option | Défaut | Description |
| Option | Défault | Description |
| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | Format du module. |
| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
@ -1102,7 +1154,7 @@ Le module `elixir` montre la version actuellement installée de [Elixir](https:/
### Options
| Option | Défault | Description |
| Option | Défaut | Description |
| ------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| `format` | `'via [$symbol($version \(OTP $otp_version\) )]($style)'` | Format du module elixir. |
| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
@ -1986,18 +2038,23 @@ Afficher le nom du [contexte Kubernetes](https://kubernetes.io/docs/concepts/con
Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration.
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.
:::
### Options
| Option | Défaut | Description |
| ----------------- | ---------------------------------------------------- | ---------------------------------------------------------------------- |
| `symbol` | `"☸ "` | Une chaîne de format représentant le symbole affiché avant le Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | Format du module. |
| `style` | `"cyan bold"` | Le style du module. |
| `context_aliases` | | Tableau des alias de contexte à afficher. |
| `user_aliases` | | Table of user aliases to display. |
| `disabled` | `true` | Désactiver le module `kubernetes`. |
| Option | Défaut | Description |
| ------------------- | ---------------------------------------------------- | ---------------------------------------------------------------------- |
| `symbol` | `"☸ "` | Une chaîne de format représentant le symbole affiché avant le Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | Format du module. |
| `style` | `"cyan bold"` | Le style du module. |
| `context_aliases` | | Tableau des alias de contexte à afficher. |
| `user_aliases` | | Table of user aliases to display. |
| `detect_extensions` | `[]` | Quelles extensions devraient activer ce module. |
| `detect_files` | `[]` | Les fichiers qui activent ce module. |
| `detect_folders` | `[]` | Quels dossiers devraient activer ce module. |
| `disabled` | `true` | Désactiver le module `kubernetes`. |
### Variables
@ -2029,6 +2086,16 @@ disabled = false
"root/.*" = "root"
```
Only show the module in directories that contain a `k8s` file.
```toml
# ~/.config/starship.toml
[kubernetes]
disabled = false
detect_files = ['k8s']
```
#### Filtrage par regex
Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
@ -2579,7 +2646,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:
- Le dossier courant contient soit un `Pulumi.yaml`, soit un `Pulumi.yml`
- Un dossier parent 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`
### Options
@ -2589,6 +2656,7 @@ Par défaut le module sera activé si au moins l'une des conditions suivantes es
| `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. |
| `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. |
| `disabled` | `false` | Désactive le module `pulumi`. |
### Variables
@ -3159,22 +3227,23 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur
### Options
| Option | Défaut | Description |
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | Le format du module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold green"` | Le style du module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | `|` | |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `disabled` | `true` | Désactiver le module `status`. |
| Option | Défaut | Description |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | Le format du module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold green"` | Le style du module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Désactiver le module `status`. |
### Variables

View File

@ -8,6 +8,10 @@ Ce préréglage modifie le format de tous les modules intégrés pour afficher l
### Configuration
```sh
starship preset bracketed-segments > ~/.config/starship.toml
```
[Cliquez pour télécharger le TOML](/presets/toml/bracketed-segments.toml)
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml

View File

@ -12,6 +12,10 @@ Ce préréglage change les symboles de chaque module pour utiliser les symboles
### Configuration
```sh
starship preset nerd-font-symbols > ~/.config/starship.toml
```
[Cliquez pour télécharger le TOML](/presets/toml/nerd-font-symbols.toml)
<<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml

View File

@ -8,6 +8,10 @@ Ce préréglage masque la version des environnements. Si vous travaillez dans de
### Configuration
```sh
starship preset no-runtime-versions > ~/.config/starship.toml
```
[Cliquez pour télécharger le TOML](/presets/toml/no-runtime-versions.toml)
<<< @/.vuepress/public/presets/toml/no-runtime-versions.toml

View File

@ -12,6 +12,10 @@ Ce préréglage s'inspire de [M365Princess](https://github.com/JanDeDobbeleer/oh
### Configuration
```sh
starship preset pastel-powerline > ~/.config/starship.toml
```
[Cliquez pour télécharger le TOML](/presets/toml/pastel-powerline.toml)
<<< @/.vuepress/public/presets/toml/pastel-powerline.toml

View File

@ -8,6 +8,10 @@ Ce préréglage change les symboles de chaque module en texte brut. Idéal si vo
### Configuration
```sh
starship preset plain-text-symbols > ~/.config/starship.toml
```
[Cliquez pour télécharger le TOML](/presets/toml/plain-text-symbols.toml)
<<< @/.vuepress/public/presets/toml/plain-text-symbols.toml

View File

@ -8,6 +8,10 @@ Ce préréglage émule l'apparence et le comportement de [Pure](https://github.c
### Configuration
```sh
starship preset pure-preset > ~/.config/starship.toml
```
[Cliquez pour télécharger le TOML](/presets/toml/pure-preset.toml)
<<< @/.vuepress/public/presets/toml/pure-preset.toml

View File

@ -8,6 +8,52 @@ Konfigurasi pada bagian ini dapat berubah saat Starship terbaru rilis di kemudia
:::
## TransientPrompt in PowerShell
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`.
By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do
```powershell
function Invoke-Starship-TransientFunction {
&starship module character
}
Invoke-Expression (&starship init powershell)
Enable-TransientPrompt
```
## TransientPrompt and TransientRightPrompt in Cmd
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <value>` where \<value\> can be one of:
- `always`: always replace the previous prompt
- `same_dir`: replace the previous prompt only if the working directory is same
- `off`: do not replace the prompt (i.e. turn off transience)
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
```lua
function starship_transient_prompt_func(prompt)
return io.popen("starship module character"
.." --keymap="..rl.getvariable('keymap')
):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
```lua
function starship_transient_rprompt_func(prompt)
return io.popen("starship module time"):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
## Kustomisasi Perintah pre-prompt dan pre-execution Pada Cmd
Clink menyediakan APIs yang sangat fleksibel untuk menjalankan perintah pre-prompt dan pre-exec di Cmd shell. Caranya sangat mudah dengan Starship. Ubahlah file `starship.lua` sesuai kebutuhanmu:
@ -36,7 +82,7 @@ load(io.popen('starship init cmd'):read("*a"))()
Bash tidak memiliki framework preexec/precmd yang tetap seperti kebanyakan shell pada umumnya. Oleh karena itu, sulit halnya untuk membuat hook yang dapat dikustomisasi sepenuhnya di dalam `bash`. Namun, Starship memberikan beberapa cara supaya kamu bisa memasukkan fungsimu sendiri ke dalam prosedur prompt-rendering:
- Untuk menjalankan custom function tepat sebelum prompt, buatlah sebuah fungsi baru lalu berikan nama `starship_precmd_user_func` ke fungsi tersebut. Sebagai contoh, untuk menampilkan roket sebelum prompt, kamu bisa
- Untuk menjalankan fungsi yang dikustomisasi tepat sebelum prompt, buatlah sebuah fungsi baru lalu berikan nama `starship_precmd_user_func` ke fungsi tersebut. Sebagai contoh, untuk menampilkan gambar roket sebelum prompt, kamu bisa melakukannya dengan cara
```bash
function blastoff(){
@ -45,7 +91,7 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
- Untuk menjalankan custom function tepat sebelum perintah berjalan, kamu bisa menggunakan [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Akan tetapi, kamu **harus** melakukan proses trap pada DEBUG signal _sebelum_ menjalankan Starship! Starship bisa menyimpan nilai dari DEBUG trap, tapi jika trap diganti setelah starship berjalan, beberapa fungsi akan rusak.
- Untuk menjalankan fungsi yang dikustomisasi tepat sebelum commands berjalan, kamu bisa menggunakan [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Akan tetapi, kamu **harus** melakukan proses trap pada DEBUG signal _sebelum_ menjalankan Starship! Starship bisa menyimpan nilai dari DEBUG trap, tapi jika trap diganti setelah starship berjalan, beberapa fungsi akan rusak.
```bash
function blastoff(){
@ -59,7 +105,7 @@ set +o functrace
## Perintah Custom pre-promt dan pre-execution di PowerShell
PowerShell tidak memiliki framework preecex/precmd seperti kebanyak shells pada umumnya. Karena itu, sulit halnya untuk membuat hook yang dapat dikustomisasi sepenuhnya di dalam `powershell`. Namun, Starship memberimu sedikit kemampuan untuk bisa menambahkan function milikmu ke dalam prosedur prompt-rendering:
PowerShell tidak memiliki framework preecex/precmd seperti kebanyak shells pada umumnya. Karena itu, sulit halnya untuk membuat hook yang dapat dikustomisasi sepenuhnya di dalam `powershell`. Namun, Starship memberikan beberapa cara supaya kamu bisa memasukkan fungsimu sendiri ke dalam prosedur prompt-rendering:
Buatlah sebuah funciton dengan nama `Invoke-Starship-PreCommand`
@ -73,7 +119,7 @@ function Invoke-Starship-PreCommand {
Beberapa prompt shell dengan otomatis akan mengubah judul window-nya untukmu (mis. untuk merefleksikan direktori kerjamu). Fish bahkan mengaturnya sebagai bawaan. Di dalam Starship tidak bisa, namun mudah halnya untuk menambahkan fungsionalitas tersebut ke dalam `bash`, `zsh`, `cmd` ataupun `powershell`.
Pertama, buatlah function untuk mengubah judul window (pada bash dan zsh):
Pertama, buatlah fungsi untuk mengubah judul window (bekerja pada bash dan zsh):
```bash
function set_win_title(){
@ -83,7 +129,7 @@ function set_win_title(){
Kamu bisa menggunakan variabel untuk mengkustomisasi judulnya (`$USER`, `$HOSTNAME`, dan `$PWD` adalah opsi yang populer).
Di dalam `bash`, atur function berikut menjadi function precmd untuk starship:
Di dalam `bash`, atur fungsi berikut menjadi fungsi precmd untuk starship:
```bash
starship_precmd_user_func="set_win_title"
@ -95,7 +141,7 @@ Dalam `zsh`, pada array `precmd_functions`, tambahkan:
precmd_functions+=(set_win_title)
```
Kalau kamu suka dengan hasilnya, tambahkan baris (`~/.bashrc` or `~/.zshrc`) ke dalam file konfigurasi shell milikmu untuk membuatnya menjadi tetap.
Kalau kamu suka hasilnya, tambahkan baris (`~/.bashrc` or `~/.zshrc`) ke dalam file konfigurasi shell milikmu untuk membuatnya permanen.
Sebagai contoh, kalau kamu mau menampilkan lokasi direktori pada judul label terminalmu, tambahkan bagian berikut ke dalam `~/.bashrc` atau `~/.zshrc`:
@ -176,15 +222,18 @@ Catatan: Continuation prompts hanya tersedia pada beberapa shells berikut:
continuation_prompt = "▶▶"
```
## Penataan String
## Menata String
Penataan string adalah kumpulan kata-kata, yang dipisahkan oleh ruang kosong. Kumpulannya tidak bersifat case sensitive (mis. `tebal` dan `TeBaL` dianggap sebagai string yang sama). Tiap-tiap kata berikut adalah opsinya:
Penataan string adalah kumpulan kata-kata, yang dipisahkan oleh ruang kosong. Kumpulan katanya tidak bersifat case sensitive (mis. `tebal` dan `TeBaL` dianggap sebagai string yang sama). Tiap-tiap kata berikut adalah opsinya:
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `blink`
- `hidden`
- `strikethrough`
- `bg:<color>`
- `fg:<color>`
- `<color>`
@ -201,3 +250,9 @@ Penentuan warna bisa dilakukan dengan salah satu cara berikut:
- Menggunakan bilangan antara 0-255. Spesifikasi [8-bit Kode Warna ANSI](https://i.stack.imgur.com/KTSQa.png).
Jika warna yang dipakai pada latar depan/latar belakang banyak, maka warna yang terbaru pada string yang akan diprioritaskan.
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
- Many terminals disable support for `blink` by default
- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564).
- `strikethrough` is not supported by the default macOS Terminal.app

View File

@ -144,6 +144,18 @@ format = '''
\$'''
```
### Negative matching
Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched.
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"]
```
## Prompt
Berikut adalah opsi konfigurasi dari list yang bersifat prompt-wide.
@ -201,11 +213,9 @@ $git_status\
$hg_branch\
$docker_context\
$package\
$buf\
$c\
$cmake\
$cobol\
$container\
$daml\
$dart\
$deno\
@ -228,6 +238,7 @@ $php\
$pulumi\
$purescript\
$python\
$raku\
$rlang\
$red\
$ruby\
@ -238,6 +249,7 @@ $terraform\
$vlang\
$vagrant\
$zig\
$buf\
$nix_shell\
$conda\
$spack\
@ -256,6 +268,7 @@ $jobs\
$battery\
$time\
$status\
$container\
$shell\
$character"""
```
@ -479,6 +492,45 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
symbol = "🦬 "
```
## Bun
The `bun` module shows the currently installed version of the [bun](https://bun.sh) JavaScript runtime. Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi:
- Direktori terkini yang berisikan sebuah file `bun.lockb`
- Direktori terkini yang berisikan sebuah file `bunfig.toml`
### 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 Node.js. |
| `detect_extensions` | `[]` | Ekstensi 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. |
| `disabled` | `false` | Disables the `bun` module. |
### Variabel
| Variabel | Contoh | Deskripsi |
| --------- | -------- | --------------------------------- |
| version | `v0.1.4` | The version of `bun` |
| 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
[bun]
format = "via [🍔 $version](bold green) "
```
## C
The `c` module shows some information about your C compiler. By default the module will be shown if the current directory contains a `.c` or `.h` file.
@ -811,7 +863,7 @@ format = "via [✨ $version](bold blue) "
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. Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi:
- The current directory contains a `daml.yaml` file
- Direktori terkini yang berisikan sebuah file `daml.yaml`
### Opsi
@ -1986,18 +2038,23 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
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.
:::
### Opsi
| Opsi | Bawaan | Deskripsi |
| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. |
| `fromat` | `'[$symbol$context( \($namespace\))]($style) in '` | Format dari modul. |
| `style` | `"cyan bold"` | Gaya penataan untuk modul. |
| `context_aliases` | | Table of context aliases to display. |
| `user_aliases` | | Table of user aliases to display. |
| `disabled` | `true` | Disables the `kubernetes` module. |
| Opsi | Bawaan | Deskripsi |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. |
| `fromat` | `'[$symbol$context( \($namespace\))]($style) in '` | Format dari modul. |
| `style` | `"cyan bold"` | Gaya penataan untuk modul. |
| `context_aliases` | | Table of context aliases to display. |
| `user_aliases` | | Table of user aliases to display. |
| `detect_extensions` | `[]` | 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` | `true` | Disables the `kubernetes` module. |
### Variabel
@ -2029,6 +2086,16 @@ disabled = false
"root/.*" = "root"
```
Only show the module in directories that contain a `k8s` file.
```toml
# ~/.config/starship.toml
[kubernetes]
disabled = false
detect_files = ['k8s']
```
#### Regex Matching
Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
@ -2579,7 +2646,7 @@ By default the Pulumi version is not shown, since it takes an order of magnitude
Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi:
- The current directory contains either `Pulumi.yaml` or `Pulumi.yml`
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml`
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` unless `search_upwards` is set to `false`
### Opsi
@ -2589,6 +2656,7 @@ Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi:
| `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. |
### Variabel
@ -3158,22 +3226,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Opsi
| Opsi | Bawaan | Deskripsi |
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
| `fromat` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | Gaya penataan untuk modul. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | `|` | |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `disabled` | `true` | Disables the `status` module. |
| Opsi | Bawaan | Deskripsi |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `fromat` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | Gaya penataan untuk modul. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Variabel

View File

@ -8,6 +8,10 @@ Konfigurasi prasetel berikut mengubah format dari seluruh modul bawaan untuk men
### Konfigurasi
```sh
starship preset bracketed-segments > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/bracketed-segments.toml)
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml

View File

@ -12,6 +12,10 @@ This preset changes the symbols for each module to use Nerd Font symbols.
### Konfigurasi
```sh
starship preset nerd-font-symbols > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/nerd-font-symbols.toml)
<<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml

View File

@ -8,6 +8,10 @@ Konfigurasi prasetel berikut menyembunyikan versi language runtimes. Jika kamu b
### Konfigurasi
```sh
starship preset no-runtime-versions > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/no-runtime-versions.toml)
<<< @/.vuepress/public/presets/toml/no-runtime-versions.toml

View File

@ -12,6 +12,10 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m
### Konfigurasi
```sh
starship preset pastel-powerline > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/pastel-powerline.toml)
<<< @/.vuepress/public/presets/toml/pastel-powerline.toml

View File

@ -8,6 +8,10 @@ This preset changes the symbols for each module into plain text. Great if you do
### Konfigurasi
```sh
starship preset plain-text-symbols > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/plain-text-symbols.toml)
<<< @/.vuepress/public/presets/toml/plain-text-symbols.toml

View File

@ -8,6 +8,10 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso
### Konfigurasi
```sh
starship preset pure-preset > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/pure-preset.toml)
<<< @/.vuepress/public/presets/toml/pure-preset.toml

View File

@ -10,11 +10,11 @@ features:
title: Prima la compatibilità
details: Funziona sulle shell e sui sistemi operativi più comuni. Usalo ovunque!
-
title: Generato in Rust
details: Sfrutta la velocità e sicurezza migliori di Rust, per rendere il tuo prompt il più veloce e il più affidabile.
title: Scritto in Rust
details: Sfrutta la velocità e sicurezza di Rust, per rendere il tuo prompt il più veloce e il più affidabile.
-
title: Personalizzabile
details: Ogni più piccolo dettaglio è personalizzabile a piacere, per rendere questo messaggio prompt minimalista o ricco delle funzionalità che desideri.
details: Ogni più piccolo dettaglio è personalizzabile a piacere, per rendere questo prompt minimalista o ricco di tutte le funzionalità che desideri.
footer: Licenza ISC | Copyright © 2019-present Starship Collaboratori
#Used for the description meta tag, for SEO
metaTitle: "Starship: Cross-Shell Prompt"

View File

@ -8,6 +8,52 @@ Le configurazioni in questa sezione sono soggette a modifiche nelle future versi
:::
## TransientPrompt in PowerShell
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`.
By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do
```powershell
function Invoke-Starship-TransientFunction {
&starship module character
}
Invoke-Expression (&starship init powershell)
Enable-TransientPrompt
```
## TransientPrompt and TransientRightPrompt in Cmd
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <value>` where \<value\> can be one of:
- `always`: always replace the previous prompt
- `same_dir`: replace the previous prompt only if the working directory is same
- `off`: do not replace the prompt (i.e. turn off transience)
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
```lua
function starship_transient_prompt_func(prompt)
return io.popen("starship module character"
.." --keymap="..rl.getvariable('keymap')
):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
```lua
function starship_transient_rprompt_func(prompt)
return io.popen("starship module time"):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
## Custom pre-prompt and pre-execution Commands in Cmd
Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements:
@ -185,6 +231,9 @@ Le stringhe di stile sono un elenco di parole, separate da spazi bianchi. Le par
- `underline`
- `dimmed`
- `inverted`
- `blink`
- `hidden`
- `strikethrough`
- `bg:<color>`
- `fg:<color>`
- `<color>`
@ -201,3 +250,9 @@ Uno colore specifico può essere uno di questi:
- Un numero compreso tra 0-255. Specifica un [codice colore ANSI a 8 bit](https://i.stack.imgur.com/KTSQa.png).
Se sono specificati più colori per il primo piano/sfondo, l'ultimo nella stringa avrà la priorità.
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
- Many terminals disable support for `blink` by default
- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564).
- `strikethrough` is not supported by the default macOS Terminal.app

View File

@ -144,6 +144,18 @@ format = '''
\$'''
```
### Negative matching
Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched.
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"]
```
## Prompt
This is the list of prompt-wide configuration options.
@ -201,11 +213,9 @@ $git_status\
$hg_branch\
$docker_context\
$package\
$buf\
$c\
$cmake\
$cobol\
$container\
$daml\
$dart\
$deno\
@ -228,6 +238,7 @@ $php\
$pulumi\
$purescript\
$python\
$raku\
$rlang\
$red\
$ruby\
@ -238,6 +249,7 @@ $terraform\
$vlang\
$vagrant\
$zig\
$buf\
$nix_shell\
$conda\
$spack\
@ -256,6 +268,7 @@ $jobs\
$battery\
$time\
$status\
$container\
$shell\
$character"""
```
@ -479,6 +492,45 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
symbol = "🦬 "
```
## Bun
The `bun` module shows the currently installed version of the [bun](https://bun.sh) JavaScript runtime. By default the module will be shown if any of the following conditions are met:
- The current directory contains a `bun.lockb` file
- The current directory contains a `bunfig.toml` 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`, `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. |
### Variables
| Variable | Esempio | Descrizione |
| --------- | -------- | ------------------------------------ |
| 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
### Esempio
```toml
# ~/.config/starship.toml
[bun]
format = "via [🍔 $version](bold green) "
```
## C
The `c` module shows some information about your C compiler. By default the module will be shown if the current directory contains a `.c` or `.h` file.
@ -1986,18 +2038,23 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
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.
:::
### Opzioni
| Opzione | Default | Descrizione |
| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
| `style` | `"cyan bold"` | Lo stile per il modulo. |
| `context_aliases` | | Table of context aliases to display. |
| `user_aliases` | | Table of user aliases to display. |
| `disabled` | `true` | Disables the `kubernetes` module. |
| Opzione | Default | Descrizione |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
| `style` | `"cyan bold"` | Lo stile per il modulo. |
| `context_aliases` | | Table of context aliases to display. |
| `user_aliases` | | Table of user aliases to display. |
| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. |
| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `disabled` | `true` | Disables the `kubernetes` module. |
### Variables
@ -2029,6 +2086,16 @@ disabled = false
"root/.*" = "root"
```
Only show the module in directories that contain a `k8s` file.
```toml
# ~/.config/starship.toml
[kubernetes]
disabled = false
detect_files = ['k8s']
```
#### Regex Matching
Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
@ -2579,7 +2646,7 @@ By default the Pulumi version is not shown, since it takes an order of magnitude
By default the module will be shown if any of the following conditions are met:
- The current directory contains either `Pulumi.yaml` or `Pulumi.yml`
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml`
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` unless `search_upwards` is set to `false`
### Opzioni
@ -2589,6 +2656,7 @@ By default the module will be shown if any of the following conditions are met:
| `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. |
### Variables
@ -3158,22 +3226,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Opzioni
| Opzione | Default | Descrizione |
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | Lo stile per il modulo. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | `|` | |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `disabled` | `true` | Disables the `status` module. |
| Opzione | Default | Descrizione |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | Lo stile per il modulo. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Variables

View File

@ -8,6 +8,10 @@ This preset changes the format of all the built-in modules to show their segment
### Configurazione
```sh
starship preset bracketed-segments > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/bracketed-segments.toml)
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml

View File

@ -12,6 +12,10 @@ This preset changes the symbols for each module to use Nerd Font symbols.
### Configurazione
```sh
starship preset nerd-font-symbols > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/nerd-font-symbols.toml)
<<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml

View File

@ -8,6 +8,10 @@ This preset hides the version of language runtimes. If you work in containers or
### Configurazione
```sh
starship preset no-runtime-versions > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/no-runtime-versions.toml)
<<< @/.vuepress/public/presets/toml/no-runtime-versions.toml

View File

@ -12,6 +12,10 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m
### Configurazione
```sh
starship preset pastel-powerline > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/pastel-powerline.toml)
<<< @/.vuepress/public/presets/toml/pastel-powerline.toml

View File

@ -8,6 +8,10 @@ This preset changes the symbols for each module into plain text. Great if you do
### Configurazione
```sh
starship preset plain-text-symbols > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/plain-text-symbols.toml)
<<< @/.vuepress/public/presets/toml/plain-text-symbols.toml

View File

@ -8,6 +8,10 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso
### Configurazione
```sh
starship preset pure-preset > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/pure-preset.toml)
<<< @/.vuepress/public/presets/toml/pure-preset.toml

View File

@ -8,9 +8,55 @@ Starship は汎用性の高いシェルですが、時には特定の処理を
:::
## Custom pre-prompt and pre-execution Commands in Cmd
## TransientPrompt in PowerShell
Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements:
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`.
By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do
```powershell
function Invoke-Starship-TransientFunction {
&starship module character
}
Invoke-Expression (&starship init powershell)
Enable-TransientPrompt
```
## TransientPrompt and TransientRightPrompt in Cmd
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <value>` where \<value\> can be one of:
- `always`: always replace the previous prompt
- `same_dir`: replace the previous prompt only if the working directory is same
- `off`: do not replace the prompt (i.e. turn off transience)
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
```lua
function starship_transient_prompt_func(prompt)
return io.popen("starship module character"
.." --keymap="..rl.getvariable('keymap')
):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
```lua
function starship_transient_rprompt_func(prompt)
return io.popen("starship module time"):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
## Cmdのカスタムの事前プロンプトおよび事前実行コマンド
Clinkはプロンプト表示前と実行前にCmd shellコマンドを実行するための非常に柔軟なAPIを提供します。 It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements:
- To run a custom function right before the prompt is drawn, define a new function called `starship_preprompt_user_func`. This function receives the current prompt as a string that you can utilize. For example, to draw a rocket before the prompt, you would do
@ -59,7 +105,7 @@ set +o functrace
## Custom pre-prompt and pre-execution Commands in PowerShell
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. ただし、Starship はプロンプトを描画する一連の流れに、限定的に独自の関数を挿入することができます。
PowerShell does not have a formal preexec/precmd framework like most other shells. そのため、`powershell`で完全にカスタマイズ可能なフックを提供することは困難です。 ただし、Starship はプロンプトを描画する一連の流れに、限定的に独自の関数を挿入することができます。
Create a function named `Invoke-Starship-PreCommand`
@ -185,6 +231,9 @@ continuation_prompt = "▶▶"
- `underline`
- `dimmed`
- `inverted`
- `blink`
- `hidden`
- `strikethrough`
- `bg:<color>`
- `fg:<color>`
- `<color>`
@ -201,3 +250,9 @@ continuation_prompt = "▶▶"
- 0-255 までの間の数字。 [8-bit ANSI カラーコード](https://i.stack.imgur.com/KTSQa.png) を表します。
複数の色が文字色/背景色に指定された際には、最後の指定が優先して選ばれます。
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
- Many terminals disable support for `blink` by default
- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564).
- `strikethrough` is not supported by the default macOS Terminal.app

View File

@ -9,17 +9,16 @@ 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
# 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
# 記号""を記号"➜"に置き換える
[character] # 編集するモジュールの名前は"character"
success_symbol = "[➜](bold green)" # "success_symbol"を記号"➜"で"bold green"(太字の緑色)にセット
# パッケージモジュールを無効化することでプロンプトを完全に非表示にする
[package]
disabled = true
```
@ -144,6 +143,18 @@ format = '''
\$'''
```
### Negative matching
Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched.
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"]
```
## プロンプト
これは、プロンプト全体のオプションのリストです。
@ -202,11 +213,9 @@ $git_status\
$hg_branch\
$docker_context\
$package\
$buf\
$c\
$cmake\
$cobol\
$container\
$daml\
$dart\
$deno\
@ -229,6 +238,7 @@ $php\
$pulumi\
$purescript\
$python\
$raku\
$rlang\
$red\
$ruby\
@ -239,6 +249,7 @@ $terraform\
$vlang\
$vagrant\
$zig\
$buf\
$nix_shell\
$conda\
$spack\
@ -257,6 +268,7 @@ $jobs\
$battery\
$time\
$status\
$container\
$shell\
$character"""
```
@ -427,16 +439,16 @@ style = "bold red"
#### 設定例
```toml
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
[[battery.display]] # "bold red"(太字の赤)でdischarging_symbolをバッテーリー残量が0%から10%の間で表示
threshold = 10
style = "bold red"
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
[[battery.display]] # "bold yellow"(太字の黄)で記号💦をバッテリー残量が10%から30%の間で表示
threshold = 30
style = "bold yellow"
discharging_symbol = "💦"
# when capacity is over 30%, the battery indicator will not be displayed
# バッテリー残量が30%を超えると、バッテリーインジケータは表示されません
```
## Buf
@ -478,6 +490,45 @@ discharging_symbol = "💦"
symbol = "🦬 "
```
## Bun
The `bun` module shows the currently installed version of the [bun](https://bun.sh) JavaScript runtime. デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
- カレントディレクトリに`bun.lockb`ファイルが含まれている
- カレントディレクトリに`bunfig.toml`ファイルが含まれている
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------ |
| `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` | `[]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["bun.lockb", "bunfig.toml"]` | どのファイル名がこのモジュールをアクティブにするか |
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
| `style` | `"bold red"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `bun` module. |
### 変数
| 変数 | 設定例 | 説明 |
| --------- | -------- | ---------------------- |
| version | `v0.1.4` | The version of `bun` |
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
*: この変数は、スタイル文字列の一部としてのみ使用することができます。
### 設定例
```toml
# ~/.config/starship.toml
[bun]
format = "via [🍔 $version](bold green) "
```
## C
`c` モジュールは、利用しているCコンパイラに関するいくつかの情報を表示します。 デフォルトでは、カレントディレクトリに`.c`または`.h`ファイルが含まれている場合、モジュールが表示されます。
@ -537,7 +588,7 @@ format = "via [$name $version]($style)"
::: warning
`vimcmd_symbol` is only supported in cmd, fish and zsh. `vimcmd_replace_one_symbol`、`vimcmd_replace_symbol`と`vimcmd_visual_symbol`は、[zshでのモード検出による問題](https://github.com/starship/starship/issues/625#issuecomment-732454148)のため、fishでのみサポートされています。
`vimcmd_symbol`はcmd, fish and zshでのみサポートされています。 `vimcmd_replace_one_symbol`、`vimcmd_replace_symbol`と`vimcmd_visual_symbol`は、[zshでのモード検出による問題](https://github.com/starship/starship/issues/625#issuecomment-732454148)のため、fishでのみサポートされています。
:::
@ -545,10 +596,10 @@ format = "via [$name $version]($style)"
| オプション | デフォルト | 説明 |
| --------------------------- | -------------------- | ------------------------------------------------------ |
| `format` | `"$symbol"` | テキスト入力の前に使用されるフォーマット文字列。 |
| `success_symbol` | `"[](bold green)"` | 前のコマンドが成功した場合にテキスト入力の前に使用されるフォーマット文字列です。 |
| `error_symbol` | `"[](bold red)"` | 前のコマンドが失敗した場合にテキスト入力の前に使用されるフォーマット文字列です。 |
| `vimcmd_symbol` | `"[](bold green)"` | シェルがvimーマルモードの場合にテキスト入力の前に使用されるフォーマット文字列です。 |
| `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の置換モードの場合にテキスト入力の前に使用されるフォーマット文字列。 |
@ -673,7 +724,7 @@ preexecのような機能を必要とするBashユーザーは、 [rcalorasのba
| `style` | `"bold yellow"` | モジュールのスタイルです。 |
| `disabled` | `false` | `cmd_duration`モジュールを無効にします。 |
| `show_notifications` | `false` | コマンドが完了したらデスクトップ通知を表示します。 |
| `min_time_to_notify` | `45_000` | 通知を持続する最短期間 (ミリ秒単位) です。 |
| `min_time_to_notify` | `45_000` | 通知を持続する最短期間(ミリ秒単位) |
| `notification_timeout` | | 通知を表示する期間 (ミリ秒単位) です。 もし設定されていない場合、通知のタイムアウトはデーモンによって決定されます。 すべての通知デーモンがこのオプションを受け入れるわけではありません。 |
### 変数
@ -1077,7 +1128,7 @@ format = "via [🐋 $context](blue bold)"
| --------- | ---------------- | ----------------------------------- |
| version | `v3.1.201` | `dotnet sdk` のバージョンです |
| tfm | `netstandard2.0` | 現在のプロジェクトが対象としているターゲット フレームワーク モニカー |
| symbol | | オプション `記号` の値をミラーする |
| symbol | | オプション `symbol` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
*: この変数は、スタイル文字列の一部としてのみ使用することができます。
@ -1114,12 +1165,12 @@ heuristic = false
### 変数
| 変数 | 設定例 | 説明 |
| ----------- | ------- | ----------------------- |
| version | `v1.10` | `elixir`のバージョン |
| otp_version | | `elixir`のotpバージョン |
| symbol | | オプション `symbol` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
| 変数 | 設定例 | 説明 |
| ----------- | ------- | ---------------------- |
| version | `v1.10` | `elixir`のバージョン |
| otp_version | | `elixir`のotpバージョン |
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
*: この変数は、スタイル文字列の一部としてのみ使用することができます。
@ -1183,9 +1234,9 @@ format = "via [ $version](cyan bold) "
::: tip
Multiple environmental variables can be displayed by using a `.`. (see example) If the `variable` configuration option is not set, the module will display value of variable under the name of text after the `.` character.
`.`を使うことで複数の環境変数を表示することができます。 (例を確認してみてください) `variable`が設定されていない場合、このモジュールは`.`以降に書かれている環境変数の値を表示します。
Example: following configuration will display value of USER environment variable
例: 次の設定ではUSER環境変数を表示します。
```toml
# ~/.config/starship.toml
@ -1283,11 +1334,11 @@ format = "via [e $version](bold red) "
### オプション
| オプション | デフォルト | 説明 |
| ---------- | -------------- | --------------------------------- |
| `symbol` | `"."` | The symbol used to fill the line. |
| `style` | `"bold black"` | モジュールのスタイルです。 |
| `disabled` | `false` | `fill`モジュールを無効にします。 |
| オプション | デフォルト | 説明 |
| ---------- | -------------- | ------------------- |
| `symbol` | `"."` | 行を埋めるために使う記号 |
| `style` | `"bold black"` | モジュールのスタイルです。 |
| `disabled` | `false` | `fill`モジュールを無効にします。 |
### 設定例
@ -1300,7 +1351,7 @@ symbol = "-"
style = "bold green"
```
Produces a prompt that looks like:
このような出力になります:
```
AA -------------------------------------------- BB -------------------------------------------- CC
@ -1327,7 +1378,7 @@ AA -------------------------------------------- BB -----------------------------
| --------- | ------------- | ----------------------------------------------- |
| region | `us-central1` | 現在のGCPリージョン |
| account | `foo` | 現在のGCPプロファイル |
| domain | `example.com` | The current GCP profile domain |
| domain | `example.com` | 現在のGCPプロファイルのドメイン |
| project | | 現在のGCPプロジェクト |
| active | `default` | `~/.config/gcloud/active_config` に書かれたアクティブな設定名 |
| symbol | | オプション `記号` の値をミラーする |
@ -1368,7 +1419,7 @@ us-central1 = "uc1"
asia-northeast1 = "an1"
```
#### Display account and aliased project
#### アカウントとエイリアスされたプロジェクトを表示
```toml
# ~/.config/starship.toml
@ -1385,17 +1436,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` | `"…"` | ブランチ名切り捨てられていることを示すための記号です。 You can use `""` for no symbol. |
| `only_attached` | `false` | Only show the branch name when not in a detached `HEAD` state. |
| `ignore_branches` | `[]` | A list of names to avoid displaying. Useful for "master" or "main". |
| `disabled` | `false` | `git_branch`モジュールを無効にします。 |
| オプション | デフォルト | 説明 |
| -------------------- | ------------------------------------------------- | -------------------------------------------------------------- |
| `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`モジュールを無効にします。 |
### 変数
@ -1985,18 +2036,23 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`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.
:::
### オプション
| オプション | デフォルト | 説明 |
| ----------------- | ---------------------------------------------------- | --------------------------------- |
| `symbol` | `"☸ "` | クラスター名の前に表示されるシンボルを表すフォーマット文字列。 |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | module のフォーマットです。 |
| `style` | `"cyan bold"` | モジュールのスタイルです。 |
| `context_aliases` | | コンテキストの表示エイリアスを定義するテーブル。 |
| `user_aliases` | | Table of user aliases to display. |
| `disabled` | `true` | `kubernetes` モジュールを無効にする。 |
| オプション | デフォルト | 説明 |
| ------------------- | ---------------------------------------------------- | --------------------------------- |
| `symbol` | `"☸ "` | クラスター名の前に表示されるシンボルを表すフォーマット文字列。 |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | module のフォーマットです。 |
| `style` | `"cyan bold"` | モジュールのスタイルです。 |
| `context_aliases` | | コンテキストの表示エイリアスを定義するテーブル。 |
| `user_aliases` | | Table of user aliases to display. |
| `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか |
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
| `disabled` | `true` | `kubernetes` モジュールを無効にする。 |
### 変数
@ -2028,6 +2084,16 @@ disabled = false
"root/.*" = "root"
```
Only show the module in directories that contain a `k8s` file.
```toml
# ~/.config/starship.toml
[kubernetes]
disabled = false
detect_files = ['k8s']
```
#### Regex Matching
Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
@ -2578,17 +2644,18 @@ By default the Pulumi version is not shown, since it takes an order of magnitude
デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
- カレントディレクトリに`Pulumi.yaml`または`Pulumi.yml`ファイルが含まれている
- 親ディレクトリに`Pulumi.yaml`または`Pulumi.yml`ファイルが含まれている
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` unless `search_upwards` is set to `false`
### オプション
| オプション | デフォルト | 説明 |
| ---------------- | -------------------------------------------- | ------------------------------------------------------ |
| `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"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `pulumi` module. |
| オプション | デフォルト | 説明 |
| ---------------- | -------------------------------------------- | -------------------------------------------------------------- |
| `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. |
### 変数
@ -2766,7 +2833,7 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"]
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `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"` | モジュールのスタイルです。 |
@ -3157,22 +3224,23 @@ The `status` module displays the exit code of the previous command. If $success_
### オプション
| オプション | デフォルト | 説明 |
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | モジュールのスタイルです。 |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | `|` | |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `disabled` | `true` | Disables the `status` module. |
| オプション | デフォルト | 説明 |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | モジュールのスタイルです。 |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `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. |
### 変数

View File

@ -1,4 +1,4 @@
# Frequently Asked Questions
# よくある質問
## デモGIFで使用される構成は何ですか
@ -56,7 +56,7 @@ CentOS6や7などで事前にビルドされたバイナリを使用していて
curl -sS https://starship.rs/install.sh | sh -s -- --platform unknown-linux-musl
```
## Why do I see `Executing command "..." timed out.` warnings?
## どうして`Executing command "..." timed out.`という警告が出てくるのでしょうか?
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
@ -64,7 +64,7 @@ Starship executes different commands to get information to display in the prompt
不明な記号に遭遇した場合、`starship explain` を使用することで、現在表示しているモジュールの説明を見ることができます。
## Starship is doing something unexpected, how can I debug it?
## Starshipがなにか想定外の挙動をしているとき、どのようにデバッグすればよいですか?
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
@ -117,6 +117,6 @@ Starship がパッケージマネージャを使用してインストールさ
Starship をインストールスクリプトを使用してインストールした場合、次のコマンドでバイナリが削除されます。
```sh
# Locate and delete the starship binary
# starshipのバイナリを見つけて削除
sh -c 'rm "$(command -v 'starship')"'
```

View File

@ -39,7 +39,7 @@ curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir /data/data/com.term
### インストール
On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage:
Funtoo Linuxでは、Portageの[core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship)からstarship をインストールできます。
```sh
emerge app-shells/starship
@ -49,13 +49,13 @@ emerge app-shells/starship
### バイナリの取得
#### 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)を使う宣言的な手法
`home.nix`ファイルで`programs.starship`を有効にして、設定を追加してください。
@ -84,7 +84,7 @@ nix-env -iA nixos.starship
home-manager switch
```
#### Declarative, system-wide, with NixOS
#### NixOSでシステム全体に適用する宣言的な手法
`configuration.nix`で`environment.systemPackages`に`pkgs.starship`を追加して、次を実行してください

View File

@ -2,40 +2,40 @@
以下は、Starship用にコミュニティに提供された構成プリセットのコレクションです。 共有するプリセットがある場合は、このファイルを更新して[PR](https://github.com/starship/starship/edit/master/docs/presets/README.md)を送信してください! 😊
To get details on how to use a preset, simply click on the image.
プリセットの使い方を確認するには画像をクリックしてください。
## [Nerd Font Symbols](./nerd-font.md)
This preset changes the symbols for each module to use Nerd Font symbols.
このプリセットはそれぞれのモジュールで記号がNerd Fontの記号に変更されます。
[![Nerd Font Symbolsプリセットのスクリーンショット](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font)
[![Nerd Font Symbolsプリセットのスクリーンショット](/presets/img/nerd-font-symbols.png "Nerd Font Symbolsプリセットを表示するにはクリックしてください")](./nerd-font)
## [Bracketed Segments](./bracketed-segments.md)
このプリセットは付属のモジュール全てのフォーマットを変更し、デフォルトのStarshipの表示("via", "on", etc.)から、それぞれの情報を括弧で区分けするように変更します。
[![Bracketed Segmentsプリセットのスクリーンショット](/presets/img/bracketed-segments.png "Click to view Bracketed Segments preset")](./bracketed-segments)
[![Bracketed Segmentsプリセットのスクリーンショット](/presets/img/bracketed-segments.png "Bracketed Segmentsプリセットを表示するにはクリックしてください")](./bracketed-segments)
## [Plain Text Symbols](./plain-text.md)
This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
このプリセットはそれぞれのモジュールで記号をテキストに変更します。 Unicodeにアクセスできない場合に最適です。
[![Plain Text Symbolsプリセットのスクリーンショット](/presets/img/plain-text-symbols.png "Click to view Plain Text Symbols preset")](./plain-text)
[![Plain Text Symbolsプリセットのスクリーンショット](/presets/img/plain-text-symbols.png "Plain Text Symbolsプリセットを表示するにはクリックしてください")](./plain-text)
## [No Runtime Versions](./no-runtimes.md)
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
このプリセットは言語ランタイムのバージョンを非表示にします。 コンテナまたは仮想環境で作業している場合は、これはあなたのためのものです。
[![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes)
[![Hide Runtime Versionsプリセットのスクリーンショット](/presets/img/no-runtime-versions.png "No Runtime Versionsプリセットを表示するにはクリックしてください")](./no-runtimes)
## [Pure Prompt](./pure-preset.md)
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
このプリセットは、[Pure](https://github.com/sindresorhus/pure)の外観と振る舞いをエミュレートします。
[![Screenshot of Pure preset](/presets/img/pure-preset.png "Click to view Pure Prompt preset")](./pure-preset)
[![Pureプリセットのスクリーンショット](/presets/img/pure-preset.png "Pure Promptプリセットを表示するにはクリックしてください")](./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.
このプリセットは[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)
[![Pastel Powerlineプリセットのスクリーンショット](/presets/img/pastel-powerline.png "Pure Promptプリセットを表示するにはクリックしてください")](./pastel-powerline)

View File

@ -1,6 +1,6 @@
[Return to Presets](./README.md#bracketed-segments)
[プリセット一覧に戻る](./README.md#bracketed-segments)
# Bracketed Segments Preset
# Bracketed Segmentsプリセット
このプリセットは付属のモジュール全てのフォーマットを変更し、デフォルトのStarshipの表示("via", "on", etc.)から、それぞれの情報を括弧で区分けするように変更します。
@ -8,6 +8,10 @@
### 設定
[Click to download TOML](/presets/toml/bracketed-segments.toml)
```sh
starship preset bracketed-segments > ~/.config/starship.toml
```
[クリックしてTOMLをダウンロード](/presets/toml/bracketed-segments.toml)
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml

View File

@ -1,8 +1,8 @@
[Return to Presets](./README.md#nerd-font-symbols)
[プリセット一覧に戻る](./README.md#nerd-font-symbols)
# Nerd Font Symbols Preset
# Nerd Font Symbolsプリセット
This preset changes the symbols for each module to use Nerd Font symbols.
このプリセットはそれぞれのモジュールで記号がNerd Fontの記号に変更されます。
![Nerd Font Symbolsプリセットのスクリーンショット](/presets/img/nerd-font-symbols.png)
@ -12,6 +12,10 @@ This preset changes the symbols for each module to use Nerd Font symbols.
### 設定
[Click to download TOML](/presets/toml/nerd-font-symbols.toml)
```sh
starship preset nerd-font-symbols > ~/.config/starship.toml
```
[クリックしてTOMLをダウンロード](/presets/toml/nerd-font-symbols.toml)
<<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml

View File

@ -1,13 +1,17 @@
[Return to Presets](./README.md#no-runtime-versions)
[プリセット一覧に戻る](./README.md#no-runtime-versions)
# No Runtime Versions Preset
# No Runtime Versionsプリセット
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
このプリセットは言語ランタイムのバージョンを非表示にします。 コンテナまたは仮想環境で作業している場合は、これはあなたのためのものです。
![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png)
![Hide Runtime Versionsプリセットのスクリーンショット](/presets/img/no-runtime-versions.png)
### 設定
[Click to download TOML](/presets/toml/no-runtime-versions.toml)
```sh
starship preset no-runtime-versions > ~/.config/starship.toml
```
[クリックしてTOMLをダウンロード](/presets/toml/no-runtime-versions.toml)
<<< @/.vuepress/public/presets/toml/no-runtime-versions.toml

View File

@ -1,17 +1,21 @@
[Return to Presets](./README.md#pastel-powerline)
[プリセット一覧に戻る](./README.md#pastel-powerline)
# Pastel Powerline Preset
# Pastel Powerlineプリセット
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.
このプリセットは[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)
![Pastel Powerlineプリセットのスクリーンショット](/presets/img/pastel-powerline.png)
### 必要なもの
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Caskaydia Cove Nerd Font)
- [Nerd Font](https://www.nerdfonts.com/)が端末にインストールされ、有効になっている (例ではCaskaydia Cove Nerd Fontを使用)
### 設定
[Click to download TOML](/presets/toml/pastel-powerline.toml)
```sh
starship preset pastel-powerline > ~/.config/starship.toml
```
[クリックしてTOMLをダウンロード](/presets/toml/pastel-powerline.toml)
<<< @/.vuepress/public/presets/toml/pastel-powerline.toml

View File

@ -1,13 +1,17 @@
[Return to Presets](./README.md#plain-text-symbols)
[プリセット一覧に戻る](./README.md#plain-text-symbols)
## Plain Text Symbols Preset
## Plain Text Symbolsプリセット
This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
このプリセットはそれぞれのモジュールで記号をテキストに変更します。 Unicodeにアクセスできない場合に最適です。
![Plain Text Symbolsプリセットのスクリーンショット](/presets/img/plain-text-symbols.png)
### 設定
[Click to download TOML](/presets/toml/plain-text-symbols.toml)
```sh
starship preset plain-text-symbols > ~/.config/starship.toml
```
[クリックしてTOMLをダウンロード](/presets/toml/plain-text-symbols.toml)
<<< @/.vuepress/public/presets/toml/plain-text-symbols.toml

View File

@ -1,13 +1,17 @@
[Return to Presets](./README.md#pure)
[プリセット一覧に戻る](./README.md#pure)
# Pure Preset
# Pureプリセット
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
このプリセットは、[Pure](https://github.com/sindresorhus/pure)の外観と振る舞いをエミュレートします。
![Screenshot of Pure preset](/presets/img/pure-preset.png)
![Pureプリセットのスクリーンショット](/presets/img/pure-preset.png)
### 設定
[Click to download TOML](/presets/toml/pure-preset.toml)
```sh
starship preset pure-preset > ~/.config/starship.toml
```
[クリックしてTOMLをダウンロード](/presets/toml/pure-preset.toml)
<<< @/.vuepress/public/presets/toml/pure-preset.toml

View File

@ -8,6 +8,52 @@ The configurations in this section are subject to change in future releases of S
:::
## TransientPrompt in PowerShell
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`.
By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do
```powershell
function Invoke-Starship-TransientFunction {
&starship module character
}
Invoke-Expression (&starship init powershell)
Enable-TransientPrompt
```
## TransientPrompt and TransientRightPrompt in Cmd
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <value>` where \<value\> can be one of:
- `always`: always replace the previous prompt
- `same_dir`: replace the previous prompt only if the working directory is same
- `off`: do not replace the prompt (i.e. turn off transience)
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
```lua
function starship_transient_prompt_func(prompt)
return io.popen("starship module character"
.." --keymap="..rl.getvariable('keymap')
):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
```lua
function starship_transient_rprompt_func(prompt)
return io.popen("starship module time"):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
## Custom pre-prompt and pre-execution Commands in Cmd
Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements:
@ -185,6 +231,9 @@ Style strings are a list of words, separated by whitespace. The words are not ca
- `underline`
- `dimmed`
- `inverted`
- `blink`
- `hidden`
- `strikethrough`
- `bg:<color>`
- `fg:<color>`
- `<color>`
@ -201,3 +250,9 @@ A color specifier can be one of the following:
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
If multiple colors are specified for foreground/background, the last one in the string will take priority.
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
- Many terminals disable support for `blink` by default
- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564).
- `strikethrough` is not supported by the default macOS Terminal.app

View File

@ -144,6 +144,18 @@ format = '''
\$'''
```
### Negative matching
Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched.
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"]
```
## Prompt
This is the list of prompt-wide configuration options.
@ -201,11 +213,9 @@ $git_status\
$hg_branch\
$docker_context\
$package\
$buf\
$c\
$cmake\
$cobol\
$container\
$daml\
$dart\
$deno\
@ -228,6 +238,7 @@ $php\
$pulumi\
$purescript\
$python\
$raku\
$rlang\
$red\
$ruby\
@ -238,6 +249,7 @@ $terraform\
$vlang\
$vagrant\
$zig\
$buf\
$nix_shell\
$conda\
$spack\
@ -256,6 +268,7 @@ $jobs\
$battery\
$time\
$status\
$container\
$shell\
$character"""
```
@ -479,6 +492,45 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
symbol = "🦬 "
```
## Bun
The `bun` module shows the currently installed version of the [bun](https://bun.sh) JavaScript runtime. By default the module will be shown if any of the following conditions are met:
- The current directory contains a `bun.lockb` file
- The current directory contains a `bunfig.toml` 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 Node.js. |
| `detect_extensions` | `[]` | Which extensions 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. |
| `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` |
*: This variable can only be used as a part of a style string
### Example
```toml
# ~/.config/starship.toml
[bun]
format = "via [🍔 $version](bold green) "
```
## C
The `c` module shows some information about your C compiler. By default the module will be shown if the current directory contains a `.c` or `.h` file.
@ -1986,18 +2038,23 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
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.
:::
### Options
| Option | Default | Description |
| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
| `style` | `"cyan bold"` | The style for the module. |
| `context_aliases` | | Table of context aliases to display. |
| `user_aliases` | | Table of user aliases to display. |
| `disabled` | `true` | Disables the `kubernetes` module. |
| Option | Default | Description |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
| `style` | `"cyan bold"` | The style for the module. |
| `context_aliases` | | Table of context aliases to display. |
| `user_aliases` | | Table of user aliases to display. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `disabled` | `true` | Disables the `kubernetes` module. |
### Variables
@ -2029,6 +2086,16 @@ disabled = false
"root/.*" = "root"
```
Only show the module in directories that contain a `k8s` file.
```toml
# ~/.config/starship.toml
[kubernetes]
disabled = false
detect_files = ['k8s']
```
#### Regex Matching
Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
@ -2579,7 +2646,7 @@ By default the Pulumi version is not shown, since it takes an order of magnitude
By default the module will be shown if any of the following conditions are met:
- The current directory contains either `Pulumi.yaml` or `Pulumi.yml`
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml`
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` unless `search_upwards` is set to `false`
### Options
@ -2589,6 +2656,7 @@ By default the module will be shown if any of the following conditions are met:
| `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
@ -3158,22 +3226,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` | `|` | |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `disabled` | `true` | Disables the `status` module. |
| Option | Default | Description |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | The style for the module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Variables

View File

@ -8,6 +8,10 @@ This preset changes the format of all the built-in modules to show their segment
### Configuration
```sh
starship preset bracketed-segments > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/bracketed-segments.toml)
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml

View File

@ -12,6 +12,10 @@ This preset changes the symbols for each module to use Nerd Font symbols.
### Configuration
```sh
starship preset nerd-font-symbols > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/nerd-font-symbols.toml)
<<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml

View File

@ -8,6 +8,10 @@ This preset hides the version of language runtimes. If you work in containers or
### Configuration
```sh
starship preset no-runtime-versions > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/no-runtime-versions.toml)
<<< @/.vuepress/public/presets/toml/no-runtime-versions.toml

View File

@ -12,6 +12,10 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m
### Configuration
```sh
starship preset pastel-powerline > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/pastel-powerline.toml)
<<< @/.vuepress/public/presets/toml/pastel-powerline.toml

View File

@ -8,6 +8,10 @@ This preset changes the symbols for each module into plain text. Great if you do
### Configuration
```sh
starship preset plain-text-symbols > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/plain-text-symbols.toml)
<<< @/.vuepress/public/presets/toml/plain-text-symbols.toml

View File

@ -8,6 +8,10 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso
### Configuration
```sh
starship preset pure-preset > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/pure-preset.toml)
<<< @/.vuepress/public/presets/toml/pure-preset.toml

View File

@ -8,6 +8,52 @@ The configurations in this section are subject to change in future releases of S
:::
## TransientPrompt in PowerShell
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`.
By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do
```powershell
function Invoke-Starship-TransientFunction {
&starship module character
}
Invoke-Expression (&starship init powershell)
Enable-TransientPrompt
```
## TransientPrompt and TransientRightPrompt in Cmd
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <value>` where \<value\> can be one of:
- `always`: always replace the previous prompt
- `same_dir`: replace the previous prompt only if the working directory is same
- `off`: do not replace the prompt (i.e. turn off transience)
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
```lua
function starship_transient_prompt_func(prompt)
return io.popen("starship module character"
.." --keymap="..rl.getvariable('keymap')
):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
```lua
function starship_transient_rprompt_func(prompt)
return io.popen("starship module time"):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
## Custom pre-prompt and pre-execution Commands in Cmd
Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements:
@ -185,6 +231,9 @@ Style strings are a list of words, separated by whitespace. The words are not ca
- `underline`
- `dimmed`
- `inverted`
- `blink`
- `hidden`
- `strikethrough`
- `bg:<color>`
- `fg:<color>`
- `<color>`
@ -201,3 +250,9 @@ A color specifier can be one of the following:
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
If multiple colors are specified for foreground/background, the last one in the string will take priority.
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
- Many terminals disable support for `blink` by default
- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564).
- `strikethrough` is not supported by the default macOS Terminal.app

View File

@ -144,6 +144,18 @@ format = '''
\$'''
```
### Negative matching
Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched.
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"]
```
## Prompt
This is the list of prompt-wide configuration options.
@ -201,11 +213,9 @@ $git_status\
$hg_branch\
$docker_context\
$package\
$buf\
$c\
$cmake\
$cobol\
$container\
$daml\
$dart\
$deno\
@ -228,6 +238,7 @@ $php\
$pulumi\
$purescript\
$python\
$raku\
$rlang\
$red\
$ruby\
@ -238,6 +249,7 @@ $terraform\
$vlang\
$vagrant\
$zig\
$buf\
$nix_shell\
$conda\
$spack\
@ -256,6 +268,7 @@ $jobs\
$battery\
$time\
$status\
$container\
$shell\
$character"""
```
@ -479,6 +492,45 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
symbol = "🦬 "
```
## Bun
The `bun` module shows the currently installed version of the [bun](https://bun.sh) JavaScript runtime. By default the module will be shown if any of the following conditions are met:
- The current directory contains a `bun.lockb` file
- The current directory contains a `bunfig.toml` 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 Node.js. |
| `detect_extensions` | `[]` | Which extensions 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. |
| `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` |
*: This variable can only be used as a part of a style string
### Example
```toml
# ~/.config/starship.toml
[bun]
format = "via [🍔 $version](bold green) "
```
## C
The `c` module shows some information about your C compiler. By default the module will be shown if the current directory contains a `.c` or `.h` file.
@ -1986,18 +2038,23 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
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.
:::
### Options
| Option | Default | Description |
| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
| `style` | `"cyan bold"` | The style for the module. |
| `context_aliases` | | Table of context aliases to display. |
| `user_aliases` | | Table of user aliases to display. |
| `disabled` | `true` | Disables the `kubernetes` module. |
| Option | Default | Description |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
| `style` | `"cyan bold"` | The style for the module. |
| `context_aliases` | | Table of context aliases to display. |
| `user_aliases` | | Table of user aliases to display. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `disabled` | `true` | Disables the `kubernetes` module. |
### Variables
@ -2029,6 +2086,16 @@ disabled = false
"root/.*" = "root"
```
Only show the module in directories that contain a `k8s` file.
```toml
# ~/.config/starship.toml
[kubernetes]
disabled = false
detect_files = ['k8s']
```
#### Regex Matching
Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
@ -2579,7 +2646,7 @@ By default the Pulumi version is not shown, since it takes an order of magnitude
By default the module will be shown if any of the following conditions are met:
- The current directory contains either `Pulumi.yaml` or `Pulumi.yml`
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml`
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` unless `search_upwards` is set to `false`
### Options
@ -2589,6 +2656,7 @@ By default the module will be shown if any of the following conditions are met:
| `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
@ -3158,22 +3226,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` | `|` | |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `disabled` | `true` | Disables the `status` module. |
| Option | Default | Description |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | The style for the module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Variables

View File

@ -8,6 +8,10 @@ This preset changes the format of all the built-in modules to show their segment
### Configuration
```sh
starship preset bracketed-segments > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/bracketed-segments.toml)
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml

View File

@ -12,6 +12,10 @@ This preset changes the symbols for each module to use Nerd Font symbols.
### Configuration
```sh
starship preset nerd-font-symbols > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/nerd-font-symbols.toml)
<<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml

View File

@ -8,6 +8,10 @@ This preset hides the version of language runtimes. If you work in containers or
### Configuration
```sh
starship preset no-runtime-versions > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/no-runtime-versions.toml)
<<< @/.vuepress/public/presets/toml/no-runtime-versions.toml

View File

@ -12,6 +12,10 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m
### Configuration
```sh
starship preset pastel-powerline > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/pastel-powerline.toml)
<<< @/.vuepress/public/presets/toml/pastel-powerline.toml

View File

@ -8,6 +8,10 @@ This preset changes the symbols for each module into plain text. Great if you do
### Configuration
```sh
starship preset plain-text-symbols > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/plain-text-symbols.toml)
<<< @/.vuepress/public/presets/toml/plain-text-symbols.toml

View File

@ -8,6 +8,10 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso
### Configuration
```sh
starship preset pure-preset > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/pure-preset.toml)
<<< @/.vuepress/public/presets/toml/pure-preset.toml

View File

@ -8,6 +8,52 @@ Konfiguracja opisana w tej sekcji może ulec zmianie w przyszłych wydaniach Sta
:::
## TransientPrompt in PowerShell
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`.
By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do
```powershell
function Invoke-Starship-TransientFunction {
&starship module character
}
Invoke-Expression (&starship init powershell)
Enable-TransientPrompt
```
## TransientPrompt and TransientRightPrompt in Cmd
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <value>` where \<value\> can be one of:
- `always`: always replace the previous prompt
- `same_dir`: replace the previous prompt only if the working directory is same
- `off`: do not replace the prompt (i.e. turn off transience)
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
```lua
function starship_transient_prompt_func(prompt)
return io.popen("starship module character"
.." --keymap="..rl.getvariable('keymap')
):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
```lua
function starship_transient_rprompt_func(prompt)
return io.popen("starship module time"):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
## Custom pre-prompt and pre-execution Commands in Cmd
Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements:
@ -185,6 +231,9 @@ Style strings are a list of words, separated by whitespace. The words are not ca
- `underline`
- `dimmed`
- `inverted`
- `blink`
- `hidden`
- `strikethrough`
- `bg:<color>`
- `fg:<color>`
- `<color>`
@ -201,3 +250,9 @@ A color specifier can be one of the following:
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
If multiple colors are specified for foreground/background, the last one in the string will take priority.
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
- Many terminals disable support for `blink` by default
- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564).
- `strikethrough` is not supported by the default macOS Terminal.app

View File

@ -144,6 +144,18 @@ format = '''
\$'''
```
### Negative matching
Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched.
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"]
```
## Prompt
This is the list of prompt-wide configuration options.
@ -201,11 +213,9 @@ $git_status\
$hg_branch\
$docker_context\
$package\
$buf\
$c\
$cmake\
$cobol\
$container\
$daml\
$dart\
$deno\
@ -228,6 +238,7 @@ $php\
$pulumi\
$purescript\
$python\
$raku\
$rlang\
$red\
$ruby\
@ -238,6 +249,7 @@ $terraform\
$vlang\
$vagrant\
$zig\
$buf\
$nix_shell\
$conda\
$spack\
@ -256,6 +268,7 @@ $jobs\
$battery\
$time\
$status\
$container\
$shell\
$character"""
```
@ -479,6 +492,45 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
symbol = "🦬 "
```
## Bun
The `bun` module shows the currently installed version of the [bun](https://bun.sh) JavaScript runtime. By default the module will be shown if any of the following conditions are met:
- The current directory contains a `bun.lockb` file
- The current directory contains a `bunfig.toml` 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 Node.js. |
| `detect_extensions` | `[]` | Which extensions 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. |
| `disabled` | `false` | Disables the `bun` module. |
### Variables
| Zmienne | 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
### Example
```toml
# ~/.config/starship.toml
[bun]
format = "via [🍔 $version](bold green) "
```
## C
The `c` module shows some information about your C compiler. By default the module will be shown if the current directory contains a `.c` or `.h` file.
@ -1986,18 +2038,23 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
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.
:::
### Options
| Option | Default | Description |
| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
| `style` | `"cyan bold"` | The style for the module. |
| `context_aliases` | | Table of context aliases to display. |
| `user_aliases` | | Table of user aliases to display. |
| `disabled` | `true` | Disables the `kubernetes` module. |
| Option | Default | Description |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
| `style` | `"cyan bold"` | The style for the module. |
| `context_aliases` | | Table of context aliases to display. |
| `user_aliases` | | Table of user aliases to display. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `disabled` | `true` | Disables the `kubernetes` module. |
### Variables
@ -2029,6 +2086,16 @@ disabled = false
"root/.*" = "root"
```
Only show the module in directories that contain a `k8s` file.
```toml
# ~/.config/starship.toml
[kubernetes]
disabled = false
detect_files = ['k8s']
```
#### Regex Matching
Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
@ -2579,7 +2646,7 @@ By default the Pulumi version is not shown, since it takes an order of magnitude
By default the module will be shown if any of the following conditions are met:
- The current directory contains either `Pulumi.yaml` or `Pulumi.yml`
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml`
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` unless `search_upwards` is set to `false`
### Options
@ -2589,6 +2656,7 @@ By default the module will be shown if any of the following conditions are met:
| `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
@ -3158,22 +3226,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` | `|` | |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `disabled` | `true` | Disables the `status` module. |
| Option | Default | Description |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | The style for the module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Variables

View File

@ -8,6 +8,10 @@ Ta konfiguracja zmienia format wyświetlania wbudowanych modułów - zamiast dom
### Konfiguracja
```sh
starship preset bracketed-segments > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/bracketed-segments.toml)
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml

View File

@ -12,6 +12,10 @@ This preset changes the symbols for each module to use Nerd Font symbols.
### Konfiguracja
```sh
starship preset nerd-font-symbols > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/nerd-font-symbols.toml)
<<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml

View File

@ -8,6 +8,10 @@ This preset hides the version of language runtimes. If you work in containers or
### Konfiguracja
```sh
starship preset no-runtime-versions > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/no-runtime-versions.toml)
<<< @/.vuepress/public/presets/toml/no-runtime-versions.toml

View File

@ -12,6 +12,10 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m
### Konfiguracja
```sh
starship preset pastel-powerline > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/pastel-powerline.toml)
<<< @/.vuepress/public/presets/toml/pastel-powerline.toml

View File

@ -8,6 +8,10 @@ This preset changes the symbols for each module into plain text. Great if you do
### Konfiguracja
```sh
starship preset plain-text-symbols > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/plain-text-symbols.toml)
<<< @/.vuepress/public/presets/toml/plain-text-symbols.toml

View File

@ -8,6 +8,10 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso
### Konfiguracja
```sh
starship preset pure-preset > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/pure-preset.toml)
<<< @/.vuepress/public/presets/toml/pure-preset.toml

View File

@ -8,6 +8,52 @@ As configurações nesta seção estão sujeitas a alterações em futuras vers
:::
## TransientPrompt in PowerShell
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`.
By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do
```powershell
function Invoke-Starship-TransientFunction {
&starship module character
}
Invoke-Expression (&starship init powershell)
Enable-TransientPrompt
```
## TransientPrompt and TransientRightPrompt in Cmd
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <value>` where \<value\> can be one of:
- `always`: always replace the previous prompt
- `same_dir`: replace the previous prompt only if the working directory is same
- `off`: do not replace the prompt (i.e. turn off transience)
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
```lua
function starship_transient_prompt_func(prompt)
return io.popen("starship module character"
.." --keymap="..rl.getvariable('keymap')
):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
```lua
function starship_transient_rprompt_func(prompt)
return io.popen("starship module time"):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
## Comandos personalizados de pré-prompt e pré-execução no Cmd
O Clink fornece APIs extremamente flexíveis para executar comandos pré-prompt e pré-execução em Cmd shell. É bastante simples de usar com o Starship. Faça as seguintes alterações no seu arquivo `starship.lua` conforme suas necessidades:
@ -45,7 +91,7 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
- Para rodar uma função personalizada antes que um comando seja executado, você pode usar [`DEBUG` como mecanismo de armadilha](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). No entanto, você **deve** prender o sinal de DEBUG _antes_ de inicializar o Starship! O Starship consegue preservar o valor da armadilha DEBUG, mas se a armadilha for substituída depois do starship iniciar, algumas funções iram quebrar.
- Para rodar uma função personalizada antes que um comando seja executado, você pode usar [`DEBUG` como mecanismo de armadilha](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). No entanto, você **deve** capturar o sinal DEBUG _antes_ de inicializar o Starship! O Starship consegue preservar o valor da armadilha DEBUG, mas se a armadilha for substituída depois do starship iniciar, algumas funções iram quebrar.
```bash
function blastoff(){
@ -153,15 +199,15 @@ Gera um prompt parecido com o seguinte:
▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
```
## Prompt de Continução
## Prompt de Continuação
Algumas shells suportam prompt de continuação juntamento com o prompt normal. Este prompt é renderizado em vez do prompt normal quando o usuário insere um comando incompleto (Como um parentese ou aspas a esquerda).
Alguns shells suportam um prompt de continuação junto com o prompt normal. Esse prompt é renderizado em vez do prompt normal quando o usuário insere uma instrução incompleta (como um único parêntese esquerdo ou aspas).
O Starship consegue definir o prompt de continuação usando a opção `continuation_prompt`. O prompt padrão é `"[∙](bright-black) "`.
Starship pode definir o prompt de continuação usando a opção `continuation_prompt`. O prompt padrão é `"[∙](bright-black) "`.
Nota: `continuation_prompt` deve ser definido como uma string literal sem variáveis.
Nota: `continuation_prompt` deve ser definido como uma string literal sem nenhuma variável.
Nota: Prompt de continuação são disponíveis apenas nos shells a seguir:
Nota: os prompts de continuação estão disponíveis apenas nos seguintes shells:
- `bash`
- `zsh`
@ -170,9 +216,9 @@ Nota: Prompt de continuação são disponíveis apenas nos shells a seguir:
### Exemplo
```toml
#~/.config/starship.toml
# ~/.config/starship.toml
# Um prompt de continuação que mostra duas setas
# Um prompt de continuação que exibe duas setas preenchidas
continuation_prompt = "▶▶"
```
@ -185,6 +231,9 @@ Estilo de strings são uma lista de palavras, separadas por espaço. As palavras
- `underline`
- `dimmed`
- `inverted`
- `blink`
- `hidden`
- `strikethrough`
- `bg:<color>`
- `fg:<color>`
- `<color>`
@ -201,3 +250,9 @@ Um especialista em cores pode ser um dos seguintes:
- Um número entre 0-255. Este especifica um [Código de Cor ANSI 8 bits](https://i.stack.imgur.com/KTSQa.png).
Se múltiplas cores forem especificadas para foreground/background, a ultima da string que terá prioridade.
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
- Many terminals disable support for `blink` by default
- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564).
- `strikethrough` is not supported by the default macOS Terminal.app

View File

@ -144,6 +144,18 @@ format = '''
\$'''
```
### Negative matching
Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched.
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"]
```
## Prompt de Comando
Está é a lista de opções de configuração de prompt.
@ -201,11 +213,9 @@ $git_status\
$hg_branch\
$docker_context\
$package\
$buf\
$c\
$cmake\
$cobol\
$container\
$daml\
$dart\
$deno\
@ -228,6 +238,7 @@ $php\
$pulumi\
$purescript\
$python\
$raku\
$rlang\
$red\
$ruby\
@ -238,6 +249,7 @@ $terraform\
$vlang\
$vagrant\
$zig\
$buf\
$nix_shell\
$conda\
$spack\
@ -256,6 +268,7 @@ $jobs\
$battery\
$time\
$status\
$container\
$shell\
$character"""
```
@ -273,7 +286,7 @@ 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 de ambiente `AWS_VAULT` e o tempo de expiração de credenciais é lido da variável de ambiente `AWS_SESSION_EXPIRATION`.
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 [awsu](https://github.com/kreuzwerker/awsu) o perfil é lido da varável de env `AWSU_PROFILE`.
@ -479,6 +492,45 @@ O módulo `buf` mostra a versão instalada do [Buf](https://buf.build). Por padr
symbol = "🦬 "
```
## Bun
The `bun` module shows the currently installed version of the [bun](https://bun.sh) JavaScript runtime. Por padrão o módulo vai exibir se uma das condições a seguir for atendida:
- O diretório atual contem um arquivo `bun.lockb`
- O diretório atual contem um arquivo `bunfig.toml`
### 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. |
### Variáveis
| Variável | Exemplo | Descrição |
| --------- | -------- | --------------------------------- |
| version | `v0.1.4` | The version of `bun` |
| 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
[bun]
format = "via [🍔 $version](bold green) "
```
## C
O módulo `c` mostra algumas informações sobre o seu compilador de C. Por padrão o módulo será exibido se o diretório atual contém um arquivo `.c` ou `.h`.
@ -811,7 +863,7 @@ format = "via [✨ $version](bold blue) "
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. Por padrão o módulo vai exibir se uma das condições a seguir for atendida:
- The current directory contains a `daml.yaml` file
- O diretório atual contem um arquivo `daml.yaml`
### Opções
@ -1984,18 +2036,23 @@ Exibe o nome atual do [Kubernetes context](https://kubernetes.io/docs/concepts/c
Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para `false` no seu arquivo de configuração.
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.
:::
### Opções
| Opções | Padrão | Descrição |
| ----------------- | ---------------------------------------------------- | ------------------------------------------------------------- |
| `symbol` | `"☸ "` | Uma string que representa o simbolo exibido antes do Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | O formato do módulo. |
| `style` | `"cyan bold"` | O estilo do módulo. |
| `context_aliases` | | Tabela de aliases de contexto para exibir. |
| `user_aliases` | | Table of user aliases to display. |
| `disabled` | `true` | Desabilita o módulo `kubernetes`. |
| Opções | Padrão | Descrição |
| ------------------- | ---------------------------------------------------- | ------------------------------------------------------------- |
| `symbol` | `"☸ "` | Uma string que representa o simbolo exibido antes do Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | O formato do módulo. |
| `style` | `"cyan bold"` | O estilo do módulo. |
| `context_aliases` | | Tabela de aliases de contexto para exibir. |
| `user_aliases` | | Table of user aliases to display. |
| `detect_extensions` | `[]` | 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` | `true` | Desabilita o módulo `kubernetes`. |
### Variáveis
@ -2027,6 +2084,16 @@ disabled = false
"root/.*" = "root"
```
Only show the module in directories that contain a `k8s` file.
```toml
# ~/.config/starship.toml
[kubernetes]
disabled = false
detect_files = ['k8s']
```
#### Correspondência Regex
Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
@ -2037,14 +2104,14 @@ Nomes longos de clusters gerados automaticamente podem ser encurtados usando exp
```toml
[kubernetes.context_aliases]
# Os contextos OpenShift carregam o namespace e o usuário no contexto kube: `namespace/name/user`:
# Contexto do OpenShift carrega o namespace e usuário no contexto kube: `namespace/name/user`:
".*/openshift-cluster/.*" = "openshift"
# Ou melhor, renomear todos os clusters do OpenShift de uma só vez:
# Ou melhor, para renomear cada cluster OpenShift de uma vez:
".*/(?P<var_cluster>[\\w-]+)/.*" = "$var_cluster"
# Contextos do GKE, AWS e outros provedores de nuvem geralmente carregam informações adicionais, como a região/zona.
# A entrada a seguir corresponde ao formato do GKE (`gke_projectname_zone_cluster-name`)
# e renomeia cada contexto kube correspondente em um formato mais legível (`gke-cluster-name`):
# 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<var_cluster>[\\w-]+)" = "gke-$var_cluster"
```
@ -2239,7 +2306,7 @@ O módulo `nim` exibe a versão atual instalada do [Nim](https://nim-lang.org/).
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo |
| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"👑 "` | O símbolo usado antes de exibir a versão do Nim. |
| `symbol` | `"👑 "` | O simbolo 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. |
@ -2365,7 +2432,7 @@ O módulo `ocaml` exibe a versão atual instalada do [OCaml](https://ocaml.org/)
| ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| `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 simbolo usado antes de exibir a versão do OCaml. |
| `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. |
@ -2432,7 +2499,7 @@ symbol = "☁️ "
## Package Version
O módulo `package` é exibido quando o diretório atual é um repositorio para um pacote e exibe sua versão atual. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `python`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards`, `daml` and `dart` packages.
O módulo `package` é mostrado quando o diretório atual é o repositório de um pacote e mostra sua versão atual. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `python`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards`, `daml` and `dart` packages.
- [**npm**](https://docs.npmjs.com/cli/commands/npm) O versionamento de pacotes `npm` é extraído do `package.json` presente no diretório atual
- [**Cargo**](https://doc.rust-lang.org/cargo/) O versionamento de pacotes `cargo`é extraído do arquivo `Cargo.toml` presente no diretório atual
@ -2577,7 +2644,7 @@ Por padrão a versão do Pulumi não é exibida, pois leva um tempo maior para s
Por padrão o módulo vai exibir se uma das condições a seguir for atendida:
- O diretório atual tenha um arquivo `Pulumi.yaml` ou `Pulumi.yml`
- Um diretório pai que tenha um arquivo `Pulumi.yaml` ou `Pulumi.yml`
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` unless `search_upwards` is set to `false`
### Opções
@ -2587,6 +2654,7 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida:
| `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`. |
### Variáveis
@ -2634,7 +2702,7 @@ O módulo `purescript` exibe a versão atual instalada do [PureScript](https://w
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"<=> "` | O símbolo usado antes de exibir a versão do PureScript. |
| `symbol` | `"<=> "` | O simbolo 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. |
@ -2751,7 +2819,7 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"]
## R
O módulo `rlang` mostra a versão atualmente instalada do [R](https://www.r-project.org/). O módulo será mostrado se qualquer uma das seguintes condições for atendida:
O módulo `rlang` exibe a versão atual instalada do [R](https://www.r-project.org/). O módulo vai exibir se algumas das condições a seguir for atendida:
- O diretório atual tenha um arquivo com a extensão `.R`.
- O diretório atual tenha um arquivo com a extensão `.Rd`.
@ -2966,7 +3034,7 @@ O módulo `scala` exibe a versão atual instalada do [Scala](https://www.scala-l
| ------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------ |
| `format` | `"via [${symbol}(${version} )]($style)"` | O formato do módulo. |
| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["sbt", "scala"]` | Quais extensões devem ativar este módulo. |
| `detect_extensions` | `["sbt", "escala"]` | 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. |
@ -3156,22 +3224,23 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para
### Opções
| Opções | Padrão | Descrição |
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | O formato do módulo |
| `symbol` | `"✖"` | O simbolo exibido no erro de programa |
| `success_symbol` | `""` | O simbolo exibido no sucesso de programa |
| `not_executable_symbol` | `"🚫"` | O simbolo exibido quando o arquivo não é executável |
| `not_found_symbol` | `"🔍"` | O simbolo exibido quando o comando não é encontrado |
| `sigint_symbol` | `"🧱"` | O simbolo exibido no SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | O simbolo exibido em qualquer sinal |
| `style` | `"bold red"` | O estilo do módulo. |
| `recognize_signal_code` | `true` | Habilita o mapeamento de sinais para códigos de saída |
| `map_symbol` | `false` | Habilita o mapeamento de símbolos para códigos de saída |
| `pipestatus` | `false` | Habilita o relatório de pipestatus |
| `pipestatus_separator` | `|` | |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | O formato do módulo quando o comando é um pipeline |
| `disabled` | `true` | Desabilita o módulo `status`. |
| Opções | Padrão | Descrição |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | O formato do módulo |
| `symbol` | `"✖"` | O simbolo exibido no erro de programa |
| `success_symbol` | `""` | O simbolo exibido no sucesso de programa |
| `not_executable_symbol` | `"🚫"` | O simbolo exibido quando o arquivo não é executável |
| `not_found_symbol` | `"🔍"` | O simbolo exibido quando o comando não é encontrado |
| `sigint_symbol` | `"🧱"` | O simbolo exibido no SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | O simbolo exibido em qualquer sinal |
| `style` | `"bold red"` | O estilo do módulo. |
| `recognize_signal_code` | `true` | Habilita o mapeamento de sinais para códigos de saída |
| `map_symbol` | `false` | Habilita o mapeamento de símbolos para códigos de saída |
| `pipestatus` | `false` | Habilita o relatório de pipestatus |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | O formato do módulo quando o comando é um pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Desabilita o módulo `status`. |
### Variáveis
@ -3550,7 +3619,7 @@ format = "[🆅 $repo](bold blue) "
## Zig
Por padrão o módulo `zig` exibe a versão atual instalada do [Zig](https://ziglang.org/). O módulo será mostrado se alguma das seguintes condições for atendida:
Por padrão, o módulo `zig` mostra a versão atualmente instalada do [Zig](https://ziglang.org/). O módulo será mostrado se alguma das seguintes condições for atendida:
- O diretório atual contém arquivo com a extensão `.zig`
@ -3560,7 +3629,7 @@ Por padrão o módulo `zig` exibe a versão atual instalada do [Zig](https://zig
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"↯ "` | O simbolo usado antes de exibir a versão do Zig. |
| `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. |
@ -3588,9 +3657,9 @@ symbol = "⚡️ "
## Comandos Personalizados
O módulo `custom` exibe a saída de alguns comandos arbitrários.
Os módulos `custom` mostram a saída de alguns comandos arbitrários.
Este módulo vai ser exibir se algumas das condições a seguir for atendida:
Esses módulos serão mostrados se alguma das seguintes condições for atendida:
- O diretório atual contém um arquivo cujo nome está em `detect_files`
- O diretório atual contém um diretório cujo nome está em `detect_folders`
@ -3606,7 +3675,7 @@ Vários módulos personalizados podem ser definidos usando `.`.
::: tip
A ordem em que o módulo custom é exibido pode ser definido individualmente incluindo `${custom.foo}` em nilve superior `format` (pois inclui um ponto, você precisa usar `${...}`). Por padrão, o módulo `custom` mostrará todos os módulos personalizados na ordem em que eles foram definidos.
A ordem na qual os módulos personalizados são mostrados pode ser definida individualmente incluindo `${custom.foo}` no `format` de nível superior (como inclui um ponto, você precisa usar `${...}`). Por padrão, o módulo `custom` mostrará todos os módulos personalizados na ordem em que eles foram definidos.
:::

View File

@ -8,6 +8,10 @@ Esta configuração altera o formato de todos os módulos internos para mostrar
### Configuração
```sh
starship preset bracketed-segments > ~/.config/starship.toml
```
[Clique para baixar o TOML](/presets/toml/bracketed-segments.toml)
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml

View File

@ -12,6 +12,10 @@ Essa predefinição altera os símbolos para cada módulo usar símbolos com Ner
### Configuração
```sh
starship preset nerd-font-symbols > ~/.config/starship.toml
```
[Clique para baixar o TOML](/presets/toml/nerd-font-symbols.toml)
<<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml

View File

@ -8,6 +8,10 @@ Está personalização oculta a versão do runtime da linguagem. Se você trabal
### Configuração
```sh
starship preset no-runtime-versions > ~/.config/starship.toml
```
[Clique para baixar o TOML](/presets/toml/no-runtime-versions.toml)
<<< @/.vuepress/public/presets/toml/no-runtime-versions.toml

View File

@ -12,6 +12,10 @@ Esta personalização é inspirada em [M365Princess](https://github.com/JanDeDob
### Configuração
```sh
starship preset pastel-powerline > ~/.config/starship.toml
```
[Clique para baixar o TOML](/presets/toml/pastel-powerline.toml)
<<< @/.vuepress/public/presets/toml/pastel-powerline.toml

View File

@ -8,6 +8,10 @@ Essa personalização converte os símbolos para cada módulo em texto simples.
### Configuração
```sh
starship preset plain-text-symbols > ~/.config/starship.toml
```
[Clique para baixar o TOML](/presets/toml/plain-text-symbols.toml)
<<< @/.vuepress/public/presets/toml/plain-text-symbols.toml

Some files were not shown because too many files have changed in this diff Show More