feat(vcsh): Add new module for VCSH (#2513)

* feat(vcsh): Implement new VCSH module

* test(vcsh): Add unit tests for VCSH module

* docs(vcsh): Document VCSH module
This commit is contained in:
Caleb Maclennan
2021-03-28 18:48:15 +03:00
committed by GitHub
parent 404b4f3d0c
commit f13e44c730
7 changed files with 136 additions and 0 deletions
+34
View File
@@ -189,6 +189,7 @@ $hostname\
$shlvl\
$kubernetes\
$directory\
$vcsh\
$git_branch\
$git_commit\
$git_state\
@@ -2717,6 +2718,39 @@ By default the module will be shown if any of the following conditions are met:
format = "via [⍱ $version](bold white) "
```
## VCSH
The `vcsh` module displays the current active VCSH repository.
The module will be shown only if a repository is currently in use.
### Options
| Option | Default | Description |
| ---------- | -------------------------------- | -------------------------------------------------------|
| `symbol` | | The symbol used before displaying the repository name. |
| `style` | `"bold yellow"` | The style for the module. |
| `format` | `"vcsh [$symbol$repo]($style) "` | The format for the module. |
| `disabled` | `false` | Disables the `vcsh` module. |
### Variables
| Variable | Example | Description |
| -------- | ------------------------------------------- | -------------------------------------|
| repo | `dotfiles` if in a VCSH repo named dotfiles | The active repository name |
| symbol | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
### Example
```toml
# ~/.config/starship.toml
[vcsh]
format = "[🆅 $repo](bold blue) "
```
## Zig
By default the the `zig` module shows the currently installed version of Zig.