mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user