mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat: Add the hg_branch module (#569)
This commit is contained in:
committed by
Matan Kushner
parent
33df8ac063
commit
337f213753
@@ -93,6 +93,7 @@ prompt_order = [
|
||||
"git_branch",
|
||||
"git_state",
|
||||
"git_status",
|
||||
"hg_branch",
|
||||
"package",
|
||||
"dotnet",
|
||||
"golang",
|
||||
@@ -559,6 +560,31 @@ The module will be shown if any of the following conditions are met:
|
||||
symbol = "🏎💨 "
|
||||
```
|
||||
|
||||
## Mercurial Branch
|
||||
|
||||
The `hg_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| ------------------- | --------------- | -------------------------------------------------------------------------------------------- |
|
||||
| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. |
|
||||
| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes |
|
||||
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. |
|
||||
| `style` | `"bold purple"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `hg_branch` module. |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[hg_branch]
|
||||
symbol = "🌱 "
|
||||
truncation_length = 4
|
||||
truncation_symbol = ""
|
||||
```
|
||||
|
||||
## Hostname
|
||||
|
||||
The `hostname` module shows the system hostname.
|
||||
|
||||
Reference in New Issue
Block a user