mirror of
https://github.com/starship/starship.git
synced 2024-11-07 08:54:50 +01:00
docs(i18n): new Crowdin updates (#2884)
* New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Simplified) * New translations README.md (Russian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Russian) * New translations README.md (Portuguese) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Italian) * New translations README.md (Chinese Traditional) * New translations README.md (Spanish) * New translations README.md (Sorani (Kurdish)) * New translations README.md (French) * New translations README.md (Arabic) * New translations README.md (German) * New translations README.md (Japanese) * New translations README.md (Korean) * New translations README.md (French) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Russian) * New translations README.md (Portuguese) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Japanese) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Korean) * New translations README.md (Portuguese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Russian) * New translations README.md (Polish) * New translations README.md (French) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Sorani (Kurdish)) * New translations README.md (French) * New translations README.md (Korean) * New translations README.md (Portuguese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Russian) * New translations README.md (Polish) * New translations README.md (French) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Korean) * New translations README.md (Portuguese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Russian) * New translations README.md (Polish) * New translations README.md (French) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Russian) * New translations README.md (Korean) * New translations README.md (French) * New translations README.md (Spanish) * New translations README.md (Arabic) * New translations README.md (German) * New translations README.md (Italian) * New translations README.md (Japanese) * New translations README.md (Dutch) * New translations README.md (Polish) * New translations README.md (Portuguese) * New translations README.md (Turkish) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Traditional) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (French) * New translations README.md (Portuguese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Russian) * New translations README.md (Polish) * New translations README.md (Spanish) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (French) * New translations README.md (Spanish) * New translations README.md (Arabic) * New translations README.md (German) * New translations README.md (Italian) * New translations README.md (Japanese) * New translations README.md (Korean) * New translations README.md (Dutch) * New translations README.md (Polish) * New translations README.md (Portuguese) * New translations README.md (Russian) * New translations README.md (Turkish) * New translations README.md (Chinese Simplified) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Vietnamese) * New translations README.md (Korean) * New translations README.md (French) * New translations README.md (Spanish) * New translations README.md (Arabic) * New translations README.md (German) * New translations README.md (Italian) * New translations README.md (Japanese) * New translations README.md (Dutch) * New translations README.md (Polish) * New translations README.md (Portuguese) * New translations README.md (Russian) * New translations README.md (Turkish) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Traditional) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Turkish) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Turkish) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Turkish) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Korean) * New translations README.md (Portuguese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Russian) * New translations README.md (Polish) * New translations README.md (French) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Korean) * New translations README.md (Portuguese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Russian) * New translations README.md (Polish) * New translations README.md (French) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Italian)
This commit is contained in:
parent
3139c6b8a3
commit
91fe1b747f
@ -18,7 +18,7 @@ features:
|
||||
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: Cross-Shell Prompt"
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and PowerShell.
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, and PowerShell.
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
@ -116,6 +116,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: warning Only elvish v0.15 or higher is supported. :::
|
||||
@ -139,7 +140,8 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
||||
@ -151,3 +153,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
@ -73,6 +73,7 @@ starship_precmd_user_func="set_win_title"
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
|
@ -935,6 +935,7 @@ Example: following configuration will display value of USER environment variable
|
||||
[env_var.USER]
|
||||
default = "unknown user"
|
||||
```
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
@ -1123,15 +1124,15 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | The format for the module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ---------------------------------- | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash$tag\\)]($style) "` | The format for the module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -1245,6 +1246,7 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
| `ahead` | `"⇡"` | The format of `ahead` |
|
||||
| `behind` | `"⇣"` | The format of `behind` |
|
||||
| `diverged` | `"⇕"` | The format of `diverged` |
|
||||
| `up_to_date` | `""` | The format of `up_to_date` |
|
||||
| `untracked` | `"?"` | The format of `untracked` |
|
||||
| `stashed` | `"$"` | The format of `stashed` |
|
||||
| `modified` | `"!"` | The format of `modified` |
|
||||
@ -1258,18 +1260,18 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
| Variable | Description |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
@ -1296,6 +1298,7 @@ conflicted = "🏳"
|
||||
ahead = "🏎💨"
|
||||
behind = "😰"
|
||||
diverged = "😵"
|
||||
up_to_date = "✓"
|
||||
untracked = "🤷"
|
||||
stashed = "📦"
|
||||
modified = "📝"
|
||||
@ -1641,6 +1644,29 @@ format = 'on [⛵ $context \($namespace\)](dimmed green) '
|
||||
disabled = false
|
||||
[kubernetes.context_aliases]
|
||||
"dev.local.cluster.k8s" = "dev"
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
#### Regex Matching
|
||||
|
||||
Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions.
|
||||
|
||||
The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
|
||||
|
||||
Long and automatically generated cluster names can be identified and shortened using regular expressions:
|
||||
|
||||
```toml
|
||||
[kubernetes.context_aliases]
|
||||
# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
# Or better, to rename every OpenShift cluster at once:
|
||||
".*/(?P<cluster>[\\w-]+)/.*" = "$cluster"
|
||||
|
||||
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
|
||||
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
|
||||
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
## Line Break
|
||||
@ -2000,6 +2026,7 @@ The `package` module is shown when the current directory is the repository for a
|
||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||
@ -2013,13 +2040,14 @@ The `package` module is shown when the current directory is the repository for a
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------------- | --------------------------------- | ---------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `style` | `"bold 208"` | The style for the module. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------------- | --------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `style` | `"bold 208"` | The style for the module. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2187,7 +2215,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `style` | `"yellow bold"` | The style for the module. |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
|
||||
| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `detect_extensions` | `["py"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -2468,6 +2496,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
@ -2500,7 +2529,7 @@ The `shlvl` module shows the current `SHLVL` ("shell level") environment variabl
|
||||
| ----------- | ---------------------------- | ------------------------------------------------------------- |
|
||||
| `threshold` | `2` | Display threshold. |
|
||||
| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `shlvl` module. |
|
||||
@ -2572,31 +2601,36 @@ 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 |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `disabled` | `true` | Disables the `status` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `format` | `"[$symbol$status]($style) "` | The format of the module |
|
||||
| `symbol` | `"✖"` | The symbol displayed on program error |
|
||||
| `success_symbol` | `"✔️"` | The symbol displayed on program success |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `pipestatus` | `false` | Enable pipestatus reporting |
|
||||
| `pipestatus_separator` | `|` | The symbol that separate in pipe program exit codes |
|
||||
| `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. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------------- | ------- | -------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
| Variable | Example | Description |
|
||||
| -------------- | ------- | ------------------------------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
|
@ -264,6 +264,17 @@
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Nushell
|
||||
|
||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
@ -110,7 +110,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
@ -362,3 +362,94 @@ symbol = "scala "
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
## Hide 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/hide-runtime-versions.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dart]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[deno]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dotnet]
|
||||
format = "[$symbol(🎯 $tfm )]($style)"
|
||||
|
||||
[elixir]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[elm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[erlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[golang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[helm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[julia]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[kotlin]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[lua]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nim]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nodejs]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ocaml]
|
||||
format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)'
|
||||
|
||||
[perl]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[red]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ruby]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rust]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[swift]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vagrant]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
@ -18,7 +18,7 @@ features:
|
||||
footer: لەژێر مۆڵەتی ISCـە | مافی پارێزراوە © 2019-ئێستا بەژداریکەرانی Starship
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: یەکێ لە Promptـە شێڵ نەناسەکان"
|
||||
description: 'Starship: یەکێ لە promptـە سوکەڵە، خێرا، و بێسنور دڵخوازکراوەکان بۆ هەر شێڵێک! ئەو زانیارییانە پشان دەدات کە پێویستە، لەوکاتەیا بە ئارامی و سوکەڵەیی ئەمێنێتەوە. دامەزراندنی خێرا بەردەستە بۆ Bash, Fish, ZSH, Ion و PowerShell.'
|
||||
description: 'Starship: یەکێ لە promptـە سوکەڵە، خێرا، و بێسنور دڵخوازکراوەکان بۆ هەر شێڵێک! ئەو زانیارییانە پشان دەدات کە پێویستە، لەوکاتەیا بە ئارامی و سوکەڵەیی ئەمێنێتەوە. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, and PowerShell.'
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
@ -116,6 +116,7 @@ description: 'Starship: یەکێ لە promptـە سوکەڵە، خێرا، و ب
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: ئاگادارکردنەوە تەنها elvish v0.15 یان بەرزتر پشتگیری کراوە. :::
|
||||
@ -139,7 +140,8 @@ description: 'Starship: یەکێ لە promptـە سوکەڵە، خێرا، و ب
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
||||
@ -151,3 +153,14 @@ description: 'Starship: یەکێ لە promptـە سوکەڵە، خێرا، و ب
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
@ -73,6 +73,7 @@ starship_precmd_user_func="set_win_title"
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
|
@ -935,6 +935,7 @@ Example: following configuration will display value of USER environment variable
|
||||
[env_var.USER]
|
||||
default = "unknown user"
|
||||
```
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
@ -1123,15 +1124,15 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | The format for the module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ---------------------------------- | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash$tag\\)]($style) "` | The format for the module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -1245,6 +1246,7 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
| `ahead` | `"⇡"` | The format of `ahead` |
|
||||
| `behind` | `"⇣"` | The format of `behind` |
|
||||
| `diverged` | `"⇕"` | The format of `diverged` |
|
||||
| `up_to_date` | `""` | The format of `up_to_date` |
|
||||
| `untracked` | `"?"` | The format of `untracked` |
|
||||
| `stashed` | `"$"` | The format of `stashed` |
|
||||
| `modified` | `"!"` | The format of `modified` |
|
||||
@ -1258,18 +1260,18 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
| Variable | Description |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
@ -1296,6 +1298,7 @@ conflicted = "🏳"
|
||||
ahead = "🏎💨"
|
||||
behind = "😰"
|
||||
diverged = "😵"
|
||||
up_to_date = "✓"
|
||||
untracked = "🤷"
|
||||
stashed = "📦"
|
||||
modified = "📝"
|
||||
@ -1641,6 +1644,29 @@ format = 'on [⛵ $context \($namespace\)](dimmed green) '
|
||||
disabled = false
|
||||
[kubernetes.context_aliases]
|
||||
"dev.local.cluster.k8s" = "dev"
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
#### Regex Matching
|
||||
|
||||
Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions.
|
||||
|
||||
The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
|
||||
|
||||
Long and automatically generated cluster names can be identified and shortened using regular expressions:
|
||||
|
||||
```toml
|
||||
[kubernetes.context_aliases]
|
||||
# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
# Or better, to rename every OpenShift cluster at once:
|
||||
".*/(?P<cluster>[\\w-]+)/.*" = "$cluster"
|
||||
|
||||
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
|
||||
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
|
||||
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
## Line Break
|
||||
@ -2000,6 +2026,7 @@ The `package` module is shown when the current directory is the repository for a
|
||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||
@ -2013,13 +2040,14 @@ The `package` module is shown when the current directory is the repository for a
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------------- | --------------------------------- | ---------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `style` | `"bold 208"` | The style for the module. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------------- | --------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `style` | `"bold 208"` | The style for the module. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2187,7 +2215,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `style` | `"yellow bold"` | The style for the module. |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
|
||||
| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `detect_extensions` | `["py"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -2468,6 +2496,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
@ -2500,7 +2529,7 @@ The `shlvl` module shows the current `SHLVL` ("shell level") environment variabl
|
||||
| ----------- | ---------------------------- | ------------------------------------------------------------- |
|
||||
| `threshold` | `2` | Display threshold. |
|
||||
| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `shlvl` module. |
|
||||
@ -2572,31 +2601,36 @@ 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 |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `disabled` | `true` | Disables the `status` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `format` | `"[$symbol$status]($style) "` | The format of the module |
|
||||
| `symbol` | `"✖"` | The symbol displayed on program error |
|
||||
| `success_symbol` | `"✔️"` | The symbol displayed on program success |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `pipestatus` | `false` | Enable pipestatus reporting |
|
||||
| `pipestatus_separator` | `|` | The symbol that separate in pipe program exit codes |
|
||||
| `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. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------------- | ------- | -------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
| Variable | Example | Description |
|
||||
| -------------- | ------- | ------------------------------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
|
@ -260,6 +260,17 @@
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Nushell
|
||||
|
||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
@ -110,7 +110,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
@ -362,3 +362,94 @@ symbol = "scala "
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
## Hide 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/hide-runtime-versions.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dart]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[deno]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dotnet]
|
||||
format = "[$symbol(🎯 $tfm )]($style)"
|
||||
|
||||
[elixir]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[elm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[erlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[golang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[helm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[julia]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[kotlin]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[lua]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nim]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nodejs]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ocaml]
|
||||
format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)'
|
||||
|
||||
[perl]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[red]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ruby]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rust]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[swift]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vagrant]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
@ -18,7 +18,7 @@ features:
|
||||
footer: ICS lizenziert | Copyright © 2019-heute Starship-Mitwirkende
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: Cross-Shell Prompt"
|
||||
description: Starship ist eine minimale, super schnelle, und extrem anpassbare Prompt für jede Shell! Shows the information you need, while staying sleek and minimal. Schnellinstallation verfügbar für Bash, Fish, ZSH, Ion und PowerShell.
|
||||
description: Starship ist eine minimale, super schnelle, und extrem anpassbare Prompt für jede Shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, and PowerShell.
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
@ -116,6 +116,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: warning Only elvish v0.15 or higher is supported. :::
|
||||
@ -139,7 +140,8 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
||||
@ -151,3 +153,14 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
@ -73,6 +73,7 @@ starship_precmd_user_func="set_win_title"
|
||||
Style-String sind Wortlisten, getrennt durch Leerzeichen. Die Wörter haben keine Groß- und Kleinschreibung (z.B. `bold` und `BoLd` werden als dieselbe Zeichenkette betrachtet). Jedes Wort kann eines der folgenden sein:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
|
@ -935,6 +935,7 @@ Example: following configuration will display value of USER environment variable
|
||||
[env_var.USER]
|
||||
default = "unknown user"
|
||||
```
|
||||
:::
|
||||
|
||||
### Optionen
|
||||
|
||||
@ -1079,7 +1080,7 @@ asia-northeast1 = "an1"
|
||||
|
||||
## Git-Branch
|
||||
|
||||
Das `git_branch`-Modul zeigt den aktiven Git-Branch des Repositories im aktuellen Verzeichnis an.
|
||||
The `git_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### Optionen
|
||||
|
||||
@ -1123,15 +1124,15 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
|
||||
|
||||
### Optionen
|
||||
|
||||
| Option | Standardwert | Beschreibung |
|
||||
| -------------------- | ------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | The format for the module. |
|
||||
| `style` | `"bold green"` | Stil für dieses Modul. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
| Option | Standardwert | Beschreibung |
|
||||
| -------------------- | ---------------------------------- | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash$tag\\)]($style) "` | The format for the module. |
|
||||
| `style` | `"bold green"` | Stil für dieses Modul. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -1198,7 +1199,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
|
||||
|
||||
::: Tipp
|
||||
|
||||
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1245,6 +1246,7 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
| `ahead` | `"⇡"` | The format of `ahead` |
|
||||
| `behind` | `"⇣"` | The format of `behind` |
|
||||
| `diverged` | `"⇕"` | The format of `diverged` |
|
||||
| `up_to_date` | `""` | The format of `up_to_date` |
|
||||
| `untracked` | `"?"` | The format of `untracked` |
|
||||
| `stashed` | `"$"` | The format of `stashed` |
|
||||
| `modified` | `"!"` | The format of `modified` |
|
||||
@ -1252,24 +1254,24 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
| `renamed` | `"»"` | The format of `renamed` |
|
||||
| `deleted` | `"✘"` | The format of `deleted` |
|
||||
| `style` | `"bold red"` | Stil für dieses Modul. |
|
||||
| `disabled` | `false` | Deaktiviert das `git_status`-Modul. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Variable | Beschreibung |
|
||||
| -------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
| Variable | Beschreibung |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
@ -1296,6 +1298,7 @@ conflicted = "🏳"
|
||||
ahead = "🏎💨"
|
||||
behind = "😰"
|
||||
diverged = "😵"
|
||||
up_to_date = "✓"
|
||||
untracked = "🤷"
|
||||
stashed = "📦"
|
||||
modified = "📝"
|
||||
@ -1401,7 +1404,7 @@ format = "via [⎈ $version](bold white) "
|
||||
|
||||
## Hostname
|
||||
|
||||
Das `hostname`-Modul zeigt den Hostnamen des Systems an.
|
||||
The `hostname` module shows the system hostname.
|
||||
|
||||
### Optionen
|
||||
|
||||
@ -1606,7 +1609,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
|
||||
|
||||
::: Tipp
|
||||
|
||||
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1641,11 +1644,34 @@ format = 'on [⛵ $context \($namespace\)](dimmed green) '
|
||||
disabled = false
|
||||
[kubernetes.context_aliases]
|
||||
"dev.local.cluster.k8s" = "dev"
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
#### Regex Matching
|
||||
|
||||
Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions.
|
||||
|
||||
The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
|
||||
|
||||
Long and automatically generated cluster names can be identified and shortened using regular expressions:
|
||||
|
||||
```toml
|
||||
[kubernetes.context_aliases]
|
||||
# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
# Or better, to rename every OpenShift cluster at once:
|
||||
".*/(?P<cluster>[\\w-]+)/.*" = "$cluster"
|
||||
|
||||
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
|
||||
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
|
||||
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
## Zeilenumbruch
|
||||
|
||||
Das `line_break`-Modul unterteilt den Prompt in zwei Zeilen.
|
||||
The `line_break` module separates the prompt into two lines.
|
||||
|
||||
### Optionen
|
||||
|
||||
@ -1705,13 +1731,13 @@ format = "via [🌕 $version](bold blue) "
|
||||
|
||||
## Speicherauslastung
|
||||
|
||||
Das `memory_usage` Modul zeigt den aktuellen Systemspeicher und die swap-Nutzung an.
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
|
||||
Standardmäßig wird die swap-Nutzung angezeigt, wenn der gesamte System-swap nicht Null ist.
|
||||
By default the swap usage is displayed if the total system swap is non-zero.
|
||||
|
||||
::: Tipp
|
||||
|
||||
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1830,7 +1856,7 @@ symbol = "🎣 "
|
||||
|
||||
## Nix-Shell
|
||||
|
||||
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. Das Modul wird angezeigt, wenn es sich in einer nix-Shell-Umgebung befindet.
|
||||
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment.
|
||||
|
||||
### Optionen
|
||||
|
||||
@ -1994,12 +2020,13 @@ symbol = "☁️ "
|
||||
|
||||
## Paketversion
|
||||
|
||||
Das `Package` Modul wird angezeigt, wenn das aktuelle Verzeichnis das Repository für ein Paket ist, und zeigt dessen aktuelle Version an. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
|
||||
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||
@ -2013,13 +2040,14 @@ Das `Package` Modul wird angezeigt, wenn das aktuelle Verzeichnis das Repository
|
||||
|
||||
### Optionen
|
||||
|
||||
| Option | Standardwert | Beschreibung |
|
||||
| ----------------- | --------------------------------- | --------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | Symbol das vor der Paketversion angezeigt wird. |
|
||||
| `style` | `"bold 208"` | Stil für dieses Modul. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Deaktiviert das `package`-Modul. |
|
||||
| Option | Standardwert | Beschreibung |
|
||||
| ----------------- | --------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | Symbol das vor der Paketversion angezeigt wird. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `style` | `"bold 208"` | Stil für dieses Modul. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2187,7 +2215,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `style` | `"yellow bold"` | Stil für dieses Modul. |
|
||||
| `pyenv_version_name` | `false` | Verwende `pyenv` um die Python-Versionzu beziehen. |
|
||||
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
|
||||
| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `detect_extensions` | `["py"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -2292,7 +2320,7 @@ format = "with [📐 $version](blue bold) "
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with `.red` or `.reds` extension
|
||||
|
||||
@ -2330,7 +2358,7 @@ symbol = "🔴 "
|
||||
|
||||
## Ruby
|
||||
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- Das aktuelle Verzeichnis enthält eine `Gemfile`-Datei
|
||||
- The current directory contains a `.ruby-version` file
|
||||
@ -2370,7 +2398,7 @@ symbol = "🔺 "
|
||||
|
||||
## Rust
|
||||
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- Das aktuelle Verzeichnis enthält eine `Cargo.toml`-Datei
|
||||
- Das aktuelle Verzeichnis enthält eine Datei mit der `.rs`-Erweiterung
|
||||
@ -2453,7 +2481,7 @@ The `shell` module shows an indicator for currently used shell.
|
||||
|
||||
::: Tipp
|
||||
|
||||
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2468,6 +2496,7 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
@ -2500,7 +2529,7 @@ The `shlvl` module shows the current `SHLVL` ("shell level") environment variabl
|
||||
| ----------- | ---------------------------- | ------------------------------------------------------------- |
|
||||
| `threshold` | `2` | Display threshold. |
|
||||
| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. |
|
||||
| `style` | `"bold yellow"` | Stil für dieses Modul. |
|
||||
| `disabled` | `true` | Disables the `shlvl` module. |
|
||||
@ -2564,7 +2593,7 @@ The `status` module displays the exit code of the previous command. The module w
|
||||
|
||||
::: Tipp
|
||||
|
||||
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2572,31 +2601,36 @@ 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 |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | Stil für dieses Modul. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `disabled` | `true` | Disables the `status` module. |
|
||||
| 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` | `|` | The symbol that separate in pipe program exit codes |
|
||||
| `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. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Beispiel | Beschreibung |
|
||||
| -------------- | -------- | -------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
| Variable | Beispiel | Beschreibung |
|
||||
| -------------- | -------- | ------------------------------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
@ -2617,7 +2651,7 @@ disabled = false
|
||||
|
||||
## Swift
|
||||
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `Package.swift` file
|
||||
- The current directory contains a file with the `.swift` extension
|
||||
@ -2715,11 +2749,11 @@ format = "[🏎💨 $workspace]($style) "
|
||||
|
||||
## Zeit
|
||||
|
||||
Das `time` Modul zeigt die aktuelle **lokale** Zeit an. Der `format` Wert wird von der crate [`chrono`](https://crates.io/crates/chrono) benutzt um die Zeit zu formatieren. Schau dir [die chrono strftime Dokumentation](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) an, um die möglichen Optionen zu sehen.
|
||||
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
|
||||
|
||||
::: Tipp
|
||||
|
||||
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2735,7 +2769,7 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis
|
||||
| `disabled` | `true` | Deaktiviert das `time`-Modul. |
|
||||
| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
|
||||
|
||||
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Ansonsten ist der Standardwert hierfür `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
|
||||
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2761,7 +2795,7 @@ time_range = "10:00:00-14:00:00"
|
||||
|
||||
## Benutzername
|
||||
|
||||
Das Modul `username` zeigt den Benutzernamen des aktiven Benutzers. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- Der aktuelle Benutzer ist root
|
||||
- Der aktuelle Benutzer ist nicht derjenige, der derzeit angemeldet ist
|
||||
@ -2910,7 +2944,7 @@ format = "[🆅 $repo](bold blue) "
|
||||
|
||||
## Zig
|
||||
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
|
@ -264,6 +264,17 @@
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Nushell
|
||||
|
||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
@ -110,7 +110,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
@ -362,3 +362,94 @@ symbol = "scala "
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
## Hide 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/hide-runtime-versions.png)
|
||||
|
||||
### Konfiguration
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dart]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[deno]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dotnet]
|
||||
format = "[$symbol(🎯 $tfm )]($style)"
|
||||
|
||||
[elixir]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[elm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[erlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[golang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[helm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[julia]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[kotlin]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[lua]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nim]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nodejs]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ocaml]
|
||||
format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)'
|
||||
|
||||
[perl]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[red]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ruby]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rust]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[swift]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vagrant]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
@ -18,7 +18,7 @@ features:
|
||||
footer: Bajo una licencia ISC | Derechos de autor © 2019-presente Colaboradores de Starship
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: el prompt multi-intérprete"
|
||||
description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente personalizable para cualquier intérprete de comandos! Muestra la información que necesitas, a la par que es elegante y minimalista. Instalación rápida disponible para Bash, Fish, ZSH, Ion y PowerShell.'
|
||||
description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente personalizable para cualquier intérprete de comandos! Muestra la información que necesitas, a la par que es elegante y minimalista. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, and PowerShell.'
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
@ -116,6 +116,7 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: advertencia Solo se admite Elvish v0.15 o superior. :::
|
||||
@ -139,7 +140,8 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
||||
@ -151,3 +153,14 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
@ -73,6 +73,7 @@ starship_precmd_user_func="set_win_title"
|
||||
Las cadenas de estilo son una lista de palabras, separadas por espacios en blanco. Las palabras no son sensibles a mayúsculas (es decir, `bold` y `BoLd` se consideran la misma cadena). Cada palabra puede ser una de las siguientes:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
|
@ -934,6 +934,7 @@ Example: following configuration will display value of USER environment variable
|
||||
[env_var.USER]
|
||||
default = "unknown user"
|
||||
```
|
||||
:::
|
||||
|
||||
### Opciones
|
||||
|
||||
@ -1017,7 +1018,7 @@ format = "via [e $version](bold red) "
|
||||
|
||||
## Google Cloud (`gcloud`)
|
||||
|
||||
El módulo `gcloud` muestra la configuración actual para el CLI de [`gcloud`](https://cloud.google.com/sdk/gcloud). Esto se basa en el archivo `~/.config/gcloud/active_config`, el archivo `~/.config/gcloud/configurations/config_{CONFIG NAME}` y la variable de entorno `CLOUDSDK_CONFIG`.
|
||||
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
||||
|
||||
### Opciones
|
||||
|
||||
@ -1078,7 +1079,7 @@ asia-northeast1 = "an1"
|
||||
|
||||
## Git Branch
|
||||
|
||||
El módulo `git_branch` muestra la rama activa del repositorio en tu directorio actual.
|
||||
The `git_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### Opciones
|
||||
|
||||
@ -1118,19 +1119,19 @@ truncation_symbol = ""
|
||||
|
||||
## Git commit
|
||||
|
||||
El módulo `git_commit` muestra el hash de la confirmación actual y también la etiqueta (si existe) del repositorio en su directorio actual.
|
||||
The `git_commit` module shows the current commit hash and also the tag (if any) of the repo in your current directory.
|
||||
|
||||
### Opciones
|
||||
|
||||
| Opción | Por defecto | Descripción |
|
||||
| -------------------- | ------------------------------------------------------ | -------------------------------------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | La longitud del hash de la confirmación de git mostrado. |
|
||||
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | El formato del módulo. |
|
||||
| `style` | `"bold green"` | El estilo del módulo. |
|
||||
| `only_detached` | `true` | Mostrar solo el hash 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`. |
|
||||
| Opción | Por defecto | Descripción |
|
||||
| -------------------- | ---------------------------------- | -------------------------------------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | La longitud del hash de la confirmación de git mostrado. |
|
||||
| `format` | `"[\\($hash$tag\\)]($style) "` | El formato del módulo. |
|
||||
| `style` | `"bold green"` | El estilo del módulo. |
|
||||
| `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`. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -1153,7 +1154,7 @@ tag_symbol = "🔖 "
|
||||
|
||||
## Git State
|
||||
|
||||
El módulo `git_state` se mostrará en directorios que son parte de un repositorio git, y donde hay una operación en curso, tales como: _REBASING_, _BISECTING_, etc. Si hay información de progreso (por ejemplo, REBASING 3/10), esa información será mostrada también.
|
||||
The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
|
||||
|
||||
### Opciones
|
||||
|
||||
@ -1197,7 +1198,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
|
||||
|
||||
::: consejo
|
||||
|
||||
Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1233,7 +1234,7 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
|
||||
## Git status
|
||||
|
||||
El módulo `git_status` muestra símbolos que representan el estado del repositorio en su directorio actual.
|
||||
The `git_status` module shows symbols representing the state of the repo in your current directory.
|
||||
|
||||
### Opciones
|
||||
|
||||
@ -1244,42 +1245,43 @@ El módulo `git_status` muestra símbolos que representan el estado del reposito
|
||||
| `ahead` | `"⇡"` | El formato de `ahead` |
|
||||
| `behind` | `"⇣"` | El formato de `behind` |
|
||||
| `diverged` | `"⇕"` | El formato de `diverged` |
|
||||
| `untracked` | `"?"` | El formato de `untracked` |
|
||||
| `stashed` | `"$"` | El formato de `stashed` |
|
||||
| `modified` | `"!"` | El formato de `modified` |
|
||||
| `staged` | `"+"` | El formato de `staged` |
|
||||
| `renamed` | `"»"` | El formato de `renamed` |
|
||||
| `deleted` | `"✘"` | El formato de `deleted` |
|
||||
| `up_to_date` | `""` | The format of `up_to_date` |
|
||||
| `untracked` | `"?"` | The format of `untracked` |
|
||||
| `stashed` | `"$"` | The format of `stashed` |
|
||||
| `modified` | `"!"` | The format of `modified` |
|
||||
| `staged` | `"+"` | The format of `staged` |
|
||||
| `renamed` | `"»"` | The format of `renamed` |
|
||||
| `deleted` | `"✘"` | The format of `deleted` |
|
||||
| `style` | `"bold red"` | El estilo del módulo. |
|
||||
| `disabled` | `false` | Desactiva el módulo `git_status`. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
Las siguientes variables se pueden utilizar en `format`:
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Variable | Descripción |
|
||||
| -------------- | -------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Atajo para `$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Muestra la cadena de formato de `diverged` `ahead` o `behind` basado en el estado actual del repositorio |
|
||||
| `conflicted` | Muestra `conflicted` cuando esta rama tiene conflictos de fusión. |
|
||||
| `untracked` | Muestra `untracked` cuando hay archivos sin rastrear en el directorio de trabajo. |
|
||||
| `stashed` | Muestra `stashed` cuando existe un "stash" para el repositorio local. |
|
||||
| `modified` | Muestra `modified` cuando hay modificaciones de archivo en el directorio de trabajo. |
|
||||
| `staged` | Muestra `staged` cuando se ha añadido un nuevo archivo al área de "stash". |
|
||||
| `renamed` | Muestra `renamed` cuando un archivo renombrado ha sido añadido al área de "stash". |
|
||||
| `deleted` | Muestra `deleted` cuando un archivo ha sido añadido al área de "stash". |
|
||||
| style\* | Refleja el valor de la opción `style` |
|
||||
| Variable | Descripción |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Atajo para `$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `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
|
||||
|
||||
Las siguientes variables pueden ser usadas en `diverged`:
|
||||
The following variables can be used in `diverged`:
|
||||
|
||||
| Variable | Descripción |
|
||||
| -------------- | ------------------------------------------------------- |
|
||||
| `ahead_count` | Número de commits por delante de la rama de seguimiento |
|
||||
| `behind_count` | Número de commits detrás de la rama de seguimiento |
|
||||
|
||||
Las siguientes variales pueden ser usadas en `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` y `deleted`:
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`:
|
||||
|
||||
| Variable | Descripción |
|
||||
| -------- | ----------------------------- |
|
||||
@ -1295,6 +1297,7 @@ conflicted = "🏳"
|
||||
ahead = "🏎💨"
|
||||
behind = "😰"
|
||||
diverged = "😵"
|
||||
up_to_date = "✓"
|
||||
untracked = "🤷"
|
||||
stashed = "📦"
|
||||
modified = "📝"
|
||||
@ -1303,7 +1306,7 @@ renamed = "👅"
|
||||
deleted = "🗑"
|
||||
```
|
||||
|
||||
Mostrar el recuento delante/detrás de la rama que está siendo rastreada
|
||||
Show ahead/behind count of the branch being tracked
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
@ -1400,7 +1403,7 @@ format = "via [⎈ $version](bold white) "
|
||||
|
||||
## Hostname
|
||||
|
||||
El módulo `hostname` muestra el nombre de host del sistema.
|
||||
The `hostname` module shows the system hostname.
|
||||
|
||||
### Opciones
|
||||
|
||||
@ -1474,7 +1477,7 @@ symbol = "🌟 "
|
||||
|
||||
## Jobs
|
||||
|
||||
El módulo `jobs` muestra el número actual de tareas en ejecución. El módulo se mostrará sólo si hay tareas en segundo plano ejecutándose. El módulo mostrará el número de tareas en ejecución si hay más de 1 tarea o más que el valor configurado de `threshold`, si existe. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
|
||||
::: aviso
|
||||
|
||||
@ -1601,11 +1604,11 @@ kotlin_binary = "kotlinc"
|
||||
|
||||
## Kubernetes
|
||||
|
||||
Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace from the kubeconfig file. El espacio de nombres necesita establecerse en el archivo kubeconfig, esto puede hacerse mediante `kubectl config set-context starship-cluster --namespace astronaut`. Si se establece la variable de entorno `$KUBECONFIG`, el módulo usará eso si no usará el `~/.kube/config`.
|
||||
Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
|
||||
|
||||
::: consejo
|
||||
|
||||
Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1640,11 +1643,34 @@ format = 'on [⛵ $context \($namespace\)](dimmed green) '
|
||||
disabled = false
|
||||
[kubernetes.context_aliases]
|
||||
"dev.local.cluster.k8s" = "dev"
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
#### Regex Matching
|
||||
|
||||
Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions.
|
||||
|
||||
The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
|
||||
|
||||
Long and automatically generated cluster names can be identified and shortened using regular expressions:
|
||||
|
||||
```toml
|
||||
[kubernetes.context_aliases]
|
||||
# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
# Or better, to rename every OpenShift cluster at once:
|
||||
".*/(?P<cluster>[\\w-]+)/.*" = "$cluster"
|
||||
|
||||
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
|
||||
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
|
||||
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
## Salto de línea
|
||||
|
||||
El módulo `line_break` separa el indicador en dos líneas.
|
||||
The `line_break` module separates the prompt into two lines.
|
||||
|
||||
### Opciones
|
||||
|
||||
@ -1704,13 +1730,13 @@ format = "via [🌕 $version](bold blue) "
|
||||
|
||||
## Memoria utilizada
|
||||
|
||||
El módulo `memory_usage` muestra la memoria del sistema actual y el uso de memoria de intercambio.
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
|
||||
Por defecto, el uso de swap se muestra si el intercambio total del sistema no es cero.
|
||||
By default the swap usage is displayed if the total system swap is non-zero.
|
||||
|
||||
::: consejo
|
||||
|
||||
Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1735,7 +1761,7 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable
|
||||
| symbol | `🐏` | Refleja el valor de la opción `symbol` |
|
||||
| style\* | | Refleja el valor de la opción `style` |
|
||||
|
||||
\*: Esta variable sólo puede utilizarse como parte de una cadena de estilo \*\*: La información del archivo SWAP sólo se muestra si se detecta en el sistema actual
|
||||
\*: This variable can only be used as a part of a style string \*\*: The SWAP file information is only displayed if detected on the current system
|
||||
|
||||
### Ejemplo
|
||||
|
||||
@ -1751,7 +1777,7 @@ style = "bold dimmed green"
|
||||
|
||||
## Mercurial Branch
|
||||
|
||||
El módulo `hg_branch` muestra la rama activa del repositorio en su directorio actual.
|
||||
The `hg_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### Opciones
|
||||
|
||||
@ -1829,7 +1855,7 @@ symbol = "🎣 "
|
||||
|
||||
## Nix-shell
|
||||
|
||||
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. El módulo se mostrará dentro de un entorno nix-shell.
|
||||
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment.
|
||||
|
||||
### Opciones
|
||||
|
||||
@ -1958,7 +1984,7 @@ format = "via [🐪 $version]($style) "
|
||||
|
||||
## OpenStack
|
||||
|
||||
El módulo `openstack` muestra la nube OpenStack actual y el proyecto. El módulo solo está activo cuando la variable env `OS_CLOUD` está definida en cuyo caso leerá el archivo `nubes. aml` desde cualquiera de las [ubicaciones por defecto](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files) para obtener el proyecto actual en uso.
|
||||
The `openstack` module shows the current OpenStack cloud and project. The module only active when the `OS_CLOUD` env var is set, in which case it will read `clouds.yaml` file from any of the [default locations](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files). to fetch the current project in use.
|
||||
|
||||
### Opciones
|
||||
|
||||
@ -1993,12 +2019,13 @@ symbol = "☁️ "
|
||||
|
||||
## Versión del paquete
|
||||
|
||||
El módulo `package` se muestra cuando el directorio actual es el repositorio de un paquete, y muestra su versión actual. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
|
||||
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||
@ -2012,13 +2039,14 @@ El módulo `package` se muestra cuando el directorio actual es el repositorio de
|
||||
|
||||
### Opciones
|
||||
|
||||
| Opción | Por defecto | Descripción |
|
||||
| ----------------- | --------------------------------- | -------------------------------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | El formato del módulo. |
|
||||
| `symbol` | `"📦 "` | El símbolo usado antes de mostrar la versión del paquete. |
|
||||
| `style` | `"bold 208"` | El estilo del módulo. |
|
||||
| `display_private` | `false` | Activar la visualización de la versión para los paquetes marcados como privados. |
|
||||
| `disabled` | `false` | Desactiva el módulo `package`. |
|
||||
| Opción | Por defecto | Descripción |
|
||||
| ----------------- | --------------------------------- | --------------------------------------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | El formato del módulo. |
|
||||
| `symbol` | `"📦 "` | El símbolo usado antes de mostrar la versión del paquete. |
|
||||
| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` |
|
||||
| `style` | `"bold 208"` | El estilo del módulo. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2162,7 +2190,7 @@ format = "via [$symbol$version](bold white)"
|
||||
|
||||
The `python` module shows the currently installed version of [Python](https://www.python.org/) and the current [Python virtual environment](https://docs.python.org/tutorial/venv.html) if one is activated.
|
||||
|
||||
Si `pyenv_version_name` se establece en `true`, mostrará el nombre de la versión de pyenv. De lo contrario, se mostrará el número de versión de `python --version`.
|
||||
If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`.
|
||||
|
||||
Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones:
|
||||
|
||||
@ -2186,7 +2214,7 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes
|
||||
| `style` | `"yellow bold"` | El estilo del módulo. |
|
||||
| `pyenv_version_name` | `false` | Usar pyenv para obtener la versión de Python |
|
||||
| `pyenv_prefix` | `pyenv` | Prefijo antes de mostrar la versión de pyenv sólo se utiliza si se utiliza pyenv |
|
||||
| `python_binary` | `["python", "python3, "python2"]` | Configura los binarios de python que Starship debería ejecutar al obtener la versión. |
|
||||
| `python_binary` | `["python", "python3", "python2"]` | Configura los binarios de python que Starship debería ejecutar al obtener la versión. |
|
||||
| `detect_extensions` | `["py"]` | Qué extensiones deben activar este módulo |
|
||||
| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Qué nombres de archivo deben activar este módulo |
|
||||
| `detect_folders` | `[]` | Qué carpetas deben activar este módulo |
|
||||
@ -2194,9 +2222,9 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes
|
||||
|
||||
::: consejo
|
||||
|
||||
La variable `python_binary` acepta una cadena o una lista de cadenas. Starship intentará ejecutar cada binario hasta que obtenga un resultado. Ten en cuenta que sólo puedes cambiar el binario que Starship ejecuta para obtener la versión de Python no los argumentos que se utilizan.
|
||||
The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used.
|
||||
|
||||
Los valores por defecto y el orden para `python_binary` fue elegido para identificar primero la versión de Python en un entorno virtualenv/conda (que actualmente añade un `python`, no importa si apunta a `pithon3` o `pithon2`). Esto tiene el efecto secundario que si todavía tienes un sistema de Python 2 instalado, puede ser recogido antes de cualquier Python 3 (al menos en las Distros de Linux que siempre enlazan `/usr/bin/python` a Python 2). Si ya no trabajas con Python 2 pero no puedes removerlo del sistema, cambiando esto a `"python3"` ocultará cualquier versión de Python 2, ver ejemplo a continuación.
|
||||
The default values and order for `python_binary` was chosen to first identify the Python version in a virtualenv/conda environments (which currently still add a `python`, no matter if it points to `python3` or `python2`). This has the side effect that if you still have a system Python 2 installed, it may be picked up before any Python 3 (at least on Linux Distros that always symlink `/usr/bin/python` to Python 2). If you do not work with Python 2 anymore but cannot remove the system Python 2, changing this to `"python3"` will hide any Python version 2, see example below.
|
||||
|
||||
:::
|
||||
|
||||
@ -2224,7 +2252,7 @@ pyenv_version_name = true
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
# Solo usa el binario `python3` para obtener la versión.
|
||||
# Only use the `python3` binary to get the version.
|
||||
python_binary = "python3"
|
||||
```
|
||||
|
||||
@ -2232,7 +2260,7 @@ python_binary = "python3"
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
# No se dispara con archivos con extensión py
|
||||
# Don't trigger for files with the py extension
|
||||
detect_extensions = []
|
||||
```
|
||||
|
||||
@ -2291,7 +2319,7 @@ format = "with [📐 $version](blue bold) "
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen:
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with `.red` or `.reds` extension
|
||||
|
||||
@ -2329,7 +2357,7 @@ symbol = "🔴 "
|
||||
|
||||
## Ruby
|
||||
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen:
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- El directorio actual contiene un archivo `Gemfile`
|
||||
- El directorio actual contiene un archivo `.ruby-version`
|
||||
@ -2369,7 +2397,7 @@ symbol = "🔺 "
|
||||
|
||||
## Rust
|
||||
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen:
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- El directorio actual contiene un archivo `Cargo.toml`
|
||||
- El directorio actual contiene un archivo con la extensión `.rs`
|
||||
@ -2448,28 +2476,29 @@ symbol = "🌟 "
|
||||
|
||||
## Shell
|
||||
|
||||
El módulo `shell` muestra un indicador para el intérprete de comandos actualmente utilizado.
|
||||
The `shell` module shows an indicator for currently used shell.
|
||||
|
||||
::: consejo
|
||||
|
||||
Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
### Opciones
|
||||
|
||||
| Opción | Por defecto | Descripción |
|
||||
| ---------------------- | ------------ | -------------------------------------------------------------------- |
|
||||
| `bash_indicator` | `bsh` | Una cadena de formato usada para representar Bash. |
|
||||
| `fish_indicator` | `fsh` | Una cadena de formato usada para representar Fish. |
|
||||
| `zsh_indicator` | `zsh` | Una cadena de formato usada para representar Zsh. |
|
||||
| `powershell_indicator` | `psh` | Una cadena de formato usada para representar Powershell. |
|
||||
| `ion_indicator` | `ion` | Una cadena de formato usada para representar Ion. |
|
||||
| `elvish_indicator` | `esh` | Una cadena de formato usada para representar Elvish. |
|
||||
| `tcsh_indicator` | `tsh` | Una cadena de formato usada para representar tcsh. |
|
||||
| `unknown_indicator` | | El valor por defecto que se mostrará cuando se desconoce el comando. |
|
||||
| `format` | `$indicator` | El formato del módulo. |
|
||||
| `disabled` | `true` | Deshabilita el módulo `shell`. |
|
||||
| Opción | Por defecto | Descripción |
|
||||
| ---------------------- | ------------ | ------------------------------------------------------------ |
|
||||
| `bash_indicator` | `bsh` | Una cadena de formato usada para representar Bash. |
|
||||
| `fish_indicator` | `fsh` | Una cadena de formato usada para representar Fish. |
|
||||
| `zsh_indicator` | `zsh` | Una cadena de formato usada para representar Zsh. |
|
||||
| `powershell_indicator` | `psh` | Una cadena de formato usada para representar Powershell. |
|
||||
| `ion_indicator` | `ion` | Una cadena de formato usada para representar Ion. |
|
||||
| `elvish_indicator` | `esh` | Una cadena de formato usada para representar Elvish. |
|
||||
| `tcsh_indicator` | `tsh` | Una cadena de formato usada para representar tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | El formato del módulo. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2491,7 +2520,7 @@ disabled = false
|
||||
|
||||
## SHLVL
|
||||
|
||||
El módulo `shlvl` muestra la variable de entorno actual `SHLVL` ("nivel de shell"), si está establecido en un número y alcanza o supera el umbral especificado.
|
||||
The `shlvl` module shows the current `SHLVL` ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold.
|
||||
|
||||
### Opciones
|
||||
|
||||
@ -2499,7 +2528,7 @@ El módulo `shlvl` muestra la variable de entorno actual `SHLVL` ("nivel de shel
|
||||
| ----------- | ---------------------------- | ----------------------------------------------------------------- |
|
||||
| `threshold` | `2` | Mostrar umbral. |
|
||||
| `format` | `"[$symbol$shlvl]($style) "` | El formato del módulo. |
|
||||
| `symbol` | `"↕️ "` | El símbolo utilizado para representar el `SHLVL`. |
|
||||
| `symbol` | `"↕️ "` | El símbolo utilizado para representar el `SHLVL`. |
|
||||
| `repeat` | `false` | Hace que el `symbol` se repita con la cantidad actual de `SHLVL`. |
|
||||
| `style` | `"bold yellow"` | El estilo del módulo. |
|
||||
| `disabled` | `true` | Desactiva el módulo `shlvl`. |
|
||||
@ -2559,11 +2588,11 @@ format = '[📦 \[$env\]]($style) '
|
||||
|
||||
## Status
|
||||
|
||||
El módulo `status` muestra el código de salida del comando anterior. El módulo se mostrará sólo si el código de salida no es `0`.
|
||||
The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`.
|
||||
|
||||
::: consejo
|
||||
|
||||
Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2571,31 +2600,36 @@ 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 |
|
||||
| `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 |
|
||||
| `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` | `"✔️"` | 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"` | El estilo del módulo. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `pipestatus` | `false` | Enable pipestatus reporting |
|
||||
| `pipestatus_separator` | `|` | The symbol that separate in pipe program exit codes |
|
||||
| `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. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Ejemplo | Descripción |
|
||||
| -------------- | ------- | ------------------------------------------------------------------------------------ |
|
||||
| status | `127` | El código de salida del último comando |
|
||||
| int | `127` | El código de salida del último comando |
|
||||
| common_meaning | `ERROR` | Comprobación del código si no es una señal |
|
||||
| signal_number | `9` | Número de señal correspondiente al código de salida, sólo si está señalizada |
|
||||
| signal_name | `KILL` | Nombre de la señal correspondiente al código de salida, sólo si está señalizada |
|
||||
| maybe_int | `7` | Contiene el número de código de salida cuando no se ha encontrado ningún significado |
|
||||
| symbol | | Refleja el valor de la opción `symbol` |
|
||||
| style\* | | Refleja el valor de la opción `style` |
|
||||
| Variable | Ejemplo | Descripción |
|
||||
| -------------- | ------- | ------------------------------------------------------------------------------------------- |
|
||||
| status | `127` | El código de salida del último comando |
|
||||
| int | `127` | El código de salida del último comando |
|
||||
| common_meaning | `ERROR` | Comprobación del código si no es una señal |
|
||||
| signal_number | `9` | Número de señal correspondiente al código de salida, sólo si está señalizada |
|
||||
| signal_name | `KILL` | Nombre de la señal correspondiente al código de salida, sólo si está señalizada |
|
||||
| maybe_int | `7` | Contiene el número de código de salida cuando no se ha encontrado ningún significado |
|
||||
| pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format |
|
||||
| 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
|
||||
|
||||
@ -2616,7 +2650,7 @@ disabled = false
|
||||
|
||||
## Swift
|
||||
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen:
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- El directorio actual contiene un archivo `Package.swift`
|
||||
- El directorio actual contiene un archivo con la extensión `.swift`
|
||||
@ -2659,7 +2693,7 @@ The `terraform` module shows the currently selected [Terraform workspace](https:
|
||||
|
||||
::: consejo
|
||||
|
||||
By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. Si aún deseas activarlo, [sigue el ejemplo que se muestra a continuación](#with-terraform-version).
|
||||
By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-terraform-version).
|
||||
|
||||
:::
|
||||
|
||||
@ -2714,11 +2748,11 @@ format = "[🏎💨 $workspace]($style) "
|
||||
|
||||
## Hora
|
||||
|
||||
El módulo `time` muestra la hora **local** actual. El valor de configuración de `format` es usado por la caja de [`chrono`](https://crates.io/crates/chrono) para controlar cómo se muestra la hora. Echa un vistazo a [los documentos de chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) para ver qué opciones están disponibles.
|
||||
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
|
||||
|
||||
::: consejo
|
||||
|
||||
Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2734,7 +2768,7 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable
|
||||
| `disabled` | `true` | Desactiva el módulo `time`. |
|
||||
| `time_range` | `"-"` | Establece el intervalo de tiempo durante el cual el módulo se mostrará. La hora debe ser especificada en formato de 24 horas |
|
||||
|
||||
Si `use_12hr` es `true`, entonces `time_format` por defecto `"%r"`. De lo contrario, el valor por defecto es `"%T"`. Configurar manualmente `time_format` sobrescribirá la configuración `use_12hr`.
|
||||
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2760,7 +2794,7 @@ time_range = "10:00:00-14:00:00"
|
||||
|
||||
## Nombre de usuario
|
||||
|
||||
El módulo `username` muestra el nombre de usuario activo. El módulo se muestra si algunas de las siguientes condiciones se cumplen:
|
||||
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- El usuario actual es root
|
||||
- El usuario actual no es el mismo que el que está conectado
|
||||
@ -2769,7 +2803,7 @@ El módulo `username` muestra el nombre de usuario activo. El módulo se muestra
|
||||
|
||||
::: consejo
|
||||
|
||||
La conexión SSH se detecta comprobando las variables de entorno `SSH_CONNECTION`, `SSH_CLIENT`, y `SSH_TTY`. Si su host SSH no configura estas variables, una solución es establecer una de ellas con un valor tonto.
|
||||
SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value.
|
||||
|
||||
:::
|
||||
|
||||
@ -2877,7 +2911,7 @@ format = "via [V $version](blue bold) "
|
||||
|
||||
## VCSH
|
||||
|
||||
The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. El módulo sólo se mostrará si un repositorio está actualmente en uso.
|
||||
The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. The module will be shown only if a repository is currently in use.
|
||||
|
||||
### Opciones
|
||||
|
||||
@ -2909,7 +2943,7 @@ format = "[🆅 $repo](bold blue) "
|
||||
|
||||
## Zig
|
||||
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen:
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- El directorio actual contiene un archivo `.zig`
|
||||
|
||||
@ -2947,9 +2981,9 @@ symbol = "⚡️ "
|
||||
|
||||
## Comandos personalizados
|
||||
|
||||
Los módulos `personalizados` muestran la salida de algunos comandos arbitrarios.
|
||||
The `custom` modules show the output of some arbitrary commands.
|
||||
|
||||
Estos módulos se mostrarán si se cumplen alguna de las siguientes condiciones:
|
||||
These modules will be shown if any of the following conditions are met:
|
||||
|
||||
- El directorio actual contiene un archivo cuyo nombre está en `files`
|
||||
- El directorio actual contiene un directorio cuyo nombre está en `directories`
|
||||
@ -2959,19 +2993,19 @@ Estos módulos se mostrarán si se cumplen alguna de las siguientes condiciones:
|
||||
|
||||
::: consejo
|
||||
|
||||
Múltiples módulos personalizados pueden definirse usando una `.`.
|
||||
Multiple custom modules can be defined by using a `.`.
|
||||
|
||||
:::
|
||||
|
||||
::: consejo
|
||||
|
||||
El orden en el que se muestran los módulos personalizados se puede establecer individualmente incluyendo `${custom.foo}` en el `format` de nivel superior (ya que incluye un punto, necesita usar `${...}`). Por defecto, el módulo `custom` simplemente mostrará todos los módulos personalizados en el orden en que fueron definidos.
|
||||
The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined.
|
||||
|
||||
:::
|
||||
|
||||
::: consejo
|
||||
|
||||
[El issue #1252](https://github.com/starship/starship/discussions/1252) contiene ejemplos de módulos personalizados. Si tiene un ejemplo interesante no cubierto allí, no dude en compartirlo allí!
|
||||
[Issue #1252](https://github.com/starship/starship/discussions/1252) contains examples of custom modules. If you have an interesting example not covered there, feel free to share it there!
|
||||
|
||||
:::
|
||||
|
||||
@ -3002,32 +3036,32 @@ El orden en el que se muestran los módulos personalizados se puede establecer i
|
||||
|
||||
\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
|
||||
|
||||
#### Comando personalizado del intérprete de comandos
|
||||
#### Custom command shell
|
||||
|
||||
`shell` acepta una lista no vacía de cadenas, donde:
|
||||
`shell` accepts a non-empty list of strings, where:
|
||||
|
||||
- La primera cadena es la ruta al intérprete de comandos a usar para ejecutar el comando.
|
||||
- Otros argumentos siguientes son pasados al shell.
|
||||
|
||||
Si no está activado, se retornará a STARSHIP_SHELL y luego a "sh" en Linux, y "cmd /C" en Windows.
|
||||
If unset, it will fallback to STARSHIP_SHELL and then to "sh" on Linux, and "cmd /C" on Windows.
|
||||
|
||||
El `comando` será pasado en stdin.
|
||||
The `command` will be passed in on stdin.
|
||||
|
||||
Si no se da el `shell` o solo contiene un elemento y Starship detecta PowerShell los siguientes argumentos se añadirán automáticamente: `-NoProfile -Command -`. Este comportamiento puede evitarse pasando explícitamente argumentos al intérprete, p.ej.
|
||||
If `shell` is not given or only contains one element and Starship detects PowerShell will be used, the following arguments will automatically be added: `-NoProfile -Command -`. This behavior can be avoided by explicitly passing arguments to the shell, e.g.
|
||||
|
||||
```toml
|
||||
shell = ["pwsh", "-Command", "-"]
|
||||
```
|
||||
|
||||
::: advertencia Asegúrate de que tu configuración personalizada de shell salga con éxito
|
||||
::: warning Make sure your custom shell configuration exits gracefully
|
||||
|
||||
Si establece un comando personalizado, asegúrese de que el Shell por defecto usado por starship ejecutará correctamente el comando con una salida elgante (a través de la opción `shell`).
|
||||
If you set a custom command, make sure that the default Shell used by starship will properly execute the command with a graceful exit (via the `shell` option).
|
||||
|
||||
Por ejemplo, PowerShell requiere el parámetro `-Command` para ejecutar una sola línea. Omitir este parámetro puede arrojar a starchip a un bucle recursivo donde el shell podría intentar cargar un entorno de perfil completo con starship en sí misma y volver a ejecutar el comando personalizado, entrando en un bucle infinito.
|
||||
For example, PowerShell requires the `-Command` parameter to execute a one liner. Omitting this parameter might throw starship into a recursive loop where the shell might try to load a full profile environment with starship itself again and hence re-execute the custom command, getting into a never ending loop.
|
||||
|
||||
Se recomiendan parámetros similares a `-NoProfile` en PowerShell para otros shells para evitar tiempo extra de carga de un perfil personalizado en cada invocación de starship.
|
||||
Parameters similar to `-NoProfile` in PowerShell are recommended for other shells as well to avoid extra loading time of a custom profile on every starship invocation.
|
||||
|
||||
La detección automática de shells y la adición adecuada de parámetros están actualmente implementados, pero es posible que no todos los shells estén cubiertos. Por favor, [abre un issue](https://github.com/starship/starship/issues/new/choose) con los detalles del intérprete de comandos y la configuración de Starship si te encuentras en tal escenario.
|
||||
Automatic detection of shells and proper parameters addition are currently implemented, but it's possible that not all shells are covered. [Please open an issue](https://github.com/starship/starship/issues/new/choose) with shell details and starship configuration if you hit such scenario.
|
||||
|
||||
:::
|
||||
|
||||
@ -3037,8 +3071,8 @@ La detección automática de shells y la adición adecuada de parámetros están
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[custom.foo]
|
||||
command = "echo foo" # muestra la salida del comando
|
||||
files = ["foo"] # se pueden especificar filtros
|
||||
command = "echo foo" # shows output of command
|
||||
files = ["foo"] # can specify filters
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
format = " transcending [$output]($style)"
|
||||
|
||||
|
@ -264,6 +264,17 @@
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Nushell
|
||||
|
||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
@ -110,7 +110,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
@ -362,3 +362,94 @@ symbol = "scala "
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
## Hide 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/hide-runtime-versions.png)
|
||||
|
||||
### Configuración
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dart]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[deno]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dotnet]
|
||||
format = "[$symbol(🎯 $tfm )]($style)"
|
||||
|
||||
[elixir]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[elm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[erlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[golang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[helm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[julia]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[kotlin]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[lua]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nim]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nodejs]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ocaml]
|
||||
format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)'
|
||||
|
||||
[perl]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[red]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ruby]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rust]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[swift]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vagrant]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
@ -18,7 +18,7 @@ features:
|
||||
footer: Licence ISC | Copyright © 2019-présent Contributeurs Starship
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship : Invite Multi-Shell"
|
||||
description: Starship est une invite minimaliste, ultra-rapide et hautement personnalisable pour n'importe quel shell ! Montre les informations dont vous avez besoin tout en restant élégante et minimaliste. Installation rapide disponible pour Bash, Fish, ZSH, Ion et PowerShell.
|
||||
description: Starship est une invite minimaliste, ultra-rapide et hautement personnalisable pour n'importe quel shell ! Montre les informations dont vous avez besoin tout en restant élégante et minimaliste. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, and PowerShell.
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
@ -116,6 +116,7 @@ description: Starship est une invite minimaliste, ultra-rapide et hautement pers
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: warning Seul elvish v0.15 ou supérieur est pris en charge. :::
|
||||
@ -139,7 +140,8 @@ description: Starship est une invite minimaliste, ultra-rapide et hautement pers
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
||||
@ -151,3 +153,14 @@ description: Starship est une invite minimaliste, ultra-rapide et hautement pers
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
@ -73,6 +73,7 @@ starship_precmd_user_func="set_win_title"
|
||||
Les chaînes de style sont une liste de mots, séparés par des espaces. Les mots ne sont pas sensibles à la casse (c'est-à-dire `gras` et `GrAs` sont considérés comme le même mot). Chaque mot peut être l'un des suivants :
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
|
@ -935,6 +935,7 @@ Example: following configuration will display value of USER environment variable
|
||||
[env_var.USER]
|
||||
default = "unknown user"
|
||||
```
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
@ -979,7 +980,7 @@ default = "unknown user"
|
||||
|
||||
## Erlang
|
||||
|
||||
Le module `erlang` montre la version actuellement installée de [Erlang/OTP](https://erlang.org/doc/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
The `erlang` module shows the currently installed version of [Erlang/OTP](https://erlang.org/doc/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
|
||||
- Le répertoire courant contient un fichier `rebar.config`.
|
||||
- Le répertoire courant contient un fichier `erlang.mk`.
|
||||
@ -1018,7 +1019,7 @@ format = "via [e $version](bold red) "
|
||||
|
||||
## Google Cloud (`gcloud`)
|
||||
|
||||
Le module `gcloud` affiche la configuration actuelle pour [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. Ceci est basé sur les fichiers `~/.config/gcloud/active_config` et `~/.config/gcloud/configurations/config_{CONFIG NAME}` et la variable d'environnement `CLOUDSDK_CONFIG`.
|
||||
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
||||
|
||||
### Options
|
||||
|
||||
@ -1079,7 +1080,7 @@ asia-northeast1 = "an1"
|
||||
|
||||
## Branche Git
|
||||
|
||||
Le module `git_branch` affiche la branche active du dépôt dans votre répertoire courant.
|
||||
The `git_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### Options
|
||||
|
||||
@ -1119,19 +1120,19 @@ truncation_symbol = ""
|
||||
|
||||
## Commit Git
|
||||
|
||||
Le module `git_commit` affiche le hash du commit actuel ainsi que le tag (le cas échéant) du dépôt dans votre répertoire courant.
|
||||
The `git_commit` module shows the current commit hash and also the tag (if any) of the repo in your current directory.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Défaut | Description |
|
||||
| -------------------- | ------------------------------------------------------ | -------------------------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | La longueur du hash affiché du commit git. |
|
||||
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | Format du module. |
|
||||
| `style` | `"bold green"` | Le style du module. |
|
||||
| `only_detached` | `true` | Ne montrer le hash du commit qu'en mode `HEAD` détachée. |
|
||||
| `tag_disabled` | `true` | Désactive l'affichage des informations du tag dans le module `git_commit`. |
|
||||
| `tag_symbol` | `" 🏷 "` | Symbole préfixant les informations affichées concernant le tag |
|
||||
| `disabled` | `false` | Désactive le module `git_commit`. |
|
||||
| Option | Défaut | Description |
|
||||
| -------------------- | ---------------------------------- | -------------------------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | La longueur du hash affiché du commit git. |
|
||||
| `format` | `"[\\($hash$tag\\)]($style) "` | Format du module. |
|
||||
| `style` | `"bold green"` | Le style du module. |
|
||||
| `only_detached` | `true` | Ne montrer le hash du commit qu'en mode `HEAD` détachée. |
|
||||
| `tag_disabled` | `true` | Désactive l'affichage des informations du tag dans le module `git_commit`. |
|
||||
| `tag_symbol` | `" 🏷 "` | Symbole préfixant les informations affichées concernant le tag |
|
||||
| `disabled` | `false` | Désactive le module `git_commit`. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -1154,7 +1155,7 @@ tag_symbol = "🔖 "
|
||||
|
||||
## État Git
|
||||
|
||||
Le module `git_state` s'affichera dans les répertoires qui font partie d'un dépôt git, dans lesquels une opération est en cours, comme : _REBASING_, _BISECTING_, etc. S'il y a des informations de progression (par exemple, REBASING 3/10), ces informations seront également affichées.
|
||||
The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
|
||||
|
||||
### Options
|
||||
|
||||
@ -1198,7 +1199,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
|
||||
|
||||
::: tip
|
||||
|
||||
Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1234,7 +1235,7 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
|
||||
## Statut Git
|
||||
|
||||
Le module `git_status` affiche des symboles représentant l'état du dépôt dans votre répertoire courant.
|
||||
The `git_status` module shows symbols representing the state of the repo in your current directory.
|
||||
|
||||
### Options
|
||||
|
||||
@ -1245,42 +1246,43 @@ Le module `git_status` affiche des symboles représentant l'état du dépôt dan
|
||||
| `ahead` | `"⇡"` | Le format de `ahead` |
|
||||
| `behind` | `"⇣"` | Le format de `behind` |
|
||||
| `diverged` | `"⇕"` | Le format de `diverged` |
|
||||
| `untracked` | `"?"` | Le format de `untracked` |
|
||||
| `stashed` | `"$"` | Le format de `stashed` |
|
||||
| `modified` | `"!"` | Le format de `modified` |
|
||||
| `staged` | `"+"` | Le format de `staged` |
|
||||
| `renamed` | `"»"` | Le format de `renamed` |
|
||||
| `deleted` | `"✘"` | Le format de `deleted` |
|
||||
| `up_to_date` | `""` | The format of `up_to_date` |
|
||||
| `untracked` | `"?"` | The format of `untracked` |
|
||||
| `stashed` | `"$"` | The format of `stashed` |
|
||||
| `modified` | `"!"` | The format of `modified` |
|
||||
| `staged` | `"+"` | The format of `staged` |
|
||||
| `renamed` | `"»"` | The format of `renamed` |
|
||||
| `deleted` | `"✘"` | The format of `deleted` |
|
||||
| `style` | `"bold green"` | Le style du module. |
|
||||
| `disabled` | `false` | Désactive le module `git_status`. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
Les variables suivantes peuvent être utilisées pour la valeur de `format`:
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------------- | -------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Raccourci pour `$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Affiche la chaîne formatée de `diverged`, `ahead` ou `behind` selon l'état actuel du dépôt |
|
||||
| `conflicted` | Affiche `conflicted` lorsque la branche courante a des conflits de fusion. |
|
||||
| `untracked` | Affiche `untracked` lorsqu'il y a des fichiers non suivis dans le répertoire de travail. |
|
||||
| `stashed` | Affiche `stashed` lorsqu'une remise existe pour le dépôt local. |
|
||||
| `modified` | Affiche `modified` lorsqu'il y a des fichiers modifiés dans le répertoire de travail. |
|
||||
| `staged` | Affiche `staged` lorsqu'un nouveau fichier a été ajouté à la zone de validation. |
|
||||
| `renamed` | Affiche `renamed` lorsqu'un fichier renommé a été ajouté à la zone de validation. |
|
||||
| `deleted` | Affiche `deleted` lorsque la suppression d'un fichier a été ajoutée à la zone de validation. |
|
||||
| style\* | Reflète la valeur de l'option `style` |
|
||||
| Variable | Description |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Raccourci pour `$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Affiche `conflicted` lorsque la branche courante a des conflits de fusion. |
|
||||
| `untracked` | Affiche `untracked` lorsqu'il y a des fichiers non suivis dans le répertoire de travail. |
|
||||
| `stashed` | Affiche `stashed` lorsqu'une remise existe pour le dépôt local. |
|
||||
| `modified` | Affiche `modified` lorsqu'il y a des fichiers modifiés dans le répertoire de travail. |
|
||||
| `staged` | Affiche `staged` lorsqu'un nouveau fichier a été ajouté à la zone de validation. |
|
||||
| `renamed` | Affiche `renamed` lorsqu'un fichier renommé a été ajouté à la zone de validation. |
|
||||
| `deleted` | Affiche `deleted` lorsque la suppression d'un fichier a été ajoutée à la zone de validation. |
|
||||
| style\* | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
|
||||
Les variables suivantes peuvent être utilisées pour la valeur de `diverged`:
|
||||
The following variables can be used in `diverged`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------------- | ------------------------------------------------- |
|
||||
| `ahead_count` | Nombre de commits en avance sur la branche suivie |
|
||||
| `behind_count` | Nombre de commits en retard sur la branche suivie |
|
||||
|
||||
Les variables suivantes peuvent êtres utilisées dans `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` et `deleted`:
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------- | --------------------------------------- |
|
||||
@ -1296,6 +1298,7 @@ conflicted = "🏳"
|
||||
ahead = "🏎💨"
|
||||
behind = "😰"
|
||||
diverged = "😵"
|
||||
up_to_date = "✓"
|
||||
untracked = "🤷"
|
||||
stashed = "📦"
|
||||
modified = "📝"
|
||||
@ -1304,7 +1307,7 @@ renamed = "👅"
|
||||
deleted = "🗑"
|
||||
```
|
||||
|
||||
Afficher le nombre de commits en avance/en retard par rapport à la branche suivie
|
||||
Show ahead/behind count of the branch being tracked
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
@ -1317,7 +1320,7 @@ behind = "⇣${count}"
|
||||
|
||||
## Golang
|
||||
|
||||
Le module `golang` montre la version actuellement installée de [Golang](https://golang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
The `golang` module shows the currently installed version of [Golang](https://golang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
|
||||
- Le répertoire courant contient un fichier `go.mod`
|
||||
- Le répertoire courant contient un fichier `go.sum`
|
||||
@ -1362,7 +1365,7 @@ format = "via [🏎💨 $version](bold cyan) "
|
||||
|
||||
## Helm
|
||||
|
||||
Le module `helm` montre la version actuellement installée de [Helm](https://helm.sh/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
The `helm` module shows the currently installed version of [Helm](https://helm.sh/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
|
||||
- Le répertoire courant contient un fichier `helmfile.yaml`
|
||||
- Le répertoire courant contient un fichier `Chart.yml`
|
||||
@ -1401,7 +1404,7 @@ format = "via [⎈ $version](bold white) "
|
||||
|
||||
## Nom d'hôte
|
||||
|
||||
Le module `hostname` affiche le nom d'hôte du système.
|
||||
The `hostname` module shows the system hostname.
|
||||
|
||||
### Options
|
||||
|
||||
@ -1436,7 +1439,7 @@ disabled = false
|
||||
|
||||
## Java
|
||||
|
||||
Le module `java` affiche la version actuellement installée de [Java](https://www.oracle.com/java/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
|
||||
- Le répertoire actuel contient un fichier `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, ou `build.boot`
|
||||
- Le répertoire actuel contient un fichier avec l'extension `.java`, `.class`, `. gradle`, `.jar`, `.clj`, ou `.cljc`
|
||||
@ -1475,7 +1478,7 @@ symbol = "🌟 "
|
||||
|
||||
## Jobs
|
||||
|
||||
Le module `jobs` affiche le nombre de tâches en cours d'exécution. Le module ne sera affiché que s'il y a des tâches de fond. Le module affichera le nombre de tâches en cours d'exécution s'il y a plus d'une tâche, ou plus que la valeur `threshold`, si elle existe. Si `threshold` est définie à 0, alors le module s'affichera également lorsqu'il n'y a pas de tâches de fond en cours.
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
|
||||
::: warning
|
||||
|
||||
@ -1515,7 +1518,7 @@ threshold = 4
|
||||
|
||||
## Julia
|
||||
|
||||
Le module `julia` affiche la version actuellement installée de [Julia](https://julialang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
The `julia` module shows the currently installed version of [Julia](https://julialang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
|
||||
- Le répertoire courant contient un fichier `Project.toml`
|
||||
- Le répertoire courant contient un fichier `Manifest.toml`
|
||||
@ -1555,7 +1558,7 @@ symbol = "∴ "
|
||||
|
||||
## Kotlin
|
||||
|
||||
Le module `kotlin` affiche la version actuellement installée de [Kotlin](https://kotlinlang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
|
||||
- Le répertoire courant contient un fichier `.kt` ou `.kts`
|
||||
|
||||
@ -1602,11 +1605,11 @@ kotlin_binary = "kotlinc"
|
||||
|
||||
## Kubernetes
|
||||
|
||||
Affiche le nom du [contexte Kubernets](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) actuel et, si défini, l'espace de noms du fichier kubeconfig. L'espace de noms doit être défini dans le fichier kubeconfig, cela peut être fait via `kubectl config set-context starship-cluster --namespace astronaut`. Si la variable d'environnement `$KUBECONFIG` est définie, le module l'utilisera sinon il utilisera le fichier `~/.kube/config`.
|
||||
Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
|
||||
|
||||
::: tip
|
||||
|
||||
Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1641,11 +1644,34 @@ format = 'on [⛵ $context \($namespace\)](dimmed green) '
|
||||
disabled = false
|
||||
[kubernetes.context_aliases]
|
||||
"dev.local.cluster.k8s" = "dev"
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
#### Regex Matching
|
||||
|
||||
Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions.
|
||||
|
||||
The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
|
||||
|
||||
Long and automatically generated cluster names can be identified and shortened using regular expressions:
|
||||
|
||||
```toml
|
||||
[kubernetes.context_aliases]
|
||||
# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
# Or better, to rename every OpenShift cluster at once:
|
||||
".*/(?P<cluster>[\\w-]+)/.*" = "$cluster"
|
||||
|
||||
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
|
||||
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
|
||||
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
## Saut de ligne
|
||||
|
||||
Le module `line_break` sépare l'invite en deux lignes.
|
||||
The `line_break` module separates the prompt into two lines.
|
||||
|
||||
### Options
|
||||
|
||||
@ -1664,7 +1690,7 @@ disabled = true
|
||||
|
||||
## Lua
|
||||
|
||||
Le module `lua` affiche la version actuellement installée de [Lua](http://www.lua.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
|
||||
- Le répertoire courant contient un fichier `.lua-version`
|
||||
- Le répertoire courant contient un répertoire `lua`
|
||||
@ -1705,13 +1731,13 @@ format = "via [🌕 $version](bold blue) "
|
||||
|
||||
## Utilisation mémoire
|
||||
|
||||
Le module `memory_usage` affiche la mémoire système actuelle et l'utilisation de swap.
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
|
||||
Par défaut, l'utilisation du swap est affichée si le swap total du système n'est pas nul.
|
||||
By default the swap usage is displayed if the total system swap is non-zero.
|
||||
|
||||
::: tip
|
||||
|
||||
Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1736,7 +1762,7 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur
|
||||
| symbol | `🐏` | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style \*\* : Les informations sur le fichier SWAP ne sont affichées que si détectées sur le système actuel
|
||||
\*: This variable can only be used as a part of a style string \*\*: The SWAP file information is only displayed if detected on the current system
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -1752,7 +1778,7 @@ style = "bold dimmed green"
|
||||
|
||||
## Branche Mercurial
|
||||
|
||||
Le module `hg_branch` affiche la branche active du dépôt dans votre répertoire courant.
|
||||
The `hg_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### Options
|
||||
|
||||
@ -1788,7 +1814,7 @@ truncation_symbol = ""
|
||||
|
||||
## Nim
|
||||
|
||||
Le module `nim` affiche la version actuellement installée de [Nim](https://nim-lang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
|
||||
- Le répertoire courant contient un fichier `nim.cfg`
|
||||
- Le répertoire actuel contient un fichier avec l'extension `.nim`
|
||||
@ -1868,7 +1894,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
|
||||
|
||||
## Node.js
|
||||
|
||||
Le module `nodejs` affiche la version actuellement installée de [Node.js](https://nodejs.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
The `nodejs` module shows the currently installed version of [Node.js](https://nodejs.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
|
||||
- Le répertoire courant contient un fichier `package.json`
|
||||
- Le répertoire courant contient un fichier `.node-version`
|
||||
@ -1912,7 +1938,7 @@ format = "via [🤖 $version](bold green) "
|
||||
|
||||
## OCaml
|
||||
|
||||
Le module `ocaml` affiche la version actuellement installée de [OCaml](https://ocaml.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
The `ocaml` module shows the currently installed version of [OCaml](https://ocaml.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
|
||||
- Le répertoire courant contient un fichier avec l'extension `.opam` ou le répertoire `_opam`
|
||||
- Le répertoire courant contient un répertoire `esy.lock`
|
||||
@ -2000,6 +2026,7 @@ The `package` module is shown when the current directory is the repository for a
|
||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||
@ -2013,13 +2040,14 @@ The `package` module is shown when the current directory is the repository for a
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Défaut | Description |
|
||||
| ----------------- | --------------------------------- | --------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | Format du module. |
|
||||
| `symbol` | `"📦 "` | Le symbole utilisé avant d'afficher la version du paquet. |
|
||||
| `style` | `"bold 208"` | Le style du module. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Désactive le module `package`. |
|
||||
| Option | Défaut | Description |
|
||||
| ----------------- | --------------------------------- | ------------------------------------------------------------------------------------------ |
|
||||
| `format` | `"is [$symbol$version]($style) "` | Format du module. |
|
||||
| `symbol` | `"📦 "` | Le symbole utilisé avant d'afficher la version du paquet. |
|
||||
| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
|
||||
| `style` | `"bold 208"` | Le style du module. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2042,7 +2070,7 @@ format = "via [🎁 $version](208 bold) "
|
||||
|
||||
## Perl
|
||||
|
||||
Le module `perl` affiche la version actuellement installée de [Perl](https://www.perl.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
The `perl` module shows the currently installed version of [Perl](https://www.perl.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
|
||||
- Le répertoire courant contient un fichier `Makefile.PL` ou `Build.PL`
|
||||
- Le répertoire courant contient un fichier `cpanfile` ou `cpanfile.snapshot`
|
||||
@ -2082,7 +2110,7 @@ format = "via [🦪 $version]($style) "
|
||||
|
||||
## PHP
|
||||
|
||||
Le module `php` affiche la version actuellement installée de [PHP](https://www.php.net/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
The `php` module shows the currently installed version of [PHP](https://www.php.net/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
|
||||
- Le répertoire courant contient un fichier `composer.json`
|
||||
- Le répertoire courant contient un fichier `.php-version`
|
||||
@ -2122,7 +2150,7 @@ format = "via [🔹 $version](147 bold) "
|
||||
|
||||
## PureScript
|
||||
|
||||
Le module `purescript` affiche la version actuellement installée de [PureScript](https://www.purescript.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
|
||||
- Le répertoire courant contient un fichier `spago.dhall`
|
||||
- Le répertoire actuel contient un fichier avec l'extension `.purs`
|
||||
@ -2161,7 +2189,7 @@ format = "via [$symbol$version](bold white)"
|
||||
|
||||
## Python
|
||||
|
||||
Le module `python` affiche la version actuellement installée de [Python](https://www.python.org/) ainsi que la version d'[environnement virtuel Python](https://docs.python.org/tutorial/venv.html) si il y en a un d'activé.
|
||||
The `python` module shows the currently installed version of [Python](https://www.python.org/) and the current [Python virtual environment](https://docs.python.org/tutorial/venv.html) if one is activated.
|
||||
|
||||
If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`.
|
||||
|
||||
@ -2187,7 +2215,7 @@ Par défaut le module sera activé si au moins l'une des conditions suivantes es
|
||||
| `style` | `"yellow bold"` | Le style du module. |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
|
||||
| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `detect_extensions` | `["py"]` | Quelles extensions devraient activer ce module |
|
||||
| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Quels fichiers devraient activer ce module |
|
||||
| `detect_folders` | `[]` | Quels dossiers devraient activer ce module |
|
||||
@ -2225,7 +2253,7 @@ pyenv_version_name = true
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
# N'utilisez que le binaire `python3` pour obtenir la version.
|
||||
# Only use the `python3` binary to get the version.
|
||||
python_binary = "python3"
|
||||
```
|
||||
|
||||
@ -2233,7 +2261,7 @@ python_binary = "python3"
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
# Ne pas déclencher pour les fichiers avec l'extension py
|
||||
# Don't trigger for files with the py extension
|
||||
detect_extensions = []
|
||||
```
|
||||
|
||||
@ -2241,11 +2269,10 @@ detect_extensions = []
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
# Affiche la version de python depuis l'intérieur d'un venv local.
|
||||
# Display the version of python from inside a local venv.
|
||||
#
|
||||
# Notez que cela ne fonctionnera que lorsque le venv est à l'intérieur du projet,
|
||||
# et uniquement lorsque vous vous situez dans le répertoire contenant le dossier du venv
|
||||
# mais peut-être que c'est suffisant?
|
||||
# Note this will only work when the venv is inside the project and it will only
|
||||
# work in the directory that contains the venv dir but maybe this is ok?
|
||||
python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
```
|
||||
|
||||
@ -2293,7 +2320,7 @@ format = "with [📐 $version](blue bold) "
|
||||
|
||||
## Red
|
||||
|
||||
Par défaut, le module `red` affiche la version actuellement installée de [Red](https://www.red-lang.org/). Le module est affiché si l'une de ces conditions est remplie :
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- Le répertoire actuel contient un fichier avec l'extension `.red` ou `.reds`
|
||||
|
||||
@ -2331,7 +2358,7 @@ symbol = "🔴 "
|
||||
|
||||
## Ruby
|
||||
|
||||
Par défaut, le module `ruby` affiche la version actuellement installée de [Ruby](https://www.ruby-lang.org/). Le module est affiché si l'une de ces conditions est remplie :
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- Le répertoire courant contient un fichier `Gemfile`
|
||||
- Le répertoire courant contient un fichier `.ruby-version`
|
||||
@ -2371,7 +2398,7 @@ symbol = "🔺 "
|
||||
|
||||
## Rust
|
||||
|
||||
Par défaut, le module `rust` affiche la version actuellement installée de [Rust](https://www.rust-lang.org/). Le module est affiché si l'une de ces conditions est remplie :
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- Le répertoire courant contient un fichier `Cargo.toml`
|
||||
- Le répertoire actuel contient un fichier avec l'extension `.rs`
|
||||
@ -2410,7 +2437,7 @@ format = "via [⚙️ $version](red bold)"
|
||||
|
||||
## Scala
|
||||
|
||||
Le module `scala` affiche la version actuellement installée de [Scala](https://www.scala-lang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
The `scala` module shows the currently installed version of [Scala](https://www.scala-lang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
|
||||
- Le répertoire courant contient un fichier `build.sbt`, `.scalaenv` ou `.sbtenv`
|
||||
- Le répertoire actuel contient un fichier avec l'extension `.scala` ou `.sbt`
|
||||
@ -2454,7 +2481,7 @@ The `shell` module shows an indicator for currently used shell.
|
||||
|
||||
::: tip
|
||||
|
||||
Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2469,9 +2496,10 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur
|
||||
| `ion_indicator` | `ion` | Une chaîne de format utilisée pour représenter ion. |
|
||||
| `elvish_indicator` | `esh` | Une chaîne de format utilisée pour représenter elvish. |
|
||||
| `tcsh_indicator` | `tsh` | Une chaîne de format utilisée pour représenter tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | Format du module. |
|
||||
| `disabled` | `true` | Désactive le module `shell`. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2501,7 +2529,7 @@ The `shlvl` module shows the current `SHLVL` ("shell level") environment variabl
|
||||
| ----------- | ---------------------------- | ------------------------------------------------------------- |
|
||||
| `threshold` | `2` | Display threshold. |
|
||||
| `format` | `"[$symbol$shlvl]($style) "` | Format du module. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. |
|
||||
| `style` | `"bold yellow"` | Le style du module. |
|
||||
| `disabled` | `true` | Désactive le module `shlvl`. |
|
||||
@ -2565,7 +2593,7 @@ The `status` module displays the exit code of the previous command. The module w
|
||||
|
||||
::: tip
|
||||
|
||||
Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2573,31 +2601,36 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Défaut | Description |
|
||||
| ----------------------- | ----------------------------- | ---------------------------------------------------- |
|
||||
| `format` | `"[$symbol$status]($style) "` | The format of the module |
|
||||
| `symbol` | `"✖"` | The symbol displayed on program error |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold green"` | Le style du module. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `disabled` | `true` | Désactiver le module `status`. |
|
||||
| Option | Défaut | 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 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` | `|` | The symbol that separate in pipe program exit codes |
|
||||
| `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. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Exemple | Description |
|
||||
| -------------- | ------- | -------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
| Variable | Exemple | Description |
|
||||
| -------------- | ------- | ------------------------------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format |
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
|
||||
@ -2618,7 +2651,7 @@ disabled = false
|
||||
|
||||
## Swift
|
||||
|
||||
Par défaut, le module `swift` affiche la version actuellement installée de [Swift](https://swift.org/). Le module est affiché si l'une de ces conditions est remplie :
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- Le répertoire courant contient un fichier `Package.swift`
|
||||
- Le répertoire actuel contient un fichier avec l'extension `.swift`
|
||||
@ -2696,7 +2729,7 @@ Par défaut le module sera activé si au moins l'une des conditions suivantes es
|
||||
|
||||
### Exemple
|
||||
|
||||
#### Avec la version de Terraform
|
||||
#### With Terraform Version
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
@ -2705,7 +2738,7 @@ Par défaut le module sera activé si au moins l'une des conditions suivantes es
|
||||
format = "[🏎💨 $version$workspace]($style) "
|
||||
```
|
||||
|
||||
#### Sans la version de Terraform
|
||||
#### Without Terraform version
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
@ -2716,11 +2749,11 @@ format = "[🏎💨 $workspace]($style) "
|
||||
|
||||
## Date et Heure
|
||||
|
||||
Le module `time` affiche l'heure actuelle **localement**. La valeur de `format` est utilisée par le package [`chrono`](https://crates.io/crates/chrono) pour contrôler la façon dont l'heure est affichée. Consultez la [doc de chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) pour découvrir les options disponibles.
|
||||
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
|
||||
|
||||
::: tip
|
||||
|
||||
Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2736,7 +2769,7 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur
|
||||
| `disabled` | `true` | Désactiver le module `time`. |
|
||||
| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
|
||||
|
||||
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Sinon, il est défini comme `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
|
||||
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2762,7 +2795,7 @@ time_range = "10:00:00-14:00:00"
|
||||
|
||||
## Nom d'utilisateur
|
||||
|
||||
Le module `username` affiche le nom d'utilisateur de l'utilisateur actif. Le module est affiché si l'une de ces conditions est remplie :
|
||||
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- L'utilisateur courant est root
|
||||
- L'utilisateur courant est différent de celui connecté
|
||||
@ -2807,7 +2840,7 @@ show_always = true
|
||||
|
||||
## Vagrant
|
||||
|
||||
Le module `vagrant` affiche la version actuellement installée de [Vagrant](https://www.vagrantup.com/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
The `vagrant` module shows the currently installed version of [Vagrant](https://www.vagrantup.com/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
|
||||
|
||||
- Le répertoire courant contient un fichier `Vagrantfile`
|
||||
|
||||
@ -2845,7 +2878,7 @@ format = "via [⍱ $version](bold white) "
|
||||
|
||||
## VLang
|
||||
|
||||
Le module `vlang` vous montre votre version de V actuellement installée. Par défaut, le module sera affiché si l'une des conditions suivantes est remplie :
|
||||
The `vlang` module shows you your currently installed version of V. By default the module will be shown if any of the following conditions are met:
|
||||
- Le répertoire courant contient un fichier avec l'extension `.v`
|
||||
- Le répertoire courant contient un fichier `v.mod`, `vpkg.json` ou `.vpkg-lock.json`
|
||||
|
||||
@ -2911,7 +2944,7 @@ format = "[🆅 $repo](bold blue) "
|
||||
|
||||
## Zig
|
||||
|
||||
Par défaut, le module `zig` affiche la version actuellement installée de [Zig](https://ziglang.org/). Le module est affiché si l'une de ces conditions est remplie :
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- Le répertoire courant contient un fichier `.zig`
|
||||
|
||||
@ -3004,9 +3037,9 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
|
||||
#### Commandes shell personnalisées
|
||||
#### Custom command shell
|
||||
|
||||
`shell` accepte une liste de chaînes non vide, où:
|
||||
`shell` accepts a non-empty list of strings, where:
|
||||
|
||||
- La première chaîne est le chemin vers le shell à utiliser pour exécuter la commande.
|
||||
- Other following arguments are passed to the shell.
|
||||
@ -3039,8 +3072,8 @@ Automatic detection of shells and proper parameters addition are currently imple
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[custom.foo]
|
||||
command = "echo foo" # affiche la sortie de la commande
|
||||
files = ["foo"] # ajoute un filtre
|
||||
command = "echo foo" # shows output of command
|
||||
files = ["foo"] # can specify filters
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
format = " transcending [$output]($style)"
|
||||
|
||||
|
@ -264,9 +264,20 @@
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Ajouter ce qui suit à la fin de `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Nushell
|
||||
|
||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
**Avertissement** Cela changera dans le futur. Seule la version nu v0.33 ou supérieure est prise en charge. Ajoutez ce qui suit à votre fichier de configuration 'nu'. Vous pouvez vérifier l'emplacement de ce fichier en exécutant `config path` dans 'nu'.
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
|
@ -110,7 +110,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
@ -362,3 +362,94 @@ symbol = "scala "
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
## Hide 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/hide-runtime-versions.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dart]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[deno]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dotnet]
|
||||
format = "[$symbol(🎯 $tfm )]($style)"
|
||||
|
||||
[elixir]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[elm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[erlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[golang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[helm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[julia]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[kotlin]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[lua]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nim]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nodejs]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ocaml]
|
||||
format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)'
|
||||
|
||||
[perl]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[red]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ruby]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rust]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[swift]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vagrant]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
@ -18,7 +18,7 @@ features:
|
||||
footer: Licenza ISC | Copyright © 2019-present Starship Collaboratori
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: Cross-Shell Prompt"
|
||||
description: Starship è il prompt minimalista, super veloce ed estremamente personalizzabile per qualsiasi shell! Mostra le informazioni di cui hai bisogno, rimanendo elegante e minimale. Installazione rapida disponibile per Bash, Fish, ZSH, Ion e PowerShell.
|
||||
description: Starship è il prompt minimalista, super veloce ed estremamente personalizzabile per qualsiasi shell! Mostra le informazioni di cui hai bisogno, rimanendo elegante e minimale. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, and PowerShell.
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
@ -116,6 +116,7 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: warning È supportato solo elvish v0.15 o superiore. :::
|
||||
@ -139,7 +140,8 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
||||
@ -151,3 +153,14 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
@ -73,6 +73,7 @@ starship_precmd_user_func="set_win_title"
|
||||
Le stringhe di stile sono un elenco di parole, separate da spazi bianchi. Le parole non sono sensibili alle maiuscole (cioè `grassetto` e `BoLd` sono considerate la stessa stringa). Ogni parola può essere una delle seguenti:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
|
@ -51,33 +51,33 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
|
||||
|
||||
**Modulo**: Un componente nel prompt che dà informazioni basate su informazioni contestuali dal tuo sistema operativo. Ad esempio, il modulo "nodejs" mostra la versione di Node.js attualmente installata sul computer, se la directory corrente è un progetto Node.js.
|
||||
|
||||
**Variable**: Sotto-componenti più piccoli che contengono informazioni fornite dal modulo. For example, the "version" variable in the "nodejs" module contains the current version of Node.js.
|
||||
**Variable**: Sotto-componenti più piccoli che contengono informazioni fornite dal modulo. Per esempio, la variabile "version" nel modulo "nodejs" contiene la versione corrente di Node.js.
|
||||
|
||||
By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix.
|
||||
Per convenzione, la maggior parte dei moduli ha un prefisso di colore predefinito del terminale (ad esempio `via` in "nodejs") e uno spazio vuoto come suffisso.
|
||||
|
||||
### Format Strings
|
||||
### Formato Stringhe
|
||||
|
||||
Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string.
|
||||
Le stringhe di formato sono il formato con cui un modulo stampa tutte le sue variabili. La maggior parte dei moduli ha una voce chiamata `formato` che configura il formato di visualizzazione del modulo. È possibile utilizzare testi, variabili e gruppi di testo in una stringa di formato.
|
||||
|
||||
#### Variable
|
||||
|
||||
A variable contains a `$` symbol followed by the name of the variable. The name of a variable only contains letters, numbers and `_`.
|
||||
Una variabile contiene un simbolo `$` seguito dal nome della variabile. Il nome di una variabile contiene solo lettere, numeri e `_`.
|
||||
|
||||
For example:
|
||||
Per esempio:
|
||||
|
||||
- `$version` is a format string with a variable named `version`.
|
||||
- `$git_branch$git_commit` is a format string with two variables named `git_branch` and `git_commit`.
|
||||
- `$git_branch $git_commit` has the two variables separated with a space.
|
||||
|
||||
#### Text Group
|
||||
#### Gruppo Testo
|
||||
|
||||
A text group is made up of two different parts.
|
||||
Un gruppo di testo è composto da due parti diverse.
|
||||
|
||||
The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it.
|
||||
La prima parte, che è racchiusa tra `[]`, è una [format string](#format-strings). È possibile aggiungere testi, variabili o anche gruppi annidati di testo.
|
||||
|
||||
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used style the first part.
|
||||
Nella seconda parte, che è racchiusa tra `()`, è un [style string](#style-strings). Questo può essere usato stile la prima parte.
|
||||
|
||||
For example:
|
||||
Per esempio:
|
||||
|
||||
- `[on](red bold)` will print a string `on` with bold text colored red.
|
||||
- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
|
||||
@ -100,7 +100,7 @@ Note that what styling looks like will be controlled by your terminal emulator.
|
||||
|
||||
A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty.
|
||||
|
||||
For example:
|
||||
Per esempio:
|
||||
|
||||
- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region.
|
||||
- `(some text)` will always show nothing since there are no variables wrapped in the braces.
|
||||
@ -935,6 +935,7 @@ Example: following configuration will display value of USER environment variable
|
||||
[env_var.USER]
|
||||
default = "unknown user"
|
||||
```
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
@ -1123,15 +1124,15 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | The format for the module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ---------------------------------- | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash$tag\\)]($style) "` | The format for the module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -1245,6 +1246,7 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
| `ahead` | `"⇡"` | The format of `ahead` |
|
||||
| `behind` | `"⇣"` | The format of `behind` |
|
||||
| `diverged` | `"⇕"` | The format of `diverged` |
|
||||
| `up_to_date` | `""` | The format of `up_to_date` |
|
||||
| `untracked` | `"?"` | The format of `untracked` |
|
||||
| `stashed` | `"$"` | The format of `stashed` |
|
||||
| `modified` | `"!"` | The format of `modified` |
|
||||
@ -1258,18 +1260,18 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
| Variable | Description |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
@ -1296,6 +1298,7 @@ conflicted = "🏳"
|
||||
ahead = "🏎💨"
|
||||
behind = "😰"
|
||||
diverged = "😵"
|
||||
up_to_date = "✓"
|
||||
untracked = "🤷"
|
||||
stashed = "📦"
|
||||
modified = "📝"
|
||||
@ -1641,6 +1644,29 @@ format = 'on [⛵ $context \($namespace\)](dimmed green) '
|
||||
disabled = false
|
||||
[kubernetes.context_aliases]
|
||||
"dev.local.cluster.k8s" = "dev"
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
#### Regex Matching
|
||||
|
||||
Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions.
|
||||
|
||||
The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
|
||||
|
||||
Long and automatically generated cluster names can be identified and shortened using regular expressions:
|
||||
|
||||
```toml
|
||||
[kubernetes.context_aliases]
|
||||
# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
# Or better, to rename every OpenShift cluster at once:
|
||||
".*/(?P<cluster>[\\w-]+)/.*" = "$cluster"
|
||||
|
||||
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
|
||||
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
|
||||
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
## Line Break
|
||||
@ -2000,6 +2026,7 @@ The `package` module is shown when the current directory is the repository for a
|
||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||
@ -2013,13 +2040,14 @@ The `package` module is shown when the current directory is the repository for a
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------------- | --------------------------------- | ---------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `style` | `"bold 208"` | The style for the module. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------------- | --------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `style` | `"bold 208"` | The style for the module. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2187,7 +2215,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `style` | `"yellow bold"` | The style for the module. |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
|
||||
| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `detect_extensions` | `["py"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -2468,6 +2496,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
@ -2500,7 +2529,7 @@ The `shlvl` module shows the current `SHLVL` ("shell level") environment variabl
|
||||
| ----------- | ---------------------------- | ------------------------------------------------------------- |
|
||||
| `threshold` | `2` | Display threshold. |
|
||||
| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `shlvl` module. |
|
||||
@ -2572,31 +2601,36 @@ 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 |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `disabled` | `true` | Disables the `status` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `format` | `"[$symbol$status]($style) "` | The format of the module |
|
||||
| `symbol` | `"✖"` | The symbol displayed on program error |
|
||||
| `success_symbol` | `"✔️"` | The symbol displayed on program success |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `pipestatus` | `false` | Enable pipestatus reporting |
|
||||
| `pipestatus_separator` | `|` | The symbol that separate in pipe program exit codes |
|
||||
| `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. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------------- | ------- | -------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
| Variable | Example | Description |
|
||||
| -------------- | ------- | ------------------------------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
|
@ -264,6 +264,17 @@
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Nushell
|
||||
|
||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
@ -110,7 +110,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
@ -362,3 +362,94 @@ symbol = "scala "
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
## Hide 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/hide-runtime-versions.png)
|
||||
|
||||
### Configurazione
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dart]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[deno]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dotnet]
|
||||
format = "[$symbol(🎯 $tfm )]($style)"
|
||||
|
||||
[elixir]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[elm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[erlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[golang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[helm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[julia]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[kotlin]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[lua]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nim]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nodejs]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ocaml]
|
||||
format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)'
|
||||
|
||||
[perl]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[red]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ruby]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rust]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[swift]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vagrant]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
@ -18,7 +18,7 @@ features:
|
||||
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: Cross-Shell Prompt"
|
||||
description: Starship はミニマルで、非常に高速で、カスタマイズ性の高い、あらゆるシェルのためのプロンプトです! ミニマルかつ洗練された形で、あなたに必要な情報を表示します。 Bash, Fish, ZSH, Ion, PowerShellへ簡単にインストール出来ます。
|
||||
description: Starship はミニマルで、非常に高速で、カスタマイズ性の高い、あらゆるシェルのためのプロンプトです! ミニマルかつ洗練された形で、あなたに必要な情報を表示します。 Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, and PowerShell.
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
@ -116,6 +116,7 @@ description: Starship はミニマルで、非常に高速で、カスタマイ
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: warning elvish v0.15以上のみサポートされています。 :::
|
||||
@ -139,7 +140,8 @@ description: Starship はミニマルで、非常に高速で、カスタマイ
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
||||
@ -151,3 +153,14 @@ description: Starship はミニマルで、非常に高速で、カスタマイ
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
@ -73,6 +73,7 @@ starship_precmd_user_func="set_win_title"
|
||||
スタイル文字列は空白で区切られた単語のリストです。 大文字小文字を区別しません(例えば、 `bold` と`BoLd` は同じだとみなされます)。 それぞれ以下のいずれか一つが該当します。
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
|
@ -936,6 +936,7 @@ Example: following configuration will display value of USER environment variable
|
||||
[env_var.USER]
|
||||
default = "unknown user"
|
||||
```
|
||||
:::
|
||||
|
||||
### オプション
|
||||
|
||||
@ -1019,7 +1020,7 @@ format = "via [e $version](bold red) "
|
||||
|
||||
## Google Cloud (`gcloud`)
|
||||
|
||||
`gcloud` モジュールは、 [`gcloud`](https://cloud.google.com/sdk/gcloud) CLIの現在の設定が表示されます。 これは `~/.config/gcloud/active_config` ファイルと `~/.config/gcloud/configurations/config_{CONFIG NAME}` ファイルと `CLOUDSDK_CONFIG` 環境変数に基づきます。
|
||||
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
||||
|
||||
### オプション
|
||||
|
||||
@ -1080,7 +1081,7 @@ asia-northeast1 = "an1"
|
||||
|
||||
## Git Branch
|
||||
|
||||
`git_branch`モジュールは、現在のディレクトリにあるリポジトリのアクティブなブランチを表示します。
|
||||
The `git_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### オプション
|
||||
|
||||
@ -1120,19 +1121,19 @@ truncation_symbol = ""
|
||||
|
||||
## Git Commit
|
||||
|
||||
`git_commit` モジュールは、カレントディレクトリのリポジトリの現在のコミットハッシュとタグ (もしあれば) を表示します。
|
||||
The `git_commit` module shows the current commit hash and also the tag (if any) of the repo in your current directory.
|
||||
|
||||
### オプション
|
||||
|
||||
| オプション | デフォルト | 説明 |
|
||||
| -------------------- | ------------------------------------------------------ | ----------------------------------------- |
|
||||
| `commit_hash_length` | `7` | 表示される git コミットハッシュの長さ。 |
|
||||
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | moduleのフォーマットです。 |
|
||||
| `style` | `"bold green"` | モジュールのスタイルです。 |
|
||||
| `only_detached` | `true` | detached `HEAD` 状態のときのみ git コミットハッシュを表示する |
|
||||
| `tag_disabled` | `true` | `git_commit` モジュールのタグ情報の表示を無効にする。 |
|
||||
| `tag_symbol` | `" 🏷 "` | 表示される情報の前に追加されるタグシンボル |
|
||||
| `disabled` | `false` | `git_commit` モジュールを無効にします。 |
|
||||
| オプション | デフォルト | 説明 |
|
||||
| -------------------- | ---------------------------------- | ----------------------------------------- |
|
||||
| `commit_hash_length` | `7` | 表示される git コミットハッシュの長さ。 |
|
||||
| `format` | `"[\\($hash$tag\\)]($style) "` | moduleのフォーマットです。 |
|
||||
| `style` | `"bold green"` | モジュールのスタイルです。 |
|
||||
| `only_detached` | `true` | detached `HEAD` 状態のときのみ git コミットハッシュを表示する |
|
||||
| `tag_disabled` | `true` | `git_commit` モジュールのタグ情報の表示を無効にする。 |
|
||||
| `tag_symbol` | `" 🏷 "` | 表示される情報の前に追加されるタグシンボル |
|
||||
| `disabled` | `false` | `git_commit` モジュールを無効にします。 |
|
||||
|
||||
### 変数
|
||||
|
||||
@ -1155,7 +1156,7 @@ tag_symbol = "🔖 "
|
||||
|
||||
## Git State
|
||||
|
||||
`git_state`モジュールはgitディレクトリの進行状態を表します。 (例: _REBASING_, _BISECTING_, その他) 進捗情報がある場合(例: REBASING 3/10)はその情報も表示されます。
|
||||
The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
|
||||
|
||||
### オプション
|
||||
|
||||
@ -1199,7 +1200,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
|
||||
|
||||
::: tip
|
||||
|
||||
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1235,42 +1236,43 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
|
||||
## Git Status
|
||||
|
||||
`git_status`モジュールは、現在のディレクトリのリポジトリの状態を表すシンボルを表示します。
|
||||
The `git_status` module shows symbols representing the state of the repo in your current directory.
|
||||
|
||||
### オプション
|
||||
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ------------ | ----------------------------------------------- | ------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | `git_status` のデフォルトフォーマット |
|
||||
| `conflicted` | `"="` | このブランチにはマージの競合があります。 |
|
||||
| `ahead` | `"⇡"` | `ahead`のフォーマット |
|
||||
| `behind` | `"⇣"` | `behind`のフォーマット |
|
||||
| `diverged` | `"⇕"` | `diverged`のフォーマット |
|
||||
| `untracked` | `"?"` | The format of `untracked` |
|
||||
| `stashed` | `"$"` | The format of `stashed` |
|
||||
| `modified` | `"!"` | The format of `modified` |
|
||||
| `staged` | `"+"` | The format of `staged` |
|
||||
| `renamed` | `"»"` | The format of `renamed` |
|
||||
| `deleted` | `"✘"` | The format of `deleted` |
|
||||
| `style` | `"bold red"` | モジュールのスタイルです。 |
|
||||
| `disabled` | `false` | `git_status`モジュールを無効にします。 |
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ------------ | ----------------------------------------------- | --------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | `git_status` のデフォルトフォーマット |
|
||||
| `conflicted` | `"="` | このブランチにはマージの競合があります。 |
|
||||
| `ahead` | `"⇡"` | `ahead`のフォーマット |
|
||||
| `behind` | `"⇣"` | `behind`のフォーマット |
|
||||
| `diverged` | `"⇕"` | `diverged`のフォーマット |
|
||||
| `up_to_date` | `""` | The format of `up_to_date` |
|
||||
| `untracked` | `"?"` | The format of `untracked` |
|
||||
| `stashed` | `"$"` | The format of `stashed` |
|
||||
| `modified` | `"!"` | The format of `modified` |
|
||||
| `staged` | `"+"` | The format of `staged` |
|
||||
| `renamed` | `"»"` | The format of `renamed` |
|
||||
| `deleted` | `"✘"` | The format of `deleted` |
|
||||
| `style` | `"bold red"` | モジュールのスタイルです。 |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
|
||||
### 変数
|
||||
|
||||
` format` 内では以下の変数が利用できます。
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| 変数 | 説明 |
|
||||
| -------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | オプション `style` の値をミラーする |
|
||||
| 変数 | 説明 |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
|
||||
@ -1297,6 +1299,7 @@ conflicted = "🏳"
|
||||
ahead = "🏎💨"
|
||||
behind = "😰"
|
||||
diverged = "😵"
|
||||
up_to_date = "✓"
|
||||
untracked = "🤷"
|
||||
stashed = "📦"
|
||||
modified = "📝"
|
||||
@ -1402,7 +1405,7 @@ format = "via [⎈ $version](bold white) "
|
||||
|
||||
## Hostname
|
||||
|
||||
`hostname`モジュールには、システムのホスト名が表示されます。
|
||||
The `hostname` module shows the system hostname.
|
||||
|
||||
### オプション
|
||||
|
||||
@ -1476,7 +1479,7 @@ symbol = "🌟 "
|
||||
|
||||
## ジョブ
|
||||
|
||||
`jobs`モジュールには、実行中のジョブの現在の数が表示されます。 このモジュールは、実行中のバックグラウンドジョブがある場合にのみ表示されます。 1つ以上のジョブがある、または`threshold`に指定した値以上にジョブがある場合は実行中のジョブの数を表示します。 If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
|
||||
::: warning
|
||||
|
||||
@ -1556,7 +1559,7 @@ symbol = "∴ "
|
||||
|
||||
## Kotlin
|
||||
|
||||
`kotlin`モジュールは、現在インストールされている[Kotlin](https://kotlinlang.org/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
|
||||
- カレントディレクトリに`.kt`もしくは`.kts`ファイルが含まれている
|
||||
|
||||
@ -1603,11 +1606,11 @@ kotlin_binary = "kotlinc"
|
||||
|
||||
## Kubernetes
|
||||
|
||||
Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace from the kubeconfig file. namespace は kubconfigで設定する必要があります。設定は、`kubectl config set-context starship-cluster --namespace astronaut` といったコマンド行えます。 `$KUBECONFIG` 環境変数が設定されている場合、このモジュールは環境変数を優先して使用し、`~/.kube/config` は使用しません。
|
||||
Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
|
||||
|
||||
::: tip
|
||||
|
||||
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1642,11 +1645,34 @@ format = 'on [⛵ $context \($namespace\)](dimmed green) '
|
||||
disabled = false
|
||||
[kubernetes.context_aliases]
|
||||
"dev.local.cluster.k8s" = "dev"
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
#### Regex Matching
|
||||
|
||||
Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions.
|
||||
|
||||
The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
|
||||
|
||||
Long and automatically generated cluster names can be identified and shortened using regular expressions:
|
||||
|
||||
```toml
|
||||
[kubernetes.context_aliases]
|
||||
# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
# Or better, to rename every OpenShift cluster at once:
|
||||
".*/(?P<cluster>[\\w-]+)/.*" = "$cluster"
|
||||
|
||||
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
|
||||
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
|
||||
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
## Line Break
|
||||
|
||||
`line_break`モジュールは、プロンプトを2行に分割します。
|
||||
The `line_break` module separates the prompt into two lines.
|
||||
|
||||
### オプション
|
||||
|
||||
@ -1706,13 +1732,13 @@ format = "via [🌕 $version](bold blue) "
|
||||
|
||||
## メモリ使用量
|
||||
|
||||
`memory_usage` モジュールは、現在のシステムメモリとスワップ使用量を示します。
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
|
||||
デフォルトでは、システムスワップの合計がゼロ以外の場合、スワップ使用量が表示されます。
|
||||
By default the swap usage is displayed if the total system swap is non-zero.
|
||||
|
||||
::: tip
|
||||
|
||||
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1753,7 +1779,7 @@ style = "bold dimmed green"
|
||||
|
||||
## Mercurial Branch
|
||||
|
||||
` hg_branch `モジュールは、現在のディレクトリにあるリポジトリのアクティブなブランチを示します。
|
||||
The `hg_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### オプション
|
||||
|
||||
@ -1831,7 +1857,7 @@ symbol = "🎣 "
|
||||
|
||||
## Nix-shell
|
||||
|
||||
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. このモジュールは、nixシェル環境内にあるときに表示されます。
|
||||
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment.
|
||||
|
||||
### オプション
|
||||
|
||||
@ -1995,12 +2021,13 @@ symbol = "☁️ "
|
||||
|
||||
## パッケージのバージョン
|
||||
|
||||
`package`モジュールは、現在のディレクトリがパッケージのリポジトリである場合に表示され、現在のバージョンが表示されます。 The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
|
||||
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||
@ -2018,9 +2045,10 @@ symbol = "☁️ "
|
||||
| ----------------- | --------------------------------- | --------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | moduleのフォーマットです。 |
|
||||
| `symbol` | `"📦 "` | パッケージのバージョンを表示する前に使用される記号です。 |
|
||||
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
|
||||
| `style` | `"bold 208"` | モジュールのスタイルです。 |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | `package`モジュールを無効にします。 |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
|
||||
### 変数
|
||||
|
||||
@ -2164,7 +2192,7 @@ format = "via [$symbol$version](bold white)"
|
||||
|
||||
The `python` module shows the currently installed version of [Python](https://www.python.org/) and the current [Python virtual environment](https://docs.python.org/tutorial/venv.html) if one is activated.
|
||||
|
||||
`pyenvversionname` が `true` に設定されている場合 、pyenv でのバージョン名が表示されます 。 そうでなければ、`python --version` を元にバージョン番号を表示します。
|
||||
If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`.
|
||||
|
||||
デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
|
||||
@ -2188,7 +2216,7 @@ The `python` module shows the currently installed version of [Python](https://ww
|
||||
| `style` | `"yellow bold"` | モジュールのスタイルです。 |
|
||||
| `pyenv_version_name` | `false` | pyenvを使用してPythonバージョンを取得します |
|
||||
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
|
||||
| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `detect_extensions` | `["py"]` | どの拡張子がこのモジュールをアクティブにするか |
|
||||
| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | どのファイル名がこのモジュールをアクティブにするか |
|
||||
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
|
||||
@ -2293,7 +2321,7 @@ format = "with [📐 $version](blue bold) "
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). 次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with `.red` or `.reds` extension
|
||||
|
||||
@ -2331,7 +2359,7 @@ symbol = "🔴 "
|
||||
|
||||
## Ruby
|
||||
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). 次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- カレントディレクトリに`Gemfile`ファイルが含まれている
|
||||
- The current directory contains a `.ruby-version` file
|
||||
@ -2371,7 +2399,7 @@ symbol = "🔺 "
|
||||
|
||||
## Rust
|
||||
|
||||
デフォルトでは`rust`モジュールは現在インストールされている[Rust](https://www.rust-lang.org/)のバージョンを表示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- カレントディレクトリに`Cargo.toml`ファイルが含まれている
|
||||
- カレントディレクトリに`.rs`の拡張子のファイルが含まれている
|
||||
@ -2454,7 +2482,7 @@ The `shell` module shows an indicator for currently used shell.
|
||||
|
||||
::: tip
|
||||
|
||||
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2469,6 +2497,7 @@ The `shell` module shows an indicator for currently used shell.
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | moduleのフォーマットです。 |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
@ -2501,7 +2530,7 @@ The `shlvl` module shows the current `SHLVL` ("shell level") environment variabl
|
||||
| ----------- | ---------------------------- | ------------------------------------------------------------- |
|
||||
| `threshold` | `2` | Display threshold. |
|
||||
| `format` | `"[$symbol$shlvl]($style) "` | moduleのフォーマットです。 |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. |
|
||||
| `style` | `"bold yellow"` | モジュールのスタイルです。 |
|
||||
| `disabled` | `true` | Disables the `shlvl` module. |
|
||||
@ -2565,7 +2594,7 @@ The `status` module displays the exit code of the previous command. The module w
|
||||
|
||||
::: tip
|
||||
|
||||
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2573,31 +2602,36 @@ The `status` module displays the exit code of the previous command. The module w
|
||||
|
||||
### オプション
|
||||
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ----------------------- | ----------------------------- | ---------------------------------------------------- |
|
||||
| `format` | `"[$symbol$status]($style) "` | The format of the module |
|
||||
| `symbol` | `"✖"` | The symbol displayed on program error |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | モジュールのスタイルです。 |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `disabled` | `true` | Disables the `status` module. |
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `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` | `|` | The symbol that separate in pipe program exit codes |
|
||||
| `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. |
|
||||
|
||||
### 変数
|
||||
|
||||
| 変数 | 設定例 | 説明 |
|
||||
| -------------- | ------- | -------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
| 変数 | 設定例 | 説明 |
|
||||
| -------------- | ------- | ------------------------------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format |
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
|
||||
@ -2618,7 +2652,7 @@ disabled = false
|
||||
|
||||
## Swift
|
||||
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). 次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `Package.swift` file
|
||||
- The current directory contains a file with the `.swift` extension
|
||||
@ -2716,11 +2750,11 @@ format = "[🏎💨 $workspace]($style) "
|
||||
|
||||
## Time
|
||||
|
||||
`time`モジュールは、現在の**現地**時間を示します。 `format`設定は、時間の表示方法を制御するために[`chrono`](https://crates.io/crates/chrono)クレートによって使用されます。 使用可能なオプションを確認するには、[chrono strftimeのドキュメント](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)をご覧ください。
|
||||
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
|
||||
|
||||
::: tip
|
||||
|
||||
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2736,7 +2770,7 @@ format = "[🏎💨 $workspace]($style) "
|
||||
| `disabled` | `true` | `time`モジュールを無効にします。 |
|
||||
| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
|
||||
|
||||
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. それ以外の場合、デフォルトは`"%T"`です。 Manually setting `time_format` will override the `use_12hr` setting.
|
||||
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
|
||||
|
||||
### 変数
|
||||
|
||||
@ -2762,7 +2796,7 @@ time_range = "10:00:00-14:00:00"
|
||||
|
||||
## ユーザー名
|
||||
|
||||
`username`モジュールには、アクティブなユーザーのユーザー名が表示されます。 次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- カレントユーザーがroot
|
||||
- カレントユーザーが、ログインしているユーザーとは異なる
|
||||
@ -2911,7 +2945,7 @@ format = "[🆅 $repo](bold blue) "
|
||||
|
||||
## Zig
|
||||
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). 次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
|
@ -264,6 +264,17 @@
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Nushell
|
||||
|
||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
@ -110,7 +110,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
@ -362,3 +362,94 @@ symbol = "scala "
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
## Hide 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/hide-runtime-versions.png)
|
||||
|
||||
### 設定
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dart]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[deno]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dotnet]
|
||||
format = "[$symbol(🎯 $tfm )]($style)"
|
||||
|
||||
[elixir]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[elm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[erlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[golang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[helm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[julia]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[kotlin]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[lua]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nim]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nodejs]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ocaml]
|
||||
format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)'
|
||||
|
||||
[perl]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[red]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ruby]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rust]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[swift]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vagrant]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
@ -18,7 +18,7 @@ features:
|
||||
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: Cross-Shell Prompt"
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and PowerShell.
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, and PowerShell.
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
@ -116,6 +116,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: 주의 elvish v0.15 이상만 지원. :::
|
||||
@ -139,7 +140,8 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
||||
@ -151,3 +153,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
@ -73,6 +73,7 @@ starship_precmd_user_func="set_win_title"
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
|
@ -935,6 +935,7 @@ Example: following configuration will display value of USER environment variable
|
||||
[env_var.USER]
|
||||
default = "unknown user"
|
||||
```
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
@ -1123,15 +1124,15 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | The format for the module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ---------------------------------- | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash$tag\\)]($style) "` | The format for the module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -1245,6 +1246,7 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
| `ahead` | `"⇡"` | The format of `ahead` |
|
||||
| `behind` | `"⇣"` | The format of `behind` |
|
||||
| `diverged` | `"⇕"` | The format of `diverged` |
|
||||
| `up_to_date` | `""` | The format of `up_to_date` |
|
||||
| `untracked` | `"?"` | The format of `untracked` |
|
||||
| `stashed` | `"$"` | The format of `stashed` |
|
||||
| `modified` | `"!"` | The format of `modified` |
|
||||
@ -1258,18 +1260,18 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
| Variable | Description |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
@ -1296,6 +1298,7 @@ conflicted = "🏳"
|
||||
ahead = "🏎💨"
|
||||
behind = "😰"
|
||||
diverged = "😵"
|
||||
up_to_date = "✓"
|
||||
untracked = "🤷"
|
||||
stashed = "📦"
|
||||
modified = "📝"
|
||||
@ -1641,6 +1644,29 @@ format = 'on [⛵ $context \($namespace\)](dimmed green) '
|
||||
disabled = false
|
||||
[kubernetes.context_aliases]
|
||||
"dev.local.cluster.k8s" = "dev"
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
#### Regex Matching
|
||||
|
||||
Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions.
|
||||
|
||||
The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
|
||||
|
||||
Long and automatically generated cluster names can be identified and shortened using regular expressions:
|
||||
|
||||
```toml
|
||||
[kubernetes.context_aliases]
|
||||
# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
# Or better, to rename every OpenShift cluster at once:
|
||||
".*/(?P<cluster>[\\w-]+)/.*" = "$cluster"
|
||||
|
||||
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
|
||||
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
|
||||
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
## Line Break
|
||||
@ -2000,6 +2026,7 @@ The `package` module is shown when the current directory is the repository for a
|
||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||
@ -2013,13 +2040,14 @@ The `package` module is shown when the current directory is the repository for a
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------------- | --------------------------------- | ---------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `style` | `"bold 208"` | The style for the module. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------------- | --------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `style` | `"bold 208"` | The style for the module. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2187,7 +2215,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `style` | `"yellow bold"` | The style for the module. |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
|
||||
| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `detect_extensions` | `["py"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -2468,6 +2496,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
@ -2500,7 +2529,7 @@ The `shlvl` module shows the current `SHLVL` ("shell level") environment variabl
|
||||
| ----------- | ---------------------------- | ------------------------------------------------------------- |
|
||||
| `threshold` | `2` | Display threshold. |
|
||||
| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `shlvl` module. |
|
||||
@ -2572,31 +2601,36 @@ 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 |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `disabled` | `true` | Disables the `status` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `format` | `"[$symbol$status]($style) "` | The format of the module |
|
||||
| `symbol` | `"✖"` | The symbol displayed on program error |
|
||||
| `success_symbol` | `"✔️"` | The symbol displayed on program success |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `pipestatus` | `false` | Enable pipestatus reporting |
|
||||
| `pipestatus_separator` | `|` | The symbol that separate in pipe program exit codes |
|
||||
| `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. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------------- | ------- | -------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
| Variable | Example | Description |
|
||||
| -------------- | ------- | ------------------------------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
|
@ -264,6 +264,17 @@
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Nushell
|
||||
|
||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
@ -110,7 +110,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
@ -362,3 +362,94 @@ symbol = "scala "
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
## Hide 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/hide-runtime-versions.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dart]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[deno]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dotnet]
|
||||
format = "[$symbol(🎯 $tfm )]($style)"
|
||||
|
||||
[elixir]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[elm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[erlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[golang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[helm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[julia]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[kotlin]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[lua]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nim]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nodejs]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ocaml]
|
||||
format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)'
|
||||
|
||||
[perl]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[red]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ruby]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rust]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[swift]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vagrant]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
@ -18,7 +18,7 @@ features:
|
||||
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: Cross-Shell Prompt"
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and PowerShell.
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, and PowerShell.
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
@ -116,6 +116,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: warning Only elvish v0.15 or higher is supported. :::
|
||||
@ -139,7 +140,8 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
||||
@ -151,3 +153,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
@ -73,6 +73,7 @@ starship_precmd_user_func="set_win_title"
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
|
@ -935,6 +935,7 @@ Example: following configuration will display value of USER environment variable
|
||||
[env_var.USER]
|
||||
default = "unknown user"
|
||||
```
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
@ -1123,15 +1124,15 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | The format for the module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ---------------------------------- | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash$tag\\)]($style) "` | The format for the module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -1245,6 +1246,7 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
| `ahead` | `"⇡"` | The format of `ahead` |
|
||||
| `behind` | `"⇣"` | The format of `behind` |
|
||||
| `diverged` | `"⇕"` | The format of `diverged` |
|
||||
| `up_to_date` | `""` | The format of `up_to_date` |
|
||||
| `untracked` | `"?"` | The format of `untracked` |
|
||||
| `stashed` | `"$"` | The format of `stashed` |
|
||||
| `modified` | `"!"` | The format of `modified` |
|
||||
@ -1258,18 +1260,18 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
| Variable | Description |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
@ -1296,6 +1298,7 @@ conflicted = "🏳"
|
||||
ahead = "🏎💨"
|
||||
behind = "😰"
|
||||
diverged = "😵"
|
||||
up_to_date = "✓"
|
||||
untracked = "🤷"
|
||||
stashed = "📦"
|
||||
modified = "📝"
|
||||
@ -1641,6 +1644,29 @@ format = 'on [⛵ $context \($namespace\)](dimmed green) '
|
||||
disabled = false
|
||||
[kubernetes.context_aliases]
|
||||
"dev.local.cluster.k8s" = "dev"
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
#### Regex Matching
|
||||
|
||||
Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions.
|
||||
|
||||
The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
|
||||
|
||||
Long and automatically generated cluster names can be identified and shortened using regular expressions:
|
||||
|
||||
```toml
|
||||
[kubernetes.context_aliases]
|
||||
# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
# Or better, to rename every OpenShift cluster at once:
|
||||
".*/(?P<cluster>[\\w-]+)/.*" = "$cluster"
|
||||
|
||||
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
|
||||
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
|
||||
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
## Line Break
|
||||
@ -2000,6 +2026,7 @@ The `package` module is shown when the current directory is the repository for a
|
||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||
@ -2013,13 +2040,14 @@ The `package` module is shown when the current directory is the repository for a
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------------- | --------------------------------- | ---------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `style` | `"bold 208"` | The style for the module. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------------- | --------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `style` | `"bold 208"` | The style for the module. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2187,7 +2215,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `style` | `"yellow bold"` | The style for the module. |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
|
||||
| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `detect_extensions` | `["py"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -2468,6 +2496,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
@ -2500,7 +2529,7 @@ The `shlvl` module shows the current `SHLVL` ("shell level") environment variabl
|
||||
| ----------- | ---------------------------- | ------------------------------------------------------------- |
|
||||
| `threshold` | `2` | Display threshold. |
|
||||
| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `shlvl` module. |
|
||||
@ -2572,31 +2601,36 @@ 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 |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `disabled` | `true` | Disables the `status` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `format` | `"[$symbol$status]($style) "` | The format of the module |
|
||||
| `symbol` | `"✖"` | The symbol displayed on program error |
|
||||
| `success_symbol` | `"✔️"` | The symbol displayed on program success |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `pipestatus` | `false` | Enable pipestatus reporting |
|
||||
| `pipestatus_separator` | `|` | The symbol that separate in pipe program exit codes |
|
||||
| `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. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------------- | ------- | -------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
| Variable | Example | Description |
|
||||
| -------------- | ------- | ------------------------------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
|
@ -264,6 +264,17 @@
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Nushell
|
||||
|
||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
@ -110,7 +110,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
@ -362,3 +362,94 @@ symbol = "scala "
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
## Hide 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/hide-runtime-versions.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dart]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[deno]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dotnet]
|
||||
format = "[$symbol(🎯 $tfm )]($style)"
|
||||
|
||||
[elixir]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[elm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[erlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[golang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[helm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[julia]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[kotlin]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[lua]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nim]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nodejs]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ocaml]
|
||||
format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)'
|
||||
|
||||
[perl]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[red]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ruby]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rust]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[swift]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vagrant]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
@ -18,7 +18,7 @@ features:
|
||||
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: Cross-Shell Prompt"
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and PowerShell.
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, and PowerShell.
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
@ -116,6 +116,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: warning Only elvish v0.15 or higher is supported. :::
|
||||
@ -139,7 +140,8 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
||||
@ -151,3 +153,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
@ -73,6 +73,7 @@ starship_precmd_user_func="set_win_title"
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
|
@ -935,6 +935,7 @@ Example: following configuration will display value of USER environment variable
|
||||
[env_var.USER]
|
||||
default = "unknown user"
|
||||
```
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
@ -1123,15 +1124,15 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | The format for the module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ---------------------------------- | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash$tag\\)]($style) "` | The format for the module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -1245,6 +1246,7 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
| `ahead` | `"⇡"` | The format of `ahead` |
|
||||
| `behind` | `"⇣"` | The format of `behind` |
|
||||
| `diverged` | `"⇕"` | The format of `diverged` |
|
||||
| `up_to_date` | `""` | The format of `up_to_date` |
|
||||
| `untracked` | `"?"` | The format of `untracked` |
|
||||
| `stashed` | `"$"` | The format of `stashed` |
|
||||
| `modified` | `"!"` | The format of `modified` |
|
||||
@ -1258,18 +1260,18 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
| Variable | Description |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
@ -1296,6 +1298,7 @@ conflicted = "🏳"
|
||||
ahead = "🏎💨"
|
||||
behind = "😰"
|
||||
diverged = "😵"
|
||||
up_to_date = "✓"
|
||||
untracked = "🤷"
|
||||
stashed = "📦"
|
||||
modified = "📝"
|
||||
@ -1641,6 +1644,29 @@ format = 'on [⛵ $context \($namespace\)](dimmed green) '
|
||||
disabled = false
|
||||
[kubernetes.context_aliases]
|
||||
"dev.local.cluster.k8s" = "dev"
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
#### Regex Matching
|
||||
|
||||
Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions.
|
||||
|
||||
The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
|
||||
|
||||
Long and automatically generated cluster names can be identified and shortened using regular expressions:
|
||||
|
||||
```toml
|
||||
[kubernetes.context_aliases]
|
||||
# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
# Or better, to rename every OpenShift cluster at once:
|
||||
".*/(?P<cluster>[\\w-]+)/.*" = "$cluster"
|
||||
|
||||
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
|
||||
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
|
||||
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
## Line Break
|
||||
@ -2000,6 +2026,7 @@ The `package` module is shown when the current directory is the repository for a
|
||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||
@ -2013,13 +2040,14 @@ The `package` module is shown when the current directory is the repository for a
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------------- | --------------------------------- | ---------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `style` | `"bold 208"` | The style for the module. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------------- | --------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `style` | `"bold 208"` | The style for the module. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2187,7 +2215,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `style` | `"yellow bold"` | The style for the module. |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
|
||||
| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `detect_extensions` | `["py"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -2468,6 +2496,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
@ -2500,7 +2529,7 @@ The `shlvl` module shows the current `SHLVL` ("shell level") environment variabl
|
||||
| ----------- | ---------------------------- | ------------------------------------------------------------- |
|
||||
| `threshold` | `2` | Display threshold. |
|
||||
| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `shlvl` module. |
|
||||
@ -2572,31 +2601,36 @@ 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 |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `disabled` | `true` | Disables the `status` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `format` | `"[$symbol$status]($style) "` | The format of the module |
|
||||
| `symbol` | `"✖"` | The symbol displayed on program error |
|
||||
| `success_symbol` | `"✔️"` | The symbol displayed on program success |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `pipestatus` | `false` | Enable pipestatus reporting |
|
||||
| `pipestatus_separator` | `|` | The symbol that separate in pipe program exit codes |
|
||||
| `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. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------------- | ------- | -------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
| Variable | Example | Description |
|
||||
| -------------- | ------- | ------------------------------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
|
@ -264,6 +264,17 @@
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Nushell
|
||||
|
||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
@ -110,7 +110,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
@ -362,3 +362,94 @@ symbol = "scala "
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
## Hide 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/hide-runtime-versions.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dart]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[deno]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dotnet]
|
||||
format = "[$symbol(🎯 $tfm )]($style)"
|
||||
|
||||
[elixir]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[elm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[erlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[golang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[helm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[julia]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[kotlin]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[lua]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nim]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nodejs]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ocaml]
|
||||
format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)'
|
||||
|
||||
[perl]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[red]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ruby]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rust]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[swift]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vagrant]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
@ -18,7 +18,7 @@ features:
|
||||
footer: Licenciado pelo ISC | Todos os direitos reservados © 2019-Presente | Contribuidores Starship
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: Cross-Shell Prompt"
|
||||
description: O Starship é o prompt minimalista, extremamente rápido e extremamente personalizável para qualquer shell! Mostra as informações que você precisa, mantendo-se elegante e minimalista. Instalação rápida disponível para Bash, Fish, ZSH, Ion e Powershell.
|
||||
description: O Starship é o prompt minimalista, extremamente rápido e extremamente personalizável para qualquer shell! Mostra as informações que você precisa, mantendo-se elegante e minimalista. Instalação rápida disponível para Bash, Fish, ZSH, ION, Tcsh, Elvish, Nu, Xonsh and PowerShell.
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
@ -116,6 +116,7 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: Atenção Apenas a versão v0.15 ou superior do elvish é suportada. :::
|
||||
@ -139,9 +140,10 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
#### Nushell
|
||||
|
||||
::: Atenção Isto vai mudar no futuro. Apenas a versão v0.33 do nu ou superior é suportada. Adicione o seguinte no seu arquivo de configuração nu. Você pode verificar o local deste arquivo rodando `config path` in nu.
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
@ -151,3 +153,14 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Adicione o seguinte ao final do arquivo `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
@ -12,7 +12,7 @@ As configurações nesta seção estão sujeitas a alterações em futuras vers
|
||||
|
||||
O Bash não possui uma estrutura formal para os hooks preexec/precmd como a maioria dos outros shells. Por esse motivo, é difícil fornecer hooks totalmente customizáveis no `bash`. No entanto, Starship te oferece uma capacidade limitada de inserir suas próprias funções na processo de prompt-rendering:
|
||||
|
||||
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
|
||||
- Para rodar uma função personalizada antes do prompt iniciar, defina uma nova função e atribua seu nome para `starship_precmd_user_func`. Por exemplo, para desenhar um foguete antes do prompt iniciar você faria
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
@ -21,7 +21,7 @@ function blastoff(){
|
||||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
|
||||
- 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.
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
@ -33,9 +33,9 @@ eval $(starship init bash)
|
||||
|
||||
## Altera o título da janela
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish faz isso por padrão. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
|
||||
Alguns shell prompts iram alterar o titulo da janela automaticamente para você (e.x: para espelhar o diretório atual). Fish faz isso por padrão. Starship não faz isso, mas é bastante simples adicionar esta funcionalidade ao `bash` ou `zsh`.
|
||||
|
||||
First, define a window title change function (identical in bash and zsh):
|
||||
Primeiro, defina uma função de alteração de titulo de janela (é o mesmo para bash e zsh):
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
@ -43,23 +43,23 @@ function set_win_title(){
|
||||
}
|
||||
```
|
||||
|
||||
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
|
||||
Você pode usar variáveis para customizar o titulo (`$USER`, `$HOSTNAME`, e `$PWD` são escolhas populares).
|
||||
|
||||
In `bash`, set this function to be the precmd starship function:
|
||||
No `bash`, defina esta função como a precedente da função starship:
|
||||
|
||||
```bash
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
In `zsh`, add this to the `precmd_functions` array:
|
||||
No `zsh`, adicione no array `precmd_functions`:
|
||||
|
||||
```bash
|
||||
precmd_functions+=(set_win_title)
|
||||
```
|
||||
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
||||
Se você gostar do resultado, adicione esta linha ao seu arquivo de configuração de shell (`~/.bashrc` or `~/.zshrc`) para torna-lo permanente.
|
||||
|
||||
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
|
||||
Por exemplo, se você quiser exibir seu diretório atual no seu titulo de aba do terminal, adicione o seguinte snippet ao seu `~/.bashrc` ou `~/.zshrc`:
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
@ -70,9 +70,10 @@ starship_precmd_user_func="set_win_title"
|
||||
|
||||
## Estilo dos textos
|
||||
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Cada palavra pode ser uma das seguintes:
|
||||
Estilo de strings são uma lista de palavras, separadas por espaço. As palavras não são case sensitive (ou seja `bold` e `BoLd` são consideradas iguais). Cada palavra pode ser uma das seguintes:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
@ -81,14 +82,14 @@ Style strings are a list of words, separated by whitespace. The words are not ca
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||
onde `<color>` é uma especialista de cores (discutido abaixo). `fg:<color>` e `<color>` atualmente fazem a mesma coisa, isto deve mudar no futuro. `inverted` troca as cores de background e foreground. A ordem de palavras na string não importa.
|
||||
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
O token `none` substitui todos os outros tokens na string se ele não fizer parte de um `bg:` especificado que seja, por exemplo `fg:red none fg:blue` ainda criará uma string sem estilo. `bg:none` define a cor padrão de background então `fg:red bg:none` é equivalente a `red` ou `fg:red` e `bg:green fg:red bg:none` é equivalente a `fg:red` ou`red`. Pode se transformar em um erro ao usar `none` em um conjunto de outros tokens no futuro.
|
||||
|
||||
A color specifier can be one of the following:
|
||||
Um especialista em cores pode ser um dos seguintes:
|
||||
|
||||
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
|
||||
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- Um dos padrões de cores no terminal: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. Você pode de forma opcional prefixar com `bright-` para obter uma versão mais brilhante/clara (ex `bright-white`).
|
||||
- Um `#` seguido por um número de seis dígitos hexadecimais. Isto especifica um [Código RGB em formato hexadecimal](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- Um número entre 0-255. Este especifica um [Código de Cor ANSI 8 bits](https://i.stack.imgur.com/KTSQa.png).
|
||||
|
||||
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
||||
Se múltiplas cores forem especificadas para foreground/background, a ultima da string que terá prioridade.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -23,9 +23,9 @@ Sim, ambos podem ser usados para desativar os mulos no prompt. Se seu objetivo g
|
||||
|
||||
## As documentações dizem que o Starship é cross-shell. Porque minha shell preferida não é suportada?
|
||||
|
||||
A forma em que o Starship foi construído, faz com que ele seja compatível com qualquer shell. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used.
|
||||
A forma em que o Starship foi construído, faz com que ele seja compatível com qualquer shell. O binário do starship é sem estado e shell agnóstico, então se o seu shell suporta customização de prompt e expansão de shell, Starship pode ser utilizado.
|
||||
|
||||
Here's a small example getting Starship working with bash:
|
||||
Aqui está um pequeno exemplo de como o Starship funciona com o bash:
|
||||
|
||||
```sh
|
||||
# Recupera o status do último comando executado
|
||||
@ -38,27 +38,27 @@ NUM_JOBS=$(jobs -p | wc -l)
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
A [implementação do Bash](https://github.com/starship/starship/blob/master/src/init/starship.bash) embutida no Starship é um pouco mais complexa para aceitar recursos avançados como o [Módulo de duração de comando](https://starship.rs/config/#command-duration) e para garantir isto o Starship é compatível com configurações pre-instaladas.
|
||||
|
||||
For a list of all flags accepted by `starship prompt`, use the following command:
|
||||
Para uma lista de flags aceitos pelo `starship prompt`, use o seguinte comando:
|
||||
|
||||
```sh
|
||||
starship prompt --help
|
||||
```
|
||||
|
||||
The prompt will use as much context as is provided, but no flags are "required".
|
||||
O prompt vai usar o contexto fornecido, mas nenhuma flag é obrigatória.
|
||||
|
||||
## How do I run Starship on Linux distributions with older versions of glibc?
|
||||
## Como faço para rodar o Starship em distribuições Linux com versões antigas do glibc?
|
||||
|
||||
If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
Se você está tendo um erro como "_version 'GLIBC_2.18' not found (required by starship)_" quando usa o binário prebuilt (por exemplo, no CentOS 6 ou 7), você pode usar um binário compilado com `musl` em vez do `glibc`:
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
## Eu vejo símbolos que não entendo ou não esperado, o que isso significa?
|
||||
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
Se você vê símbolos que não reconhece você pode usar `starship explain` para exibir os módulos que estão sendo mostrados no momento.
|
||||
|
||||
## Por que não consigo visualizar um simbolo glifo no meu prompt?
|
||||
|
||||
|
@ -264,9 +264,20 @@
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Adicione o seguinte ao final do arquivo `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Nushell
|
||||
|
||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
**Atenção** Isto vai mudar no futuro. Apenas a versão v0.33 do nu ou superior é suportada. Adicione o seguinte no seu arquivo de configuração do nu. Você pode verificar o local deste arquivo rodando `config path` in nu.
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
|
@ -110,7 +110,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
@ -362,3 +362,94 @@ symbol = "scala "
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
## Ocultar versões de Runtime
|
||||
|
||||
Está predefinição oculta a versão do runtime da linguagem. Se você trabalha com containers ou ambientes virtualizados, este é para você!
|
||||
|
||||
![Captura de tela de ajustes de ocultar versão de runtime](/presets/hide-runtime-versions.png)
|
||||
|
||||
### Configuração
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dart]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[deno]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dotnet]
|
||||
format = "[$symbol(🎯 $tfm )]($style)"
|
||||
|
||||
[elixir]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[elm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[erlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[golang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[helm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[julia]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[kotlin]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[lua]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nim]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nodejs]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ocaml]
|
||||
format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)'
|
||||
|
||||
[perl]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[red]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ruby]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rust]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[swift]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vagrant]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
@ -18,7 +18,7 @@ features:
|
||||
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: Cross-Shell Prompt"
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and PowerShell.
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, and PowerShell.
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
@ -116,6 +116,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: warning Only elvish v0.15 or higher is supported. :::
|
||||
@ -139,7 +140,8 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
||||
@ -151,3 +153,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
@ -73,6 +73,7 @@ starship_precmd_user_func="set_win_title"
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
|
@ -935,6 +935,7 @@ Example: following configuration will display value of USER environment variable
|
||||
[env_var.USER]
|
||||
default = "unknown user"
|
||||
```
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
@ -1123,15 +1124,15 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | The format for the module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ---------------------------------- | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash$tag\\)]($style) "` | The format for the module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -1245,6 +1246,7 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
| `ahead` | `"⇡"` | The format of `ahead` |
|
||||
| `behind` | `"⇣"` | The format of `behind` |
|
||||
| `diverged` | `"⇕"` | The format of `diverged` |
|
||||
| `up_to_date` | `""` | The format of `up_to_date` |
|
||||
| `untracked` | `"?"` | The format of `untracked` |
|
||||
| `stashed` | `"$"` | The format of `stashed` |
|
||||
| `modified` | `"!"` | The format of `modified` |
|
||||
@ -1258,18 +1260,18 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
| Variable | Description |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
@ -1296,6 +1298,7 @@ conflicted = "🏳"
|
||||
ahead = "🏎💨"
|
||||
behind = "😰"
|
||||
diverged = "😵"
|
||||
up_to_date = "✓"
|
||||
untracked = "🤷"
|
||||
stashed = "📦"
|
||||
modified = "📝"
|
||||
@ -1641,6 +1644,29 @@ format = 'on [⛵ $context \($namespace\)](dimmed green) '
|
||||
disabled = false
|
||||
[kubernetes.context_aliases]
|
||||
"dev.local.cluster.k8s" = "dev"
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
#### Regex Matching
|
||||
|
||||
Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions.
|
||||
|
||||
The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
|
||||
|
||||
Long and automatically generated cluster names can be identified and shortened using regular expressions:
|
||||
|
||||
```toml
|
||||
[kubernetes.context_aliases]
|
||||
# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
# Or better, to rename every OpenShift cluster at once:
|
||||
".*/(?P<cluster>[\\w-]+)/.*" = "$cluster"
|
||||
|
||||
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
|
||||
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
|
||||
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
## Line Break
|
||||
@ -2000,6 +2026,7 @@ The `package` module is shown when the current directory is the repository for a
|
||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||
@ -2013,13 +2040,14 @@ The `package` module is shown when the current directory is the repository for a
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------------- | --------------------------------- | ---------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `style` | `"bold 208"` | The style for the module. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------------- | --------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `style` | `"bold 208"` | The style for the module. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2187,7 +2215,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `style` | `"yellow bold"` | The style for the module. |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
|
||||
| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `detect_extensions` | `["py"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -2468,6 +2496,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
@ -2500,7 +2529,7 @@ The `shlvl` module shows the current `SHLVL` ("shell level") environment variabl
|
||||
| ----------- | ---------------------------- | ------------------------------------------------------------- |
|
||||
| `threshold` | `2` | Display threshold. |
|
||||
| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `shlvl` module. |
|
||||
@ -2572,31 +2601,36 @@ 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 |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `disabled` | `true` | Disables the `status` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `format` | `"[$symbol$status]($style) "` | The format of the module |
|
||||
| `symbol` | `"✖"` | The symbol displayed on program error |
|
||||
| `success_symbol` | `"✔️"` | The symbol displayed on program success |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `pipestatus` | `false` | Enable pipestatus reporting |
|
||||
| `pipestatus_separator` | `|` | The symbol that separate in pipe program exit codes |
|
||||
| `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. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------------- | ------- | -------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
| Variable | Example | Description |
|
||||
| -------------- | ------- | ------------------------------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
|
@ -264,6 +264,17 @@
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Nushell
|
||||
|
||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
@ -110,7 +110,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
@ -362,3 +362,94 @@ symbol = "scala "
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
## Hide 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/hide-runtime-versions.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dart]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[deno]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dotnet]
|
||||
format = "[$symbol(🎯 $tfm )]($style)"
|
||||
|
||||
[elixir]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[elm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[erlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[golang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[helm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[julia]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[kotlin]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[lua]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nim]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nodejs]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ocaml]
|
||||
format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)'
|
||||
|
||||
[perl]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[red]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ruby]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rust]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[swift]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vagrant]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
@ -18,7 +18,7 @@ features:
|
||||
footer: Под лицензией ISC | Авторское право © 2019-настоящее Starship Contributors
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: Cross-Shell Prompt"
|
||||
description: Starship - минимальная, быстрая и бесконечная настраиваемая командная строка для любой оболочки! Показывает нужную вам информацию, оставаясь красивой и минималистичной. Быстрая установка доступна для Bash, Fish, ZSH, Ion и PowerShell.
|
||||
description: Starship - минимальная, быстрая и бесконечная настраиваемая командная строка для любой оболочки! Показывает нужную вам информацию, оставаясь красивой и минималистичной. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, and PowerShell.
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
@ -116,6 +116,7 @@ description: Starship - минимальная, быстрая и бесконе
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: warning Only elvish v0.15 or higher is supported. :::
|
||||
@ -139,7 +140,8 @@ description: Starship - минимальная, быстрая и бесконе
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
||||
@ -151,3 +153,14 @@ description: Starship - минимальная, быстрая и бесконе
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
@ -73,6 +73,7 @@ starship_precmd_user_func="set_win_title"
|
||||
Строки стиля - это список слов, разделенных пробелами. Слова не чувствительны к регистру (то есть `bold` и `BoLd` считаются одной строкой). Каждое слово может быть одним из следующих:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
|
@ -935,6 +935,7 @@ Example: following configuration will display value of USER environment variable
|
||||
[env_var.USER]
|
||||
default = "unknown user"
|
||||
```
|
||||
:::
|
||||
|
||||
### Опции
|
||||
|
||||
@ -1079,7 +1080,7 @@ asia-northeast1 = "an1"
|
||||
|
||||
## Ветвь Git
|
||||
|
||||
Модуль `git_branch` показывает активную ветку репозитория в вашем текущей директории.
|
||||
The `git_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### Опции
|
||||
|
||||
@ -1123,15 +1124,15 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
|
||||
|
||||
### Опции
|
||||
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| -------------------- | ------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | Длина отображаемого хэша коммита git. |
|
||||
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | Формат модуля. |
|
||||
| `style` | `"bold green"` | Стиль модуля. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Отключает модуль `git_commit`. |
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| -------------------- | ---------------------------------- | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | Длина отображаемого хэша коммита git. |
|
||||
| `format` | `"[\\($hash$tag\\)]($style) "` | Формат модуля. |
|
||||
| `style` | `"bold green"` | Стиль модуля. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Отключает модуль `git_commit`. |
|
||||
|
||||
### Переменные
|
||||
|
||||
@ -1154,7 +1155,7 @@ tag_symbol = "🔖 "
|
||||
|
||||
## Состояние Git
|
||||
|
||||
Модуль `git_state` будет отображаться в директориях, являющимися частью репозитория git, и там, где выполняется операция, такие как: _REBASING_, _BISECTING_, и т. д. Если есть информация о прогрессе (например, REBASING 3/10), эта информация также будет показана.
|
||||
The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
|
||||
|
||||
### Опции
|
||||
|
||||
@ -1198,7 +1199,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
|
||||
|
||||
::: tip
|
||||
|
||||
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1234,7 +1235,7 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
|
||||
## Статус Git
|
||||
|
||||
Модуль `git_status` отображает символы, представляющие состояние репозитория в вашей текущей директории.
|
||||
The `git_status` module shows symbols representing the state of the repo in your current directory.
|
||||
|
||||
### Опции
|
||||
|
||||
@ -1245,6 +1246,7 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
| `ahead` | `"⇡"` | The format of `ahead` |
|
||||
| `behind` | `"⇣"` | The format of `behind` |
|
||||
| `diverged` | `"⇕"` | The format of `diverged` |
|
||||
| `up_to_date` | `""` | The format of `up_to_date` |
|
||||
| `untracked` | `"?"` | The format of `untracked` |
|
||||
| `stashed` | `"$"` | The format of `stashed` |
|
||||
| `modified` | `"!"` | The format of `modified` |
|
||||
@ -1252,24 +1254,24 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
| `renamed` | `"»"` | The format of `renamed` |
|
||||
| `deleted` | `"✘"` | The format of `deleted` |
|
||||
| `style` | `"bold red"` | Стиль модуля. |
|
||||
| `disabled` | `false` | Отключает модуль `git_status`. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
|
||||
### Переменные
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Переменная | Описание |
|
||||
| -------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Отражает значение параметра `style` |
|
||||
| Переменная | Описание |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
|
||||
@ -1296,6 +1298,7 @@ conflicted = "🏳"
|
||||
ahead = "🏎💨"
|
||||
behind = "😰"
|
||||
diverged = "😵"
|
||||
up_to_date = "✓"
|
||||
untracked = "🤷"
|
||||
stashed = "📦"
|
||||
modified = "📝"
|
||||
@ -1304,7 +1307,7 @@ renamed = "👅"
|
||||
deleted = "🗑"
|
||||
```
|
||||
|
||||
Показывать счетчик впереди/позади для отслеживаемой ветки
|
||||
Show ahead/behind count of the branch being tracked
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
@ -1401,7 +1404,7 @@ format = "via [⎈ $version](bold white) "
|
||||
|
||||
## Имя хоста
|
||||
|
||||
Модуль `hostname` отображает имя системного хоста.
|
||||
The `hostname` module shows the system hostname.
|
||||
|
||||
### Опции
|
||||
|
||||
@ -1475,7 +1478,7 @@ symbol = "🌟 "
|
||||
|
||||
## Задачи
|
||||
|
||||
Модуль `jobs` отображает текущее количество запущенных задач. Модуль будет показан только если выполняются фоновые задачи. Модуль покажет количество запущенных задач при наличии более чем 1 задачи, или больше, чем значение конфигурации `threshold`, если оно существует. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
|
||||
::: warning
|
||||
|
||||
@ -1606,7 +1609,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
|
||||
|
||||
::: tip
|
||||
|
||||
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1641,11 +1644,34 @@ format = 'on [⛵ $context \($namespace\)](dimmed green) '
|
||||
disabled = false
|
||||
[kubernetes.context_aliases]
|
||||
"dev.local.cluster.k8s" = "dev"
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
#### Regex Matching
|
||||
|
||||
Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions.
|
||||
|
||||
The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
|
||||
|
||||
Long and automatically generated cluster names can be identified and shortened using regular expressions:
|
||||
|
||||
```toml
|
||||
[kubernetes.context_aliases]
|
||||
# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
# Or better, to rename every OpenShift cluster at once:
|
||||
".*/(?P<cluster>[\\w-]+)/.*" = "$cluster"
|
||||
|
||||
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
|
||||
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
|
||||
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
## Перевод Строки
|
||||
|
||||
Модуль `line_break` разделяет командную строку на две строки.
|
||||
The `line_break` module separates the prompt into two lines.
|
||||
|
||||
### Опции
|
||||
|
||||
@ -1705,13 +1731,13 @@ format = "via [🌕 $version](bold blue) "
|
||||
|
||||
## Использование памяти
|
||||
|
||||
Модуль `memory_usage` отображает текущую системную память и использование подкачки.
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
|
||||
По умолчанию использование подкачки отображается, если общая сумма подкачки системы не равна нулю.
|
||||
By default the swap usage is displayed if the total system swap is non-zero.
|
||||
|
||||
::: tip
|
||||
|
||||
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1752,7 +1778,7 @@ style = "bold dimmed green"
|
||||
|
||||
## Ветка Mercurial
|
||||
|
||||
Модуль `hg_branch` показывает активную ветку репозитория в вашем текущем каталоге.
|
||||
The `hg_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### Опции
|
||||
|
||||
@ -1830,7 +1856,7 @@ symbol = "🎣 "
|
||||
|
||||
## Nix-shell
|
||||
|
||||
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. Модуль будет показываться внутри среды nix-shell.
|
||||
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment.
|
||||
|
||||
### Опции
|
||||
|
||||
@ -1994,12 +2020,13 @@ symbol = "☁️ "
|
||||
|
||||
## Версия пакета
|
||||
|
||||
Модуль `package` отображается, когда текущий каталог является репозиторием для пакета и показывает его текущую версию. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
|
||||
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||
@ -2013,13 +2040,14 @@ symbol = "☁️ "
|
||||
|
||||
### Опции
|
||||
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| ----------------- | --------------------------------- | --------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | Формат модуля. |
|
||||
| `symbol` | `"📦 "` | Символ, используемый перед отображением версии пакета. |
|
||||
| `style` | `"bold 208"` | Стиль модуля. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Отключает модуль `package`. |
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| ----------------- | --------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | Формат модуля. |
|
||||
| `symbol` | `"📦 "` | Символ, используемый перед отображением версии пакета. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `style` | `"bold 208"` | Стиль модуля. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
|
||||
### Переменные
|
||||
|
||||
@ -2187,7 +2215,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `style` | `"yellow bold"` | Стиль модуля. |
|
||||
| `pyenv_version_name` | `false` | Использовать pyenv для получения версии Python |
|
||||
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
|
||||
| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `detect_extensions` | `["py"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -2292,7 +2320,7 @@ format = "with [📐 $version](blue bold) "
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with `.red` or `.reds` extension
|
||||
|
||||
@ -2330,7 +2358,7 @@ symbol = "🔴 "
|
||||
|
||||
## Ruby
|
||||
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- Текущий каталог содержит файл `Gemfile`
|
||||
- Текущий каталог содержит файл `.ruby-version`
|
||||
@ -2370,7 +2398,7 @@ symbol = "🔺 "
|
||||
|
||||
## Rust
|
||||
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- Текущий каталог содержит файл `Cargo.toml`
|
||||
- Текущий каталог содержит файл с расширением `.rs`
|
||||
@ -2453,7 +2481,7 @@ The `shell` module shows an indicator for currently used shell.
|
||||
|
||||
::: tip
|
||||
|
||||
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2468,6 +2496,7 @@ The `shell` module shows an indicator for currently used shell.
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | Формат модуля. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
@ -2500,7 +2529,7 @@ The `shlvl` module shows the current `SHLVL` ("shell level") environment variabl
|
||||
| ----------- | ---------------------------- | ------------------------------------------------------------- |
|
||||
| `threshold` | `2` | Display threshold. |
|
||||
| `format` | `"[$symbol$shlvl]($style) "` | Формат модуля. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. |
|
||||
| `style` | `"bold yellow"` | Стиль модуля. |
|
||||
| `disabled` | `true` | Disables the `shlvl` module. |
|
||||
@ -2564,7 +2593,7 @@ The `status` module displays the exit code of the previous command. The module w
|
||||
|
||||
::: tip
|
||||
|
||||
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2572,31 +2601,36 @@ The `status` module displays the exit code of the previous command. The module w
|
||||
|
||||
### Опции
|
||||
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| ----------------------- | ----------------------------- | ---------------------------------------------------- |
|
||||
| `format` | `"[$symbol$status]($style) "` | The format of the module |
|
||||
| `symbol` | `"✖"` | The symbol displayed on program error |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | Стиль модуля. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `disabled` | `true` | Disables the `status` module. |
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `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` | `|` | The symbol that separate in pipe program exit codes |
|
||||
| `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. |
|
||||
|
||||
### Переменные
|
||||
|
||||
| Переменная | Пример | Описание |
|
||||
| -------------- | ------- | -------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
| Переменная | Пример | Описание |
|
||||
| -------------- | ------- | ------------------------------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format |
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
|
||||
@ -2617,7 +2651,7 @@ disabled = false
|
||||
|
||||
## Swift
|
||||
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `Package.swift` file
|
||||
- The current directory contains a file with the `.swift` extension
|
||||
@ -2715,11 +2749,11 @@ format = "[🏎💨 $workspace]($style) "
|
||||
|
||||
## Время
|
||||
|
||||
Модуль `time` показывает текущее **локальное** время. Значение конфигурации `format` используется пакетом [`chrono`](https://crates.io/crates/chrono) для контроля того, как отображается время. Ознакомьтесь с [документацией chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html), чтобы увидеть доступные параметры.
|
||||
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
|
||||
|
||||
::: tip
|
||||
|
||||
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2735,7 +2769,7 @@ format = "[🏎💨 $workspace]($style) "
|
||||
| `disabled` | `true` | Отключает модуль `time`. |
|
||||
| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
|
||||
|
||||
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Иначе по умолчанию используется `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
|
||||
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
|
||||
|
||||
### Переменные
|
||||
|
||||
@ -2761,7 +2795,7 @@ time_range = "10:00:00-14:00:00"
|
||||
|
||||
## Имя пользователя
|
||||
|
||||
Модуль `username` показывает имя активного пользователя. Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- Текущий пользователь - root
|
||||
- Текущий пользователь отличается от залогиненного
|
||||
@ -2910,7 +2944,7 @@ format = "[🆅 $repo](bold blue) "
|
||||
|
||||
## Zig
|
||||
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
|
@ -79,7 +79,7 @@ The first line should produce a [snake emoji](https://emojipedia.org/snake/), wh
|
||||
|
||||
If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose)
|
||||
|
||||
## How do I uninstall Starship?
|
||||
## Как удалить Starship?
|
||||
|
||||
Starship is just as easy to uninstall as it is to install in the first place.
|
||||
|
||||
|
@ -264,6 +264,17 @@
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Nushell
|
||||
|
||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
@ -110,7 +110,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
@ -362,3 +362,94 @@ symbol = "scala "
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
## Hide 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/hide-runtime-versions.png)
|
||||
|
||||
### Конфигурация
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dart]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[deno]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dotnet]
|
||||
format = "[$symbol(🎯 $tfm )]($style)"
|
||||
|
||||
[elixir]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[elm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[erlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[golang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[helm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[julia]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[kotlin]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[lua]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nim]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nodejs]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ocaml]
|
||||
format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)'
|
||||
|
||||
[perl]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[red]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ruby]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rust]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[swift]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vagrant]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
@ -18,7 +18,7 @@ features:
|
||||
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: Cross-Shell Prompt"
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and PowerShell.
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, and PowerShell.
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
@ -116,6 +116,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: warning Only elvish v0.15 or higher is supported. :::
|
||||
@ -139,7 +140,8 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
||||
@ -151,3 +153,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
@ -10,18 +10,17 @@ Bu bölümdeki yapılandırmalar, Starship'in gelecekteki sürümlerinde değiş
|
||||
|
||||
## Bash'e Özel ön-komut istemi(pre-prompt) ve ön-çalıştırma(pre-execution) Komutları
|
||||
|
||||
Bash, çoğu diğer kabuklar gibi resmi bir preexec/precmd çerçevesine sahip değildir. Bu yüzden, `Bash'i` tamamen özelleştirmek zordur. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
|
||||
Bash, çoğu diğer kabuklar gibi resmi bir preexec/precmd çerçevesine sahip değildir. Bu yüzden, `Bash'i` tamamen özelleştirmek zordur. Ancak Starship, size istem oluşturma prosedürü sayesinde kendi işlevlerinizi ekleme konusunda sınırlı bir yetenek sağlar:
|
||||
|
||||
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
|
||||
- Özel bir işlemi başlatmak için çizimin bitmesinden önce yeni bir işlev oluşturup adlandırmanız gerekmektedir.`starship_precmd_user_func`. Örneğin komut isteminden önce bir roket çizmek isterseniz
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
echo "🚀"
|
||||
echo "🚀"
|
||||
}
|
||||
starship_precmd_user_func="blastoff"
|
||||
starship_precmd_user_func="fırlatıldı"
|
||||
```
|
||||
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
|
||||
- Özel bir işlemi başlatmadan hemen önce komut istemini çalıştırıp, [`DEBUG`filtreleme mekanizmasını](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/) kullanabilirsiniz. Bununla birlikte, Starship başlatılmadan hemen *önce*, </strong>DEBUG sinyalini filtrelemek<1>**zorundasınız.</0>! Starship, DEBUG filtrelemesinin ardından bazı değerleri içerisinde barındırabilir ancak filtreleme işlemi starship başlatıldıktan sonra yazılırsa bazı fonksiyonlar devre dışı kalabilir.</li> </ul>
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
@ -31,7 +30,7 @@ trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
eval $(starship init bash)
|
||||
```
|
||||
|
||||
## Change Window Title
|
||||
## Pencere Başlığını Değiştirme
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
|
||||
|
||||
@ -73,6 +72,7 @@ starship_precmd_user_func="set_win_title"
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
|
@ -935,6 +935,7 @@ Example: following configuration will display value of USER environment variable
|
||||
[env_var.USER]
|
||||
default = "unknown user"
|
||||
```
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
@ -1123,15 +1124,15 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | The format for the module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ---------------------------------- | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash$tag\\)]($style) "` | The format for the module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -1245,6 +1246,7 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
| `ahead` | `"⇡"` | The format of `ahead` |
|
||||
| `behind` | `"⇣"` | The format of `behind` |
|
||||
| `diverged` | `"⇕"` | The format of `diverged` |
|
||||
| `up_to_date` | `""` | The format of `up_to_date` |
|
||||
| `untracked` | `"?"` | The format of `untracked` |
|
||||
| `stashed` | `"$"` | The format of `stashed` |
|
||||
| `modified` | `"!"` | The format of `modified` |
|
||||
@ -1258,18 +1260,18 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
| Variable | Description |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
@ -1296,6 +1298,7 @@ conflicted = "🏳"
|
||||
ahead = "🏎💨"
|
||||
behind = "😰"
|
||||
diverged = "😵"
|
||||
up_to_date = "✓"
|
||||
untracked = "🤷"
|
||||
stashed = "📦"
|
||||
modified = "📝"
|
||||
@ -1641,6 +1644,29 @@ format = 'on [⛵ $context \($namespace\)](dimmed green) '
|
||||
disabled = false
|
||||
[kubernetes.context_aliases]
|
||||
"dev.local.cluster.k8s" = "dev"
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
#### Regex Matching
|
||||
|
||||
Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions.
|
||||
|
||||
The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
|
||||
|
||||
Long and automatically generated cluster names can be identified and shortened using regular expressions:
|
||||
|
||||
```toml
|
||||
[kubernetes.context_aliases]
|
||||
# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
# Or better, to rename every OpenShift cluster at once:
|
||||
".*/(?P<cluster>[\\w-]+)/.*" = "$cluster"
|
||||
|
||||
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
|
||||
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
|
||||
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
## Line Break
|
||||
@ -2000,6 +2026,7 @@ The `package` module is shown when the current directory is the repository for a
|
||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||
@ -2013,13 +2040,14 @@ The `package` module is shown when the current directory is the repository for a
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------------- | --------------------------------- | ---------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `style` | `"bold 208"` | The style for the module. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------------- | --------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `style` | `"bold 208"` | The style for the module. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2187,7 +2215,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `style` | `"yellow bold"` | The style for the module. |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
|
||||
| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `detect_extensions` | `["py"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -2468,6 +2496,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
@ -2500,7 +2529,7 @@ The `shlvl` module shows the current `SHLVL` ("shell level") environment variabl
|
||||
| ----------- | ---------------------------- | ------------------------------------------------------------- |
|
||||
| `threshold` | `2` | Display threshold. |
|
||||
| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `shlvl` module. |
|
||||
@ -2572,31 +2601,36 @@ 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 |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `disabled` | `true` | Disables the `status` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `format` | `"[$symbol$status]($style) "` | The format of the module |
|
||||
| `symbol` | `"✖"` | The symbol displayed on program error |
|
||||
| `success_symbol` | `"✔️"` | The symbol displayed on program success |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `pipestatus` | `false` | Enable pipestatus reporting |
|
||||
| `pipestatus_separator` | `|` | The symbol that separate in pipe program exit codes |
|
||||
| `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. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------------- | ------- | -------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
| Variable | Example | Description |
|
||||
| -------------- | ------- | ------------------------------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
|
@ -264,6 +264,17 @@
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Nushell
|
||||
|
||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
@ -110,7 +110,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
@ -362,3 +362,94 @@ symbol = "scala "
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
## Hide 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/hide-runtime-versions.png)
|
||||
|
||||
### Yapılandırma
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dart]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[deno]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dotnet]
|
||||
format = "[$symbol(🎯 $tfm )]($style)"
|
||||
|
||||
[elixir]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[elm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[erlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[golang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[helm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[julia]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[kotlin]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[lua]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nim]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nodejs]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ocaml]
|
||||
format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)'
|
||||
|
||||
[perl]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[red]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ruby]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rust]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[swift]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vagrant]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
@ -18,7 +18,7 @@ features:
|
||||
footer: Cấp phép bởi ISC | Bản quyền © 2019-nay Starship Contributors
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: Cross-Shell Prompt"
|
||||
description: Starship là prompt nhỏ, cực nhanh, và khả năng tuỳ biến mạnh mẽ cho bất kì shell nào! Hiển thị thông tin bạn cần, trong khi vẫn giữ cho đẹp và nhỏ gọn. Có thể được cài đặt nhanh chóng cho Bash, Fish, ZSH, Ion và PowerShell.
|
||||
description: Starship là prompt nhỏ, cực nhanh, và khả năng tuỳ biến mạnh mẽ cho bất kì shell nào! Hiển thị thông tin bạn cần, trong khi vẫn giữ cho đẹp và nhỏ gọn. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, and PowerShell.
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
@ -116,6 +116,7 @@ description: Starship là prompt nhỏ, cực nhanh, và khả năng tuỳ biế
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: warning Chỉ elvish v0.15 hoặc cao hơn được hỗ trợ. :::
|
||||
@ -139,7 +140,8 @@ eval $(starship init ion)
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
||||
@ -151,3 +153,14 @@ eval $(starship init ion)
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
@ -73,6 +73,7 @@ starship_precmd_user_func="set_win_title"
|
||||
Chuỗi kiểu là một danh sách các từ, được phân cách bởi khoảng trắng. Các từ là không phân biệt hoa thường (ví dụ. `bold` và `Bold` là hai chuỗi tương đương). Mỗi từ có thể là một trong các từ sau:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
|
@ -935,6 +935,7 @@ Example: following configuration will display value of USER environment variable
|
||||
[env_var.USER]
|
||||
default = "unknown user"
|
||||
```
|
||||
:::
|
||||
|
||||
### Các tuỳ chọn
|
||||
|
||||
@ -1018,7 +1019,7 @@ format = "via [e $version](bold red) "
|
||||
|
||||
## Google Cloud (`gcloud`)
|
||||
|
||||
Mô đun `gcloud` hiển thị cấu hình hiện tại của [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. Cái này dựa trên tập tin `~/.config/gcloud/active_config`, `~/.config/gcloud/configurations/config_{CONFIG NAME}` và biến môi trường `CLOUDSDK_CONFIG`.
|
||||
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
||||
|
||||
### Các tuỳ chọn
|
||||
|
||||
@ -1079,7 +1080,7 @@ asia-northeast1 = "an1"
|
||||
|
||||
## Git Branch
|
||||
|
||||
Mô đun `git_branch` hiển thị nhánh hiệu lực của repo trong thư mục hiện tại của bạn.
|
||||
The `git_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### Các tuỳ chọn
|
||||
|
||||
@ -1119,19 +1120,19 @@ truncation_symbol = ""
|
||||
|
||||
## Git Commit
|
||||
|
||||
Mô đun `git_commit` hiển thị hash commit hiện tại và tag (nếu có) của repo trong thư mục hiện tại của bạn.
|
||||
The `git_commit` module shows the current commit hash and also the tag (if any) of the repo in your current directory.
|
||||
|
||||
### Các tuỳ chọn
|
||||
|
||||
| Tuỳ chọn | Mặc định | Mô tả |
|
||||
| -------------------- | ------------------------------------------------------ | --------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | Độ dài của git commit hash được hiển thị. |
|
||||
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | Định dạng cho module. |
|
||||
| `style` | `"bold green"` | Kiểu cho module. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Vô hiệu hiển thị thông tin tag trong mô đun `git_commit`. |
|
||||
| `tag_symbol` | `" 🏷 "` | Biểu tượng tag trước thông tin được hiển thị |
|
||||
| `disabled` | `false` | Vô hiệu mô đun `git_commit`. |
|
||||
| Tuỳ chọn | Mặc định | Mô tả |
|
||||
| -------------------- | ---------------------------------- | --------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | Độ dài của git commit hash được hiển thị. |
|
||||
| `format` | `"[\\($hash$tag\\)]($style) "` | Định dạng cho module. |
|
||||
| `style` | `"bold green"` | Kiểu cho module. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Vô hiệu hiển thị thông tin tag trong mô đun `git_commit`. |
|
||||
| `tag_symbol` | `" 🏷 "` | Biểu tượng tag trước thông tin được hiển thị |
|
||||
| `disabled` | `false` | Vô hiệu mô đun `git_commit`. |
|
||||
|
||||
### Các biến
|
||||
|
||||
@ -1154,7 +1155,7 @@ tag_symbol = "🔖 "
|
||||
|
||||
## Git State
|
||||
|
||||
Mô đun `git_state` sẽ hiển hiển thị trong các thư mục là một phần của gt repository và những nơi tồn tại một hoạt động trong tiến trình như _REBASING_, _BISECTING_. Nếu có thông tin tiến trình (ví dụ, REBASING 3/10), thông tin đó cũng sẽ được hiển thị.
|
||||
The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
|
||||
|
||||
### Các tuỳ chọn
|
||||
|
||||
@ -1198,7 +1199,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
|
||||
|
||||
::: thử thuật
|
||||
|
||||
Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiết lập `disabled` sang `false` trong tập tin cấu hình của bạn.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1234,7 +1235,7 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
|
||||
## Git Status
|
||||
|
||||
Mô đun `git_status` hiển thị các biểu tượng đại diện cho trạng thái của repo trong thư mục hiện tại của bạn.
|
||||
The `git_status` module shows symbols representing the state of the repo in your current directory.
|
||||
|
||||
### Các tuỳ chọn
|
||||
|
||||
@ -1245,42 +1246,43 @@ Mô đun `git_status` hiển thị các biểu tượng đại diện cho trạn
|
||||
| `ahead` | `"⇡"` | Định dạng của `ahead` |
|
||||
| `behind` | `"⇣"` | Định dạng của `behind` |
|
||||
| `diverged` | `"⇕"` | Định dạng của `diverged` |
|
||||
| `untracked` | `"?"` | Định dạng của `untracked` |
|
||||
| `stashed` | `"$"` | Định dạng của `stashed` |
|
||||
| `modified` | `"!"` | Định dạng của `modified` |
|
||||
| `staged` | `"+"` | Định dạng của `modified` |
|
||||
| `renamed` | `"»"` | Định dạng của `renamed` |
|
||||
| `deleted` | `"✘"` | Định dạng của `deleted` |
|
||||
| `up_to_date` | `""` | The format of `up_to_date` |
|
||||
| `untracked` | `"?"` | The format of `untracked` |
|
||||
| `stashed` | `"$"` | The format of `stashed` |
|
||||
| `modified` | `"!"` | The format of `modified` |
|
||||
| `staged` | `"+"` | The format of `staged` |
|
||||
| `renamed` | `"»"` | The format of `renamed` |
|
||||
| `deleted` | `"✘"` | The format of `deleted` |
|
||||
| `style` | `"bold red"` | Kiểu cho module. |
|
||||
| `disabled` | `false` | Vô hiệu `git_status` module. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
|
||||
### Các biến
|
||||
|
||||
Các biến dưới đây có thể được sử dụng trong `format`:
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Biến | Mô tả |
|
||||
| -------------- | ----------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut cho `$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Hiển thị format string của `diverged` `ahead` or `behind` dựa trên trạng thái hiện tại của repo |
|
||||
| `conflicted` | Hiển thị `conflicted` khi nhánh này có merge conflicts. |
|
||||
| `untracked` | Hiển thị `untracked` khi có tệp tin untracked trong thư mục làm việc. |
|
||||
| `stashed` | Hiển thị `stashed` khi một stash tồn tại trong local repository. |
|
||||
| `modified` | Hiển thị `modified` khi có tệp tin được chỉnh sửa trong thư mục làm việc. |
|
||||
| `staged` | Hiển thị `staged` khi một tệp tin mới được thêm vào staging area. |
|
||||
| `renamed` | Hiển thị `renamed` khi một tệp tin đổi tên đã được thêm vào staging area. |
|
||||
| `deleted` | Hiển thị `deleted` khi một tệp tin bị xóa đã được thêm vào staging area. |
|
||||
| style\* | Giá trị ghi đè của `style` |
|
||||
| Biến | Mô tả |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut cho `$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Hiển thị `conflicted` khi nhánh này có merge conflicts. |
|
||||
| `untracked` | Hiển thị `untracked` khi có tệp tin untracked trong thư mục làm việc. |
|
||||
| `stashed` | Hiển thị `stashed` khi một stash tồn tại trong local repository. |
|
||||
| `modified` | Hiển thị `modified` khi có tệp tin được chỉnh sửa trong thư mục làm việc. |
|
||||
| `staged` | Hiển thị `staged` khi một tệp tin mới được thêm vào staging area. |
|
||||
| `renamed` | Hiển thị `renamed` khi một tệp tin đổi tên đã được thêm vào staging area. |
|
||||
| `deleted` | Hiển thị `deleted` khi một tệp tin bị xóa đã được thêm vào staging area. |
|
||||
| style\* | Giá trị ghi đè của `style` |
|
||||
|
||||
\*: Biến này có thể chỉ được sử dụng như một phần của style string
|
||||
|
||||
Các biến sau có thể được sử dụng trong `diverged`:
|
||||
The following variables can be used in `diverged`:
|
||||
|
||||
| Biến | Mô tả |
|
||||
| -------------- | --------------------------------------------- |
|
||||
| `ahead_count` | Số lượng commit phía trước của nhánh tracking |
|
||||
| `behind_count` | Số lượng commit phía sau nhánh tracking |
|
||||
|
||||
Các biến sau có thể được sử dụng trong `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`:
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`:
|
||||
|
||||
| Biến | Mô tả |
|
||||
| ------- | ----------------------------- |
|
||||
@ -1296,6 +1298,7 @@ conflicted = "🏳"
|
||||
ahead = "🏎💨"
|
||||
behind = "😰"
|
||||
diverged = "😵"
|
||||
up_to_date = "✓"
|
||||
untracked = "🤷"
|
||||
stashed = "📦"
|
||||
modified = "📝"
|
||||
@ -1304,7 +1307,7 @@ renamed = "👅"
|
||||
deleted = "🗑"
|
||||
```
|
||||
|
||||
Hiển thị tổng số nhánh phía trước/phía sau của nhánh được track
|
||||
Show ahead/behind count of the branch being tracked
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
@ -1401,7 +1404,7 @@ format = "via [⎈ $version](bold white) "
|
||||
|
||||
## Hostname
|
||||
|
||||
Mô đun `hostname` hiển thị hostnam hệ thống.
|
||||
The `hostname` module shows the system hostname.
|
||||
|
||||
### Các tuỳ chọn
|
||||
|
||||
@ -1475,7 +1478,7 @@ symbol = "🌟 "
|
||||
|
||||
## Jobs
|
||||
|
||||
`jobs` module cho biết số lượng các jobs đang chạy. Mô đun sẽ được hiển thị chỉ khi có background jobs đang chạy. Mô đúnẽ hiển thị số lượng jobs đang chỵ nếu có nhiều hơn 1 jobs, hoặc nhiều hơn giá trị cấu hình `threshold`, nếu nó tồn tại. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
|
||||
::: cảnh báo
|
||||
|
||||
@ -1602,11 +1605,11 @@ kotlin_binary = "kotlinc"
|
||||
|
||||
## Kubernetes
|
||||
|
||||
Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace from the kubeconfig file. Namespace cần được thiết lập trong tệp tin kubeconfig, cài này có thể được thực thi thông qua `kubectl config set-context starship-cluster --namespace astronaut`. Nếu biến môi trường `$KUBECONFIG` được thiết lập, mô đun sẽ sử dụng cái đó nếu nó không sử dụng `~/.kube/config`.
|
||||
Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
|
||||
|
||||
::: thử thuật
|
||||
|
||||
Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiết lập `disabled` sang `false` trong tập tin cấu hình của bạn.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1641,6 +1644,29 @@ format = 'on [⛵ $context \($namespace\)](dimmed green) '
|
||||
disabled = false
|
||||
[kubernetes.context_aliases]
|
||||
"dev.local.cluster.k8s" = "dev"
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
#### Regex Matching
|
||||
|
||||
Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions.
|
||||
|
||||
The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
|
||||
|
||||
Long and automatically generated cluster names can be identified and shortened using regular expressions:
|
||||
|
||||
```toml
|
||||
[kubernetes.context_aliases]
|
||||
# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
# Or better, to rename every OpenShift cluster at once:
|
||||
".*/(?P<cluster>[\\w-]+)/.*" = "$cluster"
|
||||
|
||||
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
|
||||
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
|
||||
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
## Line Break
|
||||
@ -1711,7 +1737,7 @@ By default the swap usage is displayed if the total system swap is non-zero.
|
||||
|
||||
::: thử thuật
|
||||
|
||||
Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiết lập `disabled` sang `false` trong tập tin cấu hình của bạn.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2000,6 +2026,7 @@ The `package` module is shown when the current directory is the repository for a
|
||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||
@ -2013,13 +2040,14 @@ The `package` module is shown when the current directory is the repository for a
|
||||
|
||||
### Các tuỳ chọn
|
||||
|
||||
| Tuỳ chọn | Mặc định | Mô tả |
|
||||
| ----------------- | --------------------------------- | ---------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | Định dạng cho module. |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `style` | `"bold 208"` | Kiểu cho module. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
| Tuỳ chọn | Mặc định | Mô tả |
|
||||
| ----------------- | --------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | Định dạng cho module. |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `style` | `"bold 208"` | Kiểu cho module. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
|
||||
### Các biến
|
||||
|
||||
@ -2187,7 +2215,7 @@ Mặc định module sẽ được hiển thị nếu có bất kì điều ki
|
||||
| `style` | `"yellow bold"` | Kiểu cho module. |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
|
||||
| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `detect_extensions` | `["py"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này |
|
||||
| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Tên tệp nào sẽ kích hoạt mô-đun này |
|
||||
| `detect_folders` | `[]` | Thư mục nào sẽ kích hoạt mô-đun này |
|
||||
@ -2292,7 +2320,7 @@ format = "with [📐 $version](blue bold) "
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn:
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with `.red` or `.reds` extension
|
||||
|
||||
@ -2330,7 +2358,7 @@ symbol = "🔴 "
|
||||
|
||||
## Ruby
|
||||
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn:
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `Gemfile` file
|
||||
- The current directory contains a `.ruby-version` file
|
||||
@ -2370,7 +2398,7 @@ symbol = "🔺 "
|
||||
|
||||
## Rust
|
||||
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn:
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `Cargo.toml` file
|
||||
- The current directory contains a file with the `.rs` extension
|
||||
@ -2453,7 +2481,7 @@ The `shell` module shows an indicator for currently used shell.
|
||||
|
||||
::: thử thuật
|
||||
|
||||
Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiết lập `disabled` sang `false` trong tập tin cấu hình của bạn.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2468,6 +2496,7 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | Định dạng cho module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
@ -2500,7 +2529,7 @@ The `shlvl` module shows the current `SHLVL` ("shell level") environment variabl
|
||||
| ----------- | ---------------------------- | ------------------------------------------------------------- |
|
||||
| `threshold` | `2` | Display threshold. |
|
||||
| `format` | `"[$symbol$shlvl]($style) "` | Định dạng cho module. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. |
|
||||
| `style` | `"bold yellow"` | Kiểu cho module. |
|
||||
| `disabled` | `true` | Disables the `shlvl` module. |
|
||||
@ -2564,7 +2593,7 @@ The `status` module displays the exit code of the previous command. The module w
|
||||
|
||||
::: thử thuật
|
||||
|
||||
Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiết lập `disabled` sang `false` trong tập tin cấu hình của bạn.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2572,31 +2601,36 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế
|
||||
|
||||
### Các tuỳ chọn
|
||||
|
||||
| Tuỳ chọn | Mặc định | Mô tả |
|
||||
| ----------------------- | ----------------------------- | ---------------------------------------------------- |
|
||||
| `format` | `"[$symbol$status]($style) "` | The format of the module |
|
||||
| `symbol` | `"✖"` | The symbol displayed on program error |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | Kiểu cho module. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `disabled` | `true` | Disables the `status` module. |
|
||||
| Tuỳ chọn | Mặc định | Mô tả |
|
||||
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `format` | `"[$symbol$status]($style) "` | The format of the module |
|
||||
| `symbol` | `"✖"` | The symbol displayed on program error |
|
||||
| `success_symbol` | `"✔️"` | The symbol displayed on program success |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | Kiểu cho module. |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `pipestatus` | `false` | Enable pipestatus reporting |
|
||||
| `pipestatus_separator` | `|` | The symbol that separate in pipe program exit codes |
|
||||
| `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. |
|
||||
|
||||
### Các biến
|
||||
|
||||
| Biến | Ví dụ | Mô tả |
|
||||
| -------------- | ------- | -------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| symbol | | Giá trị ghi đè tuỳ chọn `symbol` |
|
||||
| style\* | | Giá trị ghi đè của `style` |
|
||||
| Biến | Ví dụ | Mô tả |
|
||||
| -------------- | ------- | ------------------------------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format |
|
||||
| symbol | | Giá trị ghi đè tuỳ chọn `symbol` |
|
||||
| style\* | | Giá trị ghi đè của `style` |
|
||||
|
||||
\*: Biến này có thể chỉ được sử dụng như một phần của style string
|
||||
|
||||
@ -2617,7 +2651,7 @@ disabled = false
|
||||
|
||||
## Swift
|
||||
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn:
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `Package.swift` file
|
||||
- The current directory contains a file with the `.swift` extension
|
||||
@ -2719,7 +2753,7 @@ The `time` module shows the current **local** time. The `format` configuration v
|
||||
|
||||
::: thử thuật
|
||||
|
||||
Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiết lập `disabled` sang `false` trong tập tin cấu hình của bạn.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2761,7 +2795,7 @@ time_range = "10:00:00-14:00:00"
|
||||
|
||||
## Username
|
||||
|
||||
The `username` module shows active user's username. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn:
|
||||
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current user is root
|
||||
- The current user isn't the same as the one that is logged in
|
||||
@ -2910,7 +2944,7 @@ format = "[🆅 $repo](bold blue) "
|
||||
|
||||
## Zig
|
||||
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn:
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
|
@ -264,6 +264,17 @@
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Nushell
|
||||
|
||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
@ -110,7 +110,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
@ -362,3 +362,94 @@ symbol = "scala "
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
## Hide 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/hide-runtime-versions.png)
|
||||
|
||||
### Cấu hình
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dart]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[deno]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dotnet]
|
||||
format = "[$symbol(🎯 $tfm )]($style)"
|
||||
|
||||
[elixir]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[elm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[erlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[golang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[helm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[julia]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[kotlin]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[lua]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nim]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nodejs]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ocaml]
|
||||
format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)'
|
||||
|
||||
[perl]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[red]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ruby]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rust]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[swift]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vagrant]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
@ -18,7 +18,7 @@ features:
|
||||
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship:可用于各种 Shell 的提示符"
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and PowerShell.
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, and PowerShell.
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
@ -116,6 +116,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: warning Only elvish v0.15 or higher is supported. :::
|
||||
@ -139,7 +140,8 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
||||
@ -151,3 +153,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
@ -73,6 +73,7 @@ starship_precmd_user_func="set_win_title"
|
||||
样式字符串是用空格分隔的单词列表。 其中单词不是大小写敏感的(例如 `bold` 和 `BoLd` 被视为同一字符串)。 每个单词可以是以下之一:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
|
@ -21,7 +21,7 @@ success_symbol = "[➜](bold green)" # The "success_symbol" segment is being
|
||||
disabled = true
|
||||
```
|
||||
|
||||
You can change default configuration file location with `STARSHIP_CONFIG` environment variable:
|
||||
您可以使用 `STARSHIP_CONFIG` 环境变量更改默认配置文件的位置:
|
||||
|
||||
```sh
|
||||
export STARSHIP_CONFIG=~/.starship/config.toml
|
||||
@ -35,7 +35,7 @@ $ENV:STARSHIP_CONFIG = "$HOME\.starship\config.toml"
|
||||
|
||||
### 日志
|
||||
|
||||
By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to a instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable:
|
||||
默认情况下,Starship 会将警告和错误日志记录到文件 `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`. 其中 session key 与您的终端实例相对应。 不过,这也可以使用 `STARSHIP_CACHE` 环境变量来修改:
|
||||
|
||||
```sh
|
||||
export STARSHIP_CACHE=~/.starship/cache
|
||||
@ -49,7 +49,7 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
|
||||
|
||||
### 术语
|
||||
|
||||
**组件(Module)**:提示符的组成部分,通过来自系统的上下文信息向用户显示各种信息。 For example, the "nodejs" module shows the version of Node.js that is currently installed on your computer, if your current directory is a Node.js project.
|
||||
**组件(Module)**:提示符的组成部分,通过来自系统的上下文信息向用户显示各种信息。 例如,如果您当前的目录是 Node.js 项目,“nodejs” 模块会显示当前安装在您电脑上的 Node.js 的版本。
|
||||
|
||||
**Variable**: Smaller sub-components that contain information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of Node.js.
|
||||
|
||||
@ -142,12 +142,12 @@ format = '''
|
||||
|
||||
### 配置项
|
||||
|
||||
| Option | 默认值 | 描述 |
|
||||
| ----------------- | ----------------------------- | ------------------------------------------------------------ |
|
||||
| `format` | [见下文](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Starship 扫描文件的超时时间(单位:毫秒)。 |
|
||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
| Option | 默认值 | 描述 |
|
||||
| ----------------- | ----------------------------- | --------------------------- |
|
||||
| `format` | [见下文](#default-prompt-format) | 配置提示符的格式。 |
|
||||
| `scan_timeout` | `30` | Starship 扫描文件的超时时间(单位:毫秒)。 |
|
||||
| `command_timeout` | `500` | Startship 执行命令的超时时间(单位:毫秒)。 |
|
||||
| `add_newline` | `true` | 在 shell 提示符之间插入空行。 |
|
||||
|
||||
### 示例
|
||||
|
||||
@ -167,7 +167,7 @@ scan_timeout = 10
|
||||
add_newline = false
|
||||
```
|
||||
|
||||
### Default Prompt Format
|
||||
### 默认提示符格式
|
||||
|
||||
The default `format` is used to define the format of the prompt, if empty or no `format` is provided. 默认设置如下:
|
||||
|
||||
@ -935,6 +935,7 @@ Example: following configuration will display value of USER environment variable
|
||||
[env_var.USER]
|
||||
default = "unknown user"
|
||||
```
|
||||
:::
|
||||
|
||||
### 配置项
|
||||
|
||||
@ -1079,7 +1080,7 @@ asia-northeast1 = "an1"
|
||||
|
||||
## Git Branch
|
||||
|
||||
`git_branch` 组件显示当前目录的 git 仓库的活动分支。
|
||||
The `git_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### 配置项
|
||||
|
||||
@ -1123,15 +1124,15 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
|
||||
|
||||
### 配置项
|
||||
|
||||
| Option | 默认值 | 描述 |
|
||||
| -------------------- | ------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | 显示的 git 提交哈希值的长度。 |
|
||||
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | 组件格式化模板。 |
|
||||
| `style` | `"bold green"` | 此组件的样式。 |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | 禁用 `git_commit` 组件。 |
|
||||
| Option | 默认值 | 描述 |
|
||||
| -------------------- | ---------------------------------- | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | 显示的 git 提交哈希值的长度。 |
|
||||
| `format` | `"[\\($hash$tag\\)]($style) "` | 组件格式化模板。 |
|
||||
| `style` | `"bold green"` | 此组件的样式。 |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | 禁用 `git_commit` 组件。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -1154,7 +1155,7 @@ tag_symbol = "🔖 "
|
||||
|
||||
## Git State
|
||||
|
||||
`git_state` 组件会显示当前目录在哪个 git 仓库中,以及正在进行的操作,例如:_REBASING_,_BISECTING_ 等。 进度信息(例如 REBASING 3/10)如果存在则也会被显示。
|
||||
The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
|
||||
|
||||
### 配置项
|
||||
|
||||
@ -1198,7 +1199,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
|
||||
|
||||
::: tip
|
||||
|
||||
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1234,7 +1235,7 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
|
||||
## Git Status
|
||||
|
||||
`git_status`组件通过相应的符号显示您当前目录中 git 仓库的状态。
|
||||
The `git_status` module shows symbols representing the state of the repo in your current directory.
|
||||
|
||||
### 配置项
|
||||
|
||||
@ -1245,6 +1246,7 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
| `ahead` | `"⇡"` | The format of `ahead` |
|
||||
| `behind` | `"⇣"` | The format of `behind` |
|
||||
| `diverged` | `"⇕"` | The format of `diverged` |
|
||||
| `up_to_date` | `""` | The format of `up_to_date` |
|
||||
| `untracked` | `"?"` | The format of `untracked` |
|
||||
| `stashed` | `"$"` | The format of `stashed` |
|
||||
| `modified` | `"!"` | The format of `modified` |
|
||||
@ -1252,24 +1254,24 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
| `renamed` | `"»"` | The format of `renamed` |
|
||||
| `deleted` | `"✘"` | The format of `deleted` |
|
||||
| `style` | `"bold red"` | 此组件的样式。 |
|
||||
| `disabled` | `false` | 禁用 `git_status` 组件。 |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| 字段 | 描述 |
|
||||
| -------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | `style`对应值 |
|
||||
| 字段 | 描述 |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | `style`对应值 |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
@ -1296,6 +1298,7 @@ conflicted = "🏳"
|
||||
ahead = "🏎💨"
|
||||
behind = "😰"
|
||||
diverged = "😵"
|
||||
up_to_date = "✓"
|
||||
untracked = "🤷"
|
||||
stashed = "📦"
|
||||
modified = "📝"
|
||||
@ -1401,7 +1404,7 @@ format = "via [⎈ $version](bold white) "
|
||||
|
||||
## Hostname
|
||||
|
||||
`hostname` 组件显示系统主机名。
|
||||
The `hostname` module shows the system hostname.
|
||||
|
||||
### 配置项
|
||||
|
||||
@ -1475,7 +1478,7 @@ symbol = "🌟 "
|
||||
|
||||
## Jobs
|
||||
|
||||
`jobs` 组件显示当前正在运行的任务数量。 仅当有后台任务运行时,此组件才会显示。 如果有超过 1 个作业,模块将显示正在运行的作业数量,如果配置了 `threshold` 字段,则使用它作为显示作业数量的下限。 If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
|
||||
::: warning
|
||||
|
||||
@ -1606,7 +1609,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
|
||||
|
||||
::: tip
|
||||
|
||||
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1641,11 +1644,34 @@ format = 'on [⛵ $context \($namespace\)](dimmed green) '
|
||||
disabled = false
|
||||
[kubernetes.context_aliases]
|
||||
"dev.local.cluster.k8s" = "dev"
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
#### Regex Matching
|
||||
|
||||
Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions.
|
||||
|
||||
The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
|
||||
|
||||
Long and automatically generated cluster names can be identified and shortened using regular expressions:
|
||||
|
||||
```toml
|
||||
[kubernetes.context_aliases]
|
||||
# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
# Or better, to rename every OpenShift cluster at once:
|
||||
".*/(?P<cluster>[\\w-]+)/.*" = "$cluster"
|
||||
|
||||
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
|
||||
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
|
||||
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
## Line Break
|
||||
|
||||
`line_break` 组件将提示分隔为两行。
|
||||
The `line_break` module separates the prompt into two lines.
|
||||
|
||||
### 配置项
|
||||
|
||||
@ -1705,13 +1731,13 @@ format = "via [🌕 $version](bold blue) "
|
||||
|
||||
## Memory Usage
|
||||
|
||||
`memory_usage` 组件显示当前系统内存和交换区使用情况。
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
|
||||
默认情况下,如果系统交换区使用不为 0,则会显示交换区使用情况。
|
||||
By default the swap usage is displayed if the total system swap is non-zero.
|
||||
|
||||
::: tip
|
||||
|
||||
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1752,7 +1778,7 @@ style = "bold dimmed green"
|
||||
|
||||
## Mercurial Branch
|
||||
|
||||
`hg_branch` 组件显示当前目录的 hg 仓库的活动分支。
|
||||
The `hg_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### 配置项
|
||||
|
||||
@ -1830,7 +1856,7 @@ symbol = "🎣 "
|
||||
|
||||
## Nix-shell
|
||||
|
||||
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. 当处于一个 nix-shell 环境中时,此组件会被显示。
|
||||
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment.
|
||||
|
||||
### 配置项
|
||||
|
||||
@ -1994,12 +2020,13 @@ symbol = "☁️ "
|
||||
|
||||
## Package Version
|
||||
|
||||
当前目录是软件包的代码仓库时,将显示 `package` 组件,并显示软件包当前版本。 The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
|
||||
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||
@ -2013,13 +2040,14 @@ symbol = "☁️ "
|
||||
|
||||
### 配置项
|
||||
|
||||
| Option | 默认值 | 描述 |
|
||||
| ----------------- | --------------------------------- | --------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | 组件格式化模板。 |
|
||||
| `symbol` | `"📦 "` | 这个字段的内容会显示在当前软件包版本之前。 |
|
||||
| `style` | `"bold 208"` | 此组件的样式。 |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | 禁用 `package` 组件。 |
|
||||
| Option | 默认值 | 描述 |
|
||||
| ----------------- | --------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | 组件格式化模板。 |
|
||||
| `symbol` | `"📦 "` | 这个字段的内容会显示在当前软件包版本之前。 |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `style` | `"bold 208"` | 此组件的样式。 |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2163,7 +2191,7 @@ format = "via [$symbol$version](bold white)"
|
||||
|
||||
The `python` module shows the currently installed version of [Python](https://www.python.org/) and the current [Python virtual environment](https://docs.python.org/tutorial/venv.html) if one is activated.
|
||||
|
||||
如果`pyenv_version_name`被设置为`true`, 本组件将会展示pyenv版本名。 否则则显示通过`python --version`获得的版本号
|
||||
If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`.
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
@ -2187,7 +2215,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `style` | `"yellow bold"` | 此组件的样式。 |
|
||||
| `pyenv_version_name` | `false` | 使用 pyenv 获取 Python 版本 |
|
||||
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
|
||||
| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `detect_extensions` | `["py"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -2292,7 +2320,7 @@ format = "with [📐 $version](blue bold) "
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). 此组件只有满足以下条件之一时才会被显示:
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with `.red` or `.reds` extension
|
||||
|
||||
@ -2330,7 +2358,7 @@ symbol = "🔴 "
|
||||
|
||||
## Ruby
|
||||
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). 此组件只有满足以下条件之一时才会被显示:
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- 当前目录包含 `Gemfile` 文件
|
||||
- The current directory contains a `.ruby-version` file
|
||||
@ -2370,7 +2398,7 @@ symbol = "🔺 "
|
||||
|
||||
## Rust
|
||||
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). 此组件只有满足以下条件之一时才会被显示:
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- 当前目录包含 `Cargo.toml` 文件
|
||||
- 当前目录包含一个使用 `.rs` 扩展名的文件
|
||||
@ -2453,7 +2481,7 @@ The `shell` module shows an indicator for currently used shell.
|
||||
|
||||
::: tip
|
||||
|
||||
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2468,6 +2496,7 @@ The `shell` module shows an indicator for currently used shell.
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | 组件格式化模板。 |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
@ -2500,7 +2529,7 @@ The `shlvl` module shows the current `SHLVL` ("shell level") environment variabl
|
||||
| ----------- | ---------------------------- | ------------------------------------------------------------- |
|
||||
| `threshold` | `2` | Display threshold. |
|
||||
| `format` | `"[$symbol$shlvl]($style) "` | 组件格式化模板。 |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. |
|
||||
| `style` | `"bold yellow"` | 此组件的样式。 |
|
||||
| `disabled` | `true` | Disables the `shlvl` module. |
|
||||
@ -2564,7 +2593,7 @@ The `status` module displays the exit code of the previous command. The module w
|
||||
|
||||
::: tip
|
||||
|
||||
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2572,31 +2601,36 @@ The `status` module displays the exit code of the previous command. The module w
|
||||
|
||||
### 配置项
|
||||
|
||||
| Option | 默认值 | 描述 |
|
||||
| ----------------------- | ----------------------------- | ---------------------------------------------------- |
|
||||
| `format` | `"[$symbol$status]($style) "` | The format of the module |
|
||||
| `symbol` | `"✖"` | The symbol displayed on program error |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | 此组件的样式。 |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `disabled` | `true` | Disables the `status` module. |
|
||||
| Option | 默认值 | 描述 |
|
||||
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `format` | `"[$symbol$status]($style) "` | The format of the module |
|
||||
| `symbol` | `"✖"` | The symbol displayed on program error |
|
||||
| `success_symbol` | `"✔️"` | The symbol displayed on program success |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | 此组件的样式。 |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `pipestatus` | `false` | Enable pipestatus reporting |
|
||||
| `pipestatus_separator` | `|` | The symbol that separate in pipe program exit codes |
|
||||
| `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. |
|
||||
|
||||
### Variables
|
||||
|
||||
| 字段 | 示例 | 描述 |
|
||||
| -------------- | ------- | -------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| symbol | | `symbol`对应值 |
|
||||
| style\* | | `style`对应值 |
|
||||
| 字段 | 示例 | 描述 |
|
||||
| -------------- | ------- | ------------------------------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format |
|
||||
| symbol | | `symbol`对应值 |
|
||||
| style\* | | `style`对应值 |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
@ -2617,7 +2651,7 @@ disabled = false
|
||||
|
||||
## Swift
|
||||
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). 此组件只有满足以下条件之一时才会被显示:
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `Package.swift` file
|
||||
- The current directory contains a file with the `.swift` extension
|
||||
@ -2715,11 +2749,11 @@ format = "[🏎💨 $workspace]($style) "
|
||||
|
||||
## Time
|
||||
|
||||
`time` 组件显示当前的 **本地** 时间。 `format` 字段值会提供给 [`chrono`](https://crates.io/crates/chrono) crate 用来控制时间显示方式。 请参阅 [chrono strftime 文档](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) 以了解可用格式选项。
|
||||
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
|
||||
|
||||
::: tip
|
||||
|
||||
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2735,7 +2769,7 @@ format = "[🏎💨 $workspace]($style) "
|
||||
| `disabled` | `true` | 禁用 `time` 组件。 |
|
||||
| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
|
||||
|
||||
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. 否则,其默认值为 `"%T"`。 Manually setting `time_format` will override the `use_12hr` setting.
|
||||
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2761,7 +2795,7 @@ time_range = "10:00:00-14:00:00"
|
||||
|
||||
## Username
|
||||
|
||||
`username` 组件显示当前活跃的用户名。 此组件只有满足以下条件之一时才会被显示:
|
||||
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- 当前用户是 root
|
||||
- 当前用户与登录用户不相同
|
||||
@ -2910,7 +2944,7 @@ format = "[🆅 $repo](bold blue) "
|
||||
|
||||
## Zig
|
||||
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). 此组件只有满足以下条件之一时才会被显示:
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
|
@ -264,6 +264,17 @@
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Nushell
|
||||
|
||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
|
@ -110,7 +110,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
@ -362,3 +362,94 @@ symbol = "scala "
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
## Hide 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/hide-runtime-versions.png)
|
||||
|
||||
### 配置
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dart]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[deno]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dotnet]
|
||||
format = "[$symbol(🎯 $tfm )]($style)"
|
||||
|
||||
[elixir]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[elm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[erlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[golang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[helm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[julia]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[kotlin]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[lua]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nim]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nodejs]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ocaml]
|
||||
format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)'
|
||||
|
||||
[perl]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[red]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ruby]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rust]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[swift]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vagrant]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
@ -8,17 +8,17 @@ actionLink: ./guide/
|
||||
features:
|
||||
-
|
||||
title: 兼容性優先
|
||||
details: 能夠在最常見的作業系統之中最常見的 shell 上運作。 到處使用它吧!
|
||||
details: 能夠在最常見的作業系統之中最常見的 shell 上運作。 在各處使用它吧!
|
||||
-
|
||||
title: 由 Rust 支持
|
||||
details: 帶來同類最快速度以及 Rust 的安全性,讓你的提示字元盡可能快速與可靠。
|
||||
title: 以 Rust 開發
|
||||
details: 帶來同類中最快的速度以及 Rust 的安全性,讓你的提示字元盡可能快速與可靠。
|
||||
-
|
||||
title: 可客製化
|
||||
details: 任何些微的細節都可以隨你喜愛地客製化,讓你的提示字元可以隨你所欲地最小化或是充滿各種特色。
|
||||
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship:跨 Shell 提示字元"
|
||||
description: Starship 是適合任何 shell 的最小、極速、高度客製化的提示字元! 顯示你需要的訊息,同時保持順暢與最小化。 有針對 Bash、Fish、ZSH、Ion 與 Powershell 的快速安裝指南。
|
||||
description: Starship 是適合任何 shell 的最小、極速、高度客製化的提示字元! 顯示你需要的訊息,同時保持順暢與最小化。 針對 Bash、Fish、ZSH、Ion、Tcsh、Elvish、Nu、Xonsh 以及 Powershell 有快速安裝可供使用。
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
@ -30,7 +30,7 @@ description: Starship 是適合任何 shell 的最小、極速、高度客製化
|
||||
|
||||
### 先決要求
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
- 安裝至少一個 [Nerd Font](https://www.nerdfonts.com/) 字體,並在終端中啟用。
|
||||
|
||||
### 快速安裝
|
||||
|
||||
@ -99,7 +99,7 @@ description: Starship 是適合任何 shell 的最小、極速、高度客製化
|
||||
|
||||
#### Powershell
|
||||
|
||||
將以下內容放到 `Microsoft.PowerShell_profile.ps1` 的結尾。 你可以藉由在 PowerShell 查詢 `$PROFILE` 變數以取得這個檔案的位置。 一般來說檔案會出現在 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` 或是在 -Nix 上的話會在 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`。
|
||||
將以下內容放到 `Microsoft.PowerShell_profile.ps1` 的結尾。 你可以藉由在 PowerShell 查詢 `$PROFILE` 變數以取得這個檔案的位置。 一般來說,檔案會出現在 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1`,若是在 -Nix 上,檔案則會出現在 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`。
|
||||
|
||||
```sh
|
||||
Invoke-Expression (&starship init powershell)
|
||||
@ -116,6 +116,7 @@ description: Starship 是適合任何 shell 的最小、極速、高度客製化
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: warning 只有 elvish v0.15 或以上版本才有支援 :::
|
||||
@ -139,9 +140,10 @@ description: Starship 是適合任何 shell 的最小、極速、高度客製化
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
#### Nushell
|
||||
|
||||
::: warning 這項設定可能在未來改變 只支援 nu v0.33 以上的版本。 ::: 將以下內容放到你的 nu 設定檔裡, 你可以透過在 nu 執行 `config path` 指令來取得設定檔的位置。
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
@ -151,3 +153,14 @@ description: Starship 是適合任何 shell 的最小、極速、高度客製化
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
將以下內容放到 `~/.xonshrc` 的結尾:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
@ -73,6 +73,7 @@ starship_precmd_user_func="set_win_title"
|
||||
風格字串是一個以空白分開的單詞清單。 單字並不會區分大小寫(換句話說,`bold` 與 `BoLd` 是被當作兩個相同的字串)。 每個單詞可以是下列其中之一:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 設定
|
||||
|
||||
為了開始設定 Starship,請建立下右檔案: `~/.config/starship.toml`.
|
||||
要開始設定 Starship,請先建立檔案: `~/.config/starship.toml`.
|
||||
|
||||
```sh
|
||||
mkdir -p ~/.config && touch ~/.config/starship.toml
|
||||
@ -21,13 +21,13 @@ success_symbol = "[➜](bold green)" # The "success_symbol" segment is being
|
||||
disabled = true
|
||||
```
|
||||
|
||||
You can change default configuration file location with `STARSHIP_CONFIG` environment variable:
|
||||
你可以透過更改環境變數 `STARSHIP_CONFIG` 來變更設定檔存放的位置:
|
||||
|
||||
```sh
|
||||
export STARSHIP_CONFIG=~/.starship/config.toml
|
||||
```
|
||||
|
||||
Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
|
||||
等同於在 PowersShell(Windows)的 `$PROFILE` 中添加下列文字:
|
||||
|
||||
```powershell
|
||||
$ENV:STARSHIP_CONFIG = "$HOME\.starship\config.toml"
|
||||
@ -41,7 +41,7 @@ By default starship logs warnings and errors into a file named `~/.cache/starshi
|
||||
export STARSHIP_CACHE=~/.starship/cache
|
||||
```
|
||||
|
||||
Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
|
||||
等同於在 PowersShell(Windows)的 `$PROFILE` 中添加下列文字:
|
||||
|
||||
```powershell
|
||||
$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
|
||||
@ -935,6 +935,7 @@ Example: following configuration will display value of USER environment variable
|
||||
[env_var.USER]
|
||||
default = "unknown user"
|
||||
```
|
||||
:::
|
||||
|
||||
### 選項
|
||||
|
||||
@ -1079,7 +1080,7 @@ asia-northeast1 = "an1"
|
||||
|
||||
## Git 分支
|
||||
|
||||
`git_branch` 模組顯示現在的資料夾中使用中的儲存庫的分支。
|
||||
The `git_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### 選項
|
||||
|
||||
@ -1123,15 +1124,15 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| -------------------- | ------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | The format for the module. |
|
||||
| `style` | `"bold green"` | 這個模組的風格。 |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
| Option | 預設 | 說明 |
|
||||
| -------------------- | ---------------------------------- | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash$tag\\)]($style) "` | The format for the module. |
|
||||
| `style` | `"bold green"` | 這個模組的風格。 |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -1154,7 +1155,7 @@ tag_symbol = "🔖 "
|
||||
|
||||
## Git State
|
||||
|
||||
`git_state` 模組會顯示在 git 儲存庫中的資料夾內,以及會在有作業正在進行時顯示,像是:_REBASING_、_BISECTING_ 等等。 如果有進展的資訊 (像是 REBASING 3/10),也會一併顯示出來。
|
||||
The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
|
||||
|
||||
### 選項
|
||||
|
||||
@ -1198,7 +1199,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
|
||||
|
||||
::: tip
|
||||
|
||||
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1234,7 +1235,7 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
|
||||
## Git Status
|
||||
|
||||
`git_status` 模組顯示用來表示現在資料夾之中儲存庫狀態的符號。
|
||||
The `git_status` module shows symbols representing the state of the repo in your current directory.
|
||||
|
||||
### 選項
|
||||
|
||||
@ -1245,6 +1246,7 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
| `ahead` | `"⇡"` | The format of `ahead` |
|
||||
| `behind` | `"⇣"` | The format of `behind` |
|
||||
| `diverged` | `"⇕"` | The format of `diverged` |
|
||||
| `up_to_date` | `""` | The format of `up_to_date` |
|
||||
| `untracked` | `"?"` | The format of `untracked` |
|
||||
| `stashed` | `"$"` | The format of `stashed` |
|
||||
| `modified` | `"!"` | The format of `modified` |
|
||||
@ -1252,24 +1254,24 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
| `renamed` | `"»"` | The format of `renamed` |
|
||||
| `deleted` | `"✘"` | The format of `deleted` |
|
||||
| `style` | `"bold red"` | 這個模組的風格。 |
|
||||
| `disabled` | `false` | 停用 `git_status` 模組。 |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| 變數 | 說明 |
|
||||
| -------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged` `ahead` or `behind` format string based on the current status of the repo |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
| 變數 | 說明 |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
@ -1296,6 +1298,7 @@ conflicted = "🏳"
|
||||
ahead = "🏎💨"
|
||||
behind = "😰"
|
||||
diverged = "😵"
|
||||
up_to_date = "✓"
|
||||
untracked = "🤷"
|
||||
stashed = "📦"
|
||||
modified = "📝"
|
||||
@ -1401,7 +1404,7 @@ format = "via [⎈ $version](bold white) "
|
||||
|
||||
## 主機名稱
|
||||
|
||||
`hostname` 模組顯示系統的主機名稱。
|
||||
The `hostname` module shows the system hostname.
|
||||
|
||||
### 選項
|
||||
|
||||
@ -1475,7 +1478,7 @@ symbol = "🌟 "
|
||||
|
||||
## 工作
|
||||
|
||||
`jobs` 模組顯示現在正在執行中的工作。 這個模組只會在有背景工作正在執行時顯示。 這個模組會在工作數量超過一個,或者有設定 `threshold` 時且數量超過設定值時,顯示工作的數量。 If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
|
||||
::: warning
|
||||
|
||||
@ -1606,7 +1609,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
|
||||
|
||||
::: tip
|
||||
|
||||
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1641,11 +1644,34 @@ format = 'on [⛵ $context \($namespace\)](dimmed green) '
|
||||
disabled = false
|
||||
[kubernetes.context_aliases]
|
||||
"dev.local.cluster.k8s" = "dev"
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
#### Regex Matching
|
||||
|
||||
Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions.
|
||||
|
||||
The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
|
||||
|
||||
Long and automatically generated cluster names can be identified and shortened using regular expressions:
|
||||
|
||||
```toml
|
||||
[kubernetes.context_aliases]
|
||||
# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
|
||||
".*/openshift-cluster/.*" = "openshift"
|
||||
# Or better, to rename every OpenShift cluster at once:
|
||||
".*/(?P<cluster>[\\w-]+)/.*" = "$cluster"
|
||||
|
||||
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
|
||||
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
|
||||
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
|
||||
"gke_.*_(?P<cluster>[\\w-]+)" = "gke-$cluster"
|
||||
```
|
||||
|
||||
## 換行
|
||||
|
||||
`line_break` 模組將提示字元分成兩行。
|
||||
The `line_break` module separates the prompt into two lines.
|
||||
|
||||
### 選項
|
||||
|
||||
@ -1705,13 +1731,13 @@ format = "via [🌕 $version](bold blue) "
|
||||
|
||||
## 記憶體使用量
|
||||
|
||||
`memory_usage` 模組顯示現在系統記憶體與 swap 的使用量。
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
|
||||
預設 swap 使用量會在系統總 swap 使用量不為 0 時顯示出來。
|
||||
By default the swap usage is displayed if the total system swap is non-zero.
|
||||
|
||||
::: tip
|
||||
|
||||
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1830,7 +1856,7 @@ symbol = "🎣 "
|
||||
|
||||
## Nix-shell
|
||||
|
||||
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. 這個模組會在 nix-shell 環境中顯示。
|
||||
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment.
|
||||
|
||||
### 選項
|
||||
|
||||
@ -1994,12 +2020,13 @@ symbol = "☁️ "
|
||||
|
||||
## 套件版本
|
||||
|
||||
The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並顯示他的現在版本。 The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
|
||||
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
||||
- [**cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
|
||||
- [**poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory
|
||||
- [**python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||
- [**composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory
|
||||
- [**gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||
- [**julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present
|
||||
@ -2013,13 +2040,14 @@ The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ----------------- | --------------------------------- | --------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | 顯示在套件的版本之前的符號。 |
|
||||
| `style` | `"bold 208"` | 這個模組的風格。 |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | 停用 `package` 模組。 |
|
||||
| Option | 預設 | 說明 |
|
||||
| ----------------- | --------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"📦 "` | 顯示在套件的版本之前的符號。 |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `style` | `"bold 208"` | 這個模組的風格。 |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | Disables the `package` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2187,7 +2215,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `style` | `"yellow bold"` | 這個模組的風格。 |
|
||||
| `pyenv_version_name` | `false` | 使用 pyenv 取得 Python 的版本。 |
|
||||
| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
|
||||
| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. |
|
||||
| `detect_extensions` | `["py"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -2292,7 +2320,7 @@ format = "with [📐 $version](blue bold) "
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). 這個模組在下列其中一個條件達成時顯示:
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with `.red` or `.reds` extension
|
||||
|
||||
@ -2330,7 +2358,7 @@ symbol = "🔴 "
|
||||
|
||||
## Ruby
|
||||
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). 這個模組在下列其中一個條件達成時顯示:
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- 目前資料夾中有一個 `Gemfile` 檔案
|
||||
- The current directory contains a `.ruby-version` file
|
||||
@ -2370,7 +2398,7 @@ symbol = "🔺 "
|
||||
|
||||
## Rust
|
||||
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). 這個模組在下列其中一個條件達成時顯示:
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- 目前資料夾中有一個 `Cargo.toml` 檔案
|
||||
- 現在資料夾中包含一個檔案具有 `.rs` 副檔名
|
||||
@ -2453,7 +2481,7 @@ The `shell` module shows an indicator for currently used shell.
|
||||
|
||||
::: tip
|
||||
|
||||
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2468,6 +2496,7 @@ The `shell` module shows an indicator for currently used shell.
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
@ -2500,7 +2529,7 @@ The `shlvl` module shows the current `SHLVL` ("shell level") environment variabl
|
||||
| ----------- | ---------------------------- | ------------------------------------------------------------- |
|
||||
| `threshold` | `2` | Display threshold. |
|
||||
| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. |
|
||||
| `style` | `"bold yellow"` | 這個模組的風格。 |
|
||||
| `disabled` | `true` | Disables the `shlvl` module. |
|
||||
@ -2564,7 +2593,7 @@ The `status` module displays the exit code of the previous command. The module w
|
||||
|
||||
::: tip
|
||||
|
||||
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2572,31 +2601,36 @@ The `status` module displays the exit code of the previous command. The module w
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ----------------------- | ----------------------------- | ---------------------------------------------------- |
|
||||
| `format` | `"[$symbol$status]($style) "` | The format of the module |
|
||||
| `symbol` | `"✖"` | The symbol displayed on program error |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | 這個模組的風格。 |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `disabled` | `true` | Disables the `status` module. |
|
||||
| Option | 預設 | 說明 |
|
||||
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `format` | `"[$symbol$status]($style) "` | The format of the module |
|
||||
| `symbol` | `"✖"` | The symbol displayed on program error |
|
||||
| `success_symbol` | `"✔️"` | The symbol displayed on program success |
|
||||
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
|
||||
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
|
||||
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
|
||||
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
|
||||
| `style` | `"bold red"` | 這個模組的風格。 |
|
||||
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
|
||||
| `map_symbol` | `false` | Enable symbols mapping from exit code |
|
||||
| `pipestatus` | `false` | Enable pipestatus reporting |
|
||||
| `pipestatus_separator` | `|` | The symbol that separate in pipe program exit codes |
|
||||
| `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. |
|
||||
|
||||
### Variables
|
||||
|
||||
| 變數 | 範例 | 說明 |
|
||||
| -------------- | ------- | -------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
| 變數 | 範例 | 說明 |
|
||||
| -------------- | ------- | ------------------------------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
| common_meaning | `ERROR` | Meaning of the code if not a signal |
|
||||
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
|
||||
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
|
||||
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
|
||||
| pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
@ -2617,7 +2651,7 @@ disabled = false
|
||||
|
||||
## Swift
|
||||
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). 這個模組在下列其中一個條件達成時顯示:
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `Package.swift` file
|
||||
- The current directory contains a file with the `.swift` extension
|
||||
@ -2715,11 +2749,11 @@ format = "[🏎💨 $workspace]($style) "
|
||||
|
||||
## 時間
|
||||
|
||||
`time` 模組顯示目前的**當地**時間. `format` 設定值被 [`chrono`](https://crates.io/crates/chrono) crate 用來控制時間如何顯示。 請看 [chrono 的 strftime 文件](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)來了解有那些選項可以使用。
|
||||
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
|
||||
|
||||
::: tip
|
||||
|
||||
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2735,7 +2769,7 @@ format = "[🏎💨 $workspace]($style) "
|
||||
| `disabled` | `true` | 停用 `time` 模組。 |
|
||||
| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
|
||||
|
||||
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. 不然的話,它會被預設為 `"%T"`。 Manually setting `time_format` will override the `use_12hr` setting.
|
||||
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2761,7 +2795,7 @@ time_range = "10:00:00-14:00:00"
|
||||
|
||||
## 使用者名稱
|
||||
|
||||
`username` 模組顯示現在使用中的使用者名稱。 這個模組在下列其中一個條件達成時顯示:
|
||||
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- 目前使用者為 root
|
||||
- 目前使用者並非登入時的使用者
|
||||
@ -2910,7 +2944,7 @@ format = "[🆅 $repo](bold blue) "
|
||||
|
||||
## Zig
|
||||
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). 這個模組在下列其中一個條件達成時顯示:
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
|
@ -2,39 +2,39 @@
|
||||
|
||||
## 主頁示例圖中的效果是使用哪些配置達成的?
|
||||
|
||||
- **終端模擬器**: [iTerm2](https://iterm2.com/)
|
||||
- **模擬器主題**: Minimal
|
||||
- **配色方案**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
|
||||
- **字型**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)
|
||||
- **Shell**: [Fish Shell](https://fishshell.com/)
|
||||
- **fish 設定**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish)
|
||||
- **Prompt**: [Starship](https://starship.rs/)
|
||||
- **終端模擬器**:[iTerm2](https://iterm2.com/)
|
||||
- **模擬器主題**:Minimal
|
||||
- **配色方案**:[Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
|
||||
- **字型**:[FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)
|
||||
- **Shell**:[Fish Shell](https://fishshell.com/)
|
||||
- **Fish 設定**:[matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish)
|
||||
- **提示字元**:[Starship](https://starship.rs/)
|
||||
|
||||
## 我該如何做出示例圖中的命令自動補齊效果?
|
||||
|
||||
有關補全或是自動補齊的效果,主要是借助你使用的 Shell 本身提供的服務來達成。 而示例中環境是使用 [Fish Shell](https://fishshell.com/),原生就提供了補全功能。 如果你的環境是使用 Z Shell (zsh),建議參考一下 [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions)。
|
||||
|
||||
## Do top level `format` and `<module>.disabled` do the same thing?
|
||||
## 最上層的 `format` 與 `<module>.disabled` 的功能一樣嗎?
|
||||
|
||||
對,他們都可以被用來關閉提示字元中的 module。 如果你單純只是想關閉 modules,推薦使用 `<module>.disabled`,原因如下所述:
|
||||
|
||||
- 明確性:關閉 modules 的動作比在 top level `format` 標記忽略更爲清楚易懂
|
||||
- 當 Starship 更新後,新組件能被自動加入到提示字元中
|
||||
|
||||
## The docs say Starship is cross-shell. Why isn't my preferred shell supported?
|
||||
## 文件中提到 Starship 是跨 shell 的。 為什麼我偏好的 shell 沒有被支持?
|
||||
|
||||
Starship 構建方式基本上確立了他應當能支援所有 shell 的基礎。 Starship 的執行檔是不會紀錄狀態且不假設底下是哪種 Shell 的,所以只要你的 Shell 支援客製化命令提示字元以及 shell expansion,就應該要能使用 Starship。
|
||||
|
||||
以下是在 bash 上使用 Starship 的簡單例子:
|
||||
|
||||
```sh
|
||||
# Get the status code from the last command executed
|
||||
# 從最後一個執行的指令獲得當前 status code
|
||||
STATUS=$?
|
||||
|
||||
# Get the number of jobs running.
|
||||
# 獲得當前正在執行的工作數量
|
||||
NUM_JOBS=$(jobs -p | wc -l)
|
||||
|
||||
# Set the prompt to the output of `starship prompt`
|
||||
# 設置提示字元的輸出為 `starship prompt`
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
@ -60,24 +60,24 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux
|
||||
|
||||
如果你看見了一些不認得的符號,你可以使用 `starship explain` 來列出當下顯示出的 modules 的解釋。
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
## 為什麼我無法在我的提示字元中看到字形符號?
|
||||
|
||||
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
|
||||
會導致這種狀況,通常是因為系統配置錯誤。 有些 Linux 發行版不支援隨開隨用的字體。 你需要確保:
|
||||
|
||||
- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/).
|
||||
- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice.
|
||||
- You are using a [Nerd Font](https://www.nerdfonts.com/).
|
||||
- 你的當地語言設置為 UTF-8,如 `de_DE.UTF-8` 或 `ja_JP.UTF-8`。 如果 `LC_ALL` 不是 UTF-8,[你會需要改變他](https://www.tecmint.com/set-system-locales-in-linux/)。
|
||||
- 你已經安裝一個表情符號字體。 大多數的系統在預設情況下皆有支持表情符號字體,然後有些(尤其 Arch Linux)沒有。 你通常可以透過系統的套件管理器安裝一個表情符號字體 —— [noto emoji](https://www.google.com/get/noto/help/emoji/) 是個受歡迎的選擇。
|
||||
- 你正在使用 [Nerd Font](https://www.nerdfonts.com/)。
|
||||
|
||||
To test your system, run the following commands in a terminal:
|
||||
要測試你的系統,你可以在終端中執行以下指令:
|
||||
|
||||
```sh
|
||||
echo -e "\xf0\x9f\x90\x8d"
|
||||
echo -e "\xee\x82\xa0"
|
||||
```
|
||||
|
||||
The first line should produce a [snake emoji](https://emojipedia.org/snake/), while the second should produce a [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs).
|
||||
第一行指令應該會顯示一個 [snake emoji](https://emojipedia.org/snake/),同時,第二行指令應該顯示 [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs)。
|
||||
|
||||
If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose)
|
||||
如果任何一個符號顯示錯誤,代表你的系統配置仍然是錯誤的。 不幸的是,正確的設置字體有時候是件困難的事。 Discord 上的使用者可能可以提供協助。 如果兩種符號皆正確顯示,但你仍然無法在 starship 中看到他們,請[發送 bug 回報](https://github.com/starship/starship/issues/new/choose)!
|
||||
|
||||
## 我要如何從電腦中移除 Starship?
|
||||
|
||||
@ -91,6 +91,6 @@ If either symbol fails to display correctly, your system is still misconfigured.
|
||||
如果你是透過安裝腳本來安裝 Starship 的,可以執行以下的命令來移除執行檔。
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
# 定位並且刪除 starship 執行檔
|
||||
sh -c 'rm "$(which starship)"'
|
||||
```
|
||||
|
@ -2,7 +2,7 @@
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship – Cross-shell prompt"
|
||||
alt="Starship – 跨 Shell 的提示字元"
|
||||
/>
|
||||
</p>
|
||||
|
||||
@ -30,16 +30,16 @@
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Follow @StarshipPrompt on Twitter"
|
||||
alt="在推特上追蹤 @StarshipPrompt"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs">Website</a>
|
||||
<a href="https://starship.rs">網站</a>
|
||||
·
|
||||
<a href="#🚀-installation">Installation</a>
|
||||
<a href="#🚀-installation">安裝</a>
|
||||
·
|
||||
<a href="https://starship.rs/config/">Configuration</a>
|
||||
<a href="https://starship.rs/config/">設定</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@ -126,15 +126,15 @@
|
||||
|
||||
**適合任何 shell 的最小、極速、無限客製化的提示字元!**
|
||||
|
||||
- **Fast:** it's fast – _really really_ fast! 🚀
|
||||
- **Customizable:** configure every aspect of your prompt.
|
||||
- **Universal:** works on any shell, on any operating system.
|
||||
- **Intelligent:** shows relevant information at a glance.
|
||||
- **Feature rich:** support for all your favorite tools.
|
||||
- **Easy:** quick to install – start using it in minutes.
|
||||
- **快:**很快 —— 非常非常快! 🚀
|
||||
- **可客製化:**全方面定制你的提示字元。
|
||||
- **通用:**適用於任何 Shell 以及作業系統。
|
||||
- **智能:**一目了然地顯示相關信息。
|
||||
- **豐富的功能:**支援所以有你喜歡的工具。
|
||||
- **易用:**安裝快速 —— 幾分鐘內就可以開始使用。
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs/config/"><strong>Explore the Starship docs ▶</strong></a>
|
||||
<a href="https://starship.rs/config/"><strong>探索 Starship 文件 ▶</strong></a>
|
||||
</p>
|
||||
|
||||
<a name="🚀-installation"></a>
|
||||
@ -143,11 +143,11 @@
|
||||
|
||||
### 先決要求
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)).
|
||||
- 安裝至少一個 [Nerd Font](https://www.nerdfonts.com/) 字體,並在終端中啟用(例如,你可以試試 [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads))。
|
||||
|
||||
### 入門
|
||||
|
||||
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
|
||||
**備註:**由於不同平台的數量眾多,下方僅顯示部分已支持平台。 找不到你正在使用的平台? 我想你可以來[額外平台說明](https://starship.rs/installing/)看看。
|
||||
|
||||
1. 安裝 **starship** 執行檔:
|
||||
|
||||
@ -155,7 +155,7 @@
|
||||
#### 安裝最新版本
|
||||
|
||||
|
||||
##### From prebuilt binary, with Shell:
|
||||
##### 從預構建的二進制包,並且使用 Shell 命令:
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
@ -163,7 +163,7 @@
|
||||
如果想更新已安裝的 Starship,請重新執行上述指令。 指令只會更新 Starship 執行檔本身,不會影響到任何已撰寫的設定檔。
|
||||
|
||||
|
||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
||||
**備註** —— 安裝腳本的預設值可以被覆蓋,請使用以下指令查看內置說明。
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
@ -173,7 +173,7 @@
|
||||
#### 使用套件管理器安裝:
|
||||
|
||||
|
||||
##### Example: [Homebrew](https://brew.sh/):
|
||||
##### 使用 [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
@ -224,7 +224,7 @@
|
||||
|
||||
#### PowerShell
|
||||
|
||||
將以下內容放到 `Microsoft.PowerShell_profile.ps1` 的結尾。 你可以藉由在 PowerShell 查詢 `$PROFILE` 變數以取得這個檔案的位置。 一般來說檔案會出現在 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` 或是在 -Nix 上的話會在 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`。
|
||||
將以下內容放到 `Microsoft.PowerShell_profile.ps1` 的結尾。 你可以藉由在 PowerShell 查詢 `$PROFILE` 變數以取得這個檔案的位置。 一般來說,檔案會出現在 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1`,若是在 -Nix 上,檔案則會出現在 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`。
|
||||
|
||||
```powershell
|
||||
Invoke-Expression (&starship init powershell)
|
||||
@ -264,9 +264,20 @@
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
將以下內容加到 `~/.xonshrc` 的結尾:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Nushell
|
||||
|
||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
|
||||
**警告:**此處設定在未來可能有所變動。 只支援 nu v0.33 以上的版本。 將以下內容放到 Nushell 設定檔的結尾。 你可以透過在 nu 執行 `config path` 指令來取得設定檔的位置。
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
@ -281,18 +292,18 @@
|
||||
|
||||
我們歡迎具有**各式各樣能力**的貢獻者! 如果你正在尋找容易加入的方法,試試看標註為「[good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)」的 issue。
|
||||
|
||||
If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/).
|
||||
如果您精通非英語語言,並能協助我們在文檔上的翻譯保持最新狀態,我們會非常感謝! 如果你想要提供翻譯,可以到 [Starship Crowdin](https://translate.starship.rs/) 上提交您的翻譯。
|
||||
|
||||
如果你對貢獻 Starship 有興趣,請看我們的 [貢獻指南](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) 。 另外,請不用客氣加入我們的 [Discord 伺服器](https://discord.gg/8Jzqu3T) 並來問候一下。 👋
|
||||
|
||||
### 專案貢獻者
|
||||
|
||||
This project exists thanks to all the people who contribute. [[我要貢獻](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]
|
||||
感謝所有做出貢獻的人,使這個專案能夠存在。 [[我要貢獻](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]
|
||||
<a href="https://github.com/starship/starship/graphs/contributors"><img src="https://opencollective.com/starship/contributors.svg?width=890&button=false" /></a>
|
||||
|
||||
### 專案資助者
|
||||
|
||||
成為專案資助者,推動社群永續經營 [[Contribute](https://opencollective.com/starship/contribute)]
|
||||
成為專案資助者,推動社群永續經營 [[成為贊助者](https://opencollective.com/starship/contribute)]
|
||||
|
||||
#### 個人
|
||||
|
||||
@ -300,7 +311,7 @@ This project exists thanks to all the people who contribute. [[我要貢獻](htt
|
||||
|
||||
#### 組織
|
||||
|
||||
以組織名義資助專案 這裏會產生一個能連向您組織網站的連結標誌。 [[Contribute](https://opencollective.com/starship/contribute)]
|
||||
以組織名義資助專案 這裏會產生一個能連向您組織網站的連結標誌。 [[成為贊助組織](https://opencollective.com/starship/contribute)]
|
||||
|
||||
<a href="https://opencollective.com/starship/organization/0/website"><img src="https://opencollective.com/starship/organization/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/1/website"><img src="https://opencollective.com/starship/organization/1/avatar.svg"></a>
|
||||
|
@ -1,21 +1,21 @@
|
||||
# 🚀 Advanced Installation
|
||||
# 🚀 進階安裝
|
||||
|
||||
To install starship, you need to do two things:
|
||||
要安裝 starship,你必須做兩件事:
|
||||
|
||||
1. Get the **starship** binary onto your computer
|
||||
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
|
||||
1. 下載 **starship** 執行檔到你的電腦裡
|
||||
1. 修改 shell 的初始化腳本,讓其使用 starship 作為提示字元
|
||||
|
||||
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
|
||||
對大部分的使用者來說,在[主頁面](/guide/#🚀-installation)的安裝指引皆足以正常運作。 然而,對於一些較特別的平台,我們需要不同的安裝指引。
|
||||
|
||||
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
|
||||
有太多平台不適用於主要的 README.md 檔案了,所以這裡有一些來自社群的其他平台的安裝指引。 你的平台不在這裡嗎? 如果你找出怎麼安裝,請幫我們加上你的指引!
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### 先決要求
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
前往[Chocolatey 安裝頁面](https://chocolatey.org/install),並且跟隨指引來安裝 Chocolatey。
|
||||
|
||||
### Installation
|
||||
### 安裝
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
@ -29,7 +29,7 @@ choco install starship
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### Installation
|
||||
### 安裝
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
@ -37,17 +37,17 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Getting the Binary
|
||||
### 獲得執行檔
|
||||
|
||||
#### Imperatively
|
||||
#### 命令式
|
||||
|
||||
```sh
|
||||
nix-env -iA nixos.starship
|
||||
```
|
||||
|
||||
#### Declarative, single user, via [home-manager](https://github.com/nix-community/home-manager)
|
||||
#### 聲明式、單個使用者,使用 [home-manager](https://github.com/nix-community/home-manager)
|
||||
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
在 `home.nix` 檔案中,啟用 `programs.starship` 模組,並且添加你的設定:
|
||||
|
||||
```nix
|
||||
{
|
||||
@ -69,15 +69,15 @@ Enable the `programs.starship` module in your `home.nix` file, and add your sett
|
||||
}
|
||||
```
|
||||
|
||||
then run
|
||||
然後執行
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
```
|
||||
|
||||
#### Declarative, system-wide, with NixOS
|
||||
#### 聲明式、全系統,使用 NixOS
|
||||
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
將 `pkgs.starship` 添加至 `configuration.nix` 檔案內的 `environment.systemPackages` 下,並且執行
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
|
@ -1,16 +1,16 @@
|
||||
# Presets
|
||||
# 預設樣式
|
||||
|
||||
Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊
|
||||
這裡蒐集了社群提交的 Starship 預設樣式。 如果你也想要分享你的樣式,請[提交一個 PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) 來更新這個檔案! 😊
|
||||
|
||||
## Nerd Font Symbols
|
||||
## Nerd Font 符號
|
||||
|
||||
This preset doesn't change anything except for the symbols used for each module. If emojis aren't your thing, this might catch your eye!
|
||||
這個預設樣式不會更改每個模組使用的符號外的任何東西。 如果你不喜歡使用 emojis,這個可能會是你所中意的!
|
||||
|
||||
![Screenshot of Nerd Font Symbols preset](/presets/nerd-font-symbols.png)
|
||||
![Nerd Font 預設樣式的截圖](/presets/nerd-font-symbols.png)
|
||||
|
||||
### 先決要求
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
|
||||
- 安裝一個 [Nerd Font](https://www.nerdfonts.com/) 並且在終端中啟用(範例使用 Fira Code Nerd Font)
|
||||
|
||||
### 設定
|
||||
|
||||
@ -88,17 +88,17 @@ symbol = " "
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## Bracketed Segments
|
||||
## 括號片段
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
這個預設樣式使所有模組使用括號片段內的格式顯示,而非使用 Starship 預設("via", "on", etc.)。
|
||||
|
||||
Before:
|
||||
變更前:
|
||||
|
||||
![Screenshot of default Starship configuration](/presets/bracketed-segments-before.png)
|
||||
![預設 Starship 樣式的截圖](/presets/bracketed-segments-before.png)
|
||||
|
||||
After:
|
||||
變更後:
|
||||
|
||||
![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png)
|
||||
![括號片段預設樣式的截圖](/presets/bracketed-segments-after.png)
|
||||
|
||||
### 設定
|
||||
|
||||
@ -110,7 +110,7 @@ format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
@ -239,17 +239,17 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## Plain Text Symbols
|
||||
## 純文字符號
|
||||
|
||||
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
|
||||
這個預設樣式將符號換成了純文本。 如果你的終端 / 字體無法渲染 NerdFonts/emojis,或許你該試試這套樣式!
|
||||
|
||||
Before (default setting with Fixedsys font):
|
||||
變更前(預設,搭配 Fixedsys font):
|
||||
|
||||
![Screenshot of default Starship configuration with Fixedsys font](/presets/plain-text-symbols-before.png)
|
||||
![預設 Starship 樣式搭配 Fixedsys font 的截圖](/presets/plain-text-symbols-before.png)
|
||||
|
||||
After (Plain Text Symbols):
|
||||
變更後(純文字符號):
|
||||
|
||||
![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png)
|
||||
![純文字符號預設樣式的截圖](/presets/plain-text-symbols-after.png)
|
||||
|
||||
### 設定
|
||||
|
||||
@ -362,3 +362,94 @@ symbol = "scala "
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
## 隱藏執行環境版本
|
||||
|
||||
這個預設樣式隱藏了各個語言的執行環境版本。 如果你在容器或者虛擬環境中工作,那麼這個樣式是為你設計的!
|
||||
|
||||
![隱藏運行版本預設樣式的截圖](/presets/hide-runtime-versions.png)
|
||||
|
||||
### 設定
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dart]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[deno]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dotnet]
|
||||
format = "[$symbol(🎯 $tfm )]($style)"
|
||||
|
||||
[elixir]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[elm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[erlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[golang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[helm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[julia]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[kotlin]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[lua]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nim]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nodejs]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ocaml]
|
||||
format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)'
|
||||
|
||||
[perl]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[red]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ruby]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rust]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[swift]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vagrant]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user