feat(fossil_branch): add fossil_branch module (#4806)

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
This commit is contained in:
Vegard Skui
2023-01-31 09:06:46 +01:00
committed by GitHub
parent 3d76a987d6
commit 41eb98b310
13 changed files with 367 additions and 0 deletions
+37
View File
@@ -265,6 +265,7 @@ $singularity\
$kubernetes\
$directory\
$vcsh\
$fossil_branch\
$git_branch\
$git_commit\
$git_state\
@@ -1556,6 +1557,42 @@ Produces a prompt that looks like:
AA -------------------------------------------- BB -------------------------------------------- CC
```
## Fossil Branch
The `fossil_branch` module shows the name of the active branch of the check-out in your current directory.
### Options
| Option | Default | Description |
| ------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- |
| `format` | `'on [$symbol$branch]($style) '` | The format for the module. Use `'$branch'` to refer to the current branch name. |
| `symbol` | `' '` | The symbol used before the branch name of the check-out in your current directory. |
| `style` | `'bold purple'` | The style for the module. |
| `truncation_length` | `2^63 - 1` | Truncates a Fossil branch name to `N` graphemes |
| `truncation_symbol` | `'…'` | The symbol used to indicate a branch name was truncated. You can use `''` for no symbol. |
| `disabled` | `true` | Disables the `fossil_branch` module. |
### Variables
| Variable | Example | Description |
| -------- | ------- | ------------------------------------ |
| branch | `trunk` | The active Fossil branch |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
### Example
```toml
# ~/.config/starship.toml
[fossil_branch]
symbol = '🦎 '
truncation_length = 4
truncation_symbol = ''
```
## Google Cloud (`gcloud`)
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI.