feat: Add the hg_branch module (#569)

This commit is contained in:
Luca Greco
2019-12-02 23:37:18 +01:00
committed by Matan Kushner
parent 33df8ac063
commit 337f213753
12 changed files with 383 additions and 0 deletions
+26
View File
@@ -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.