mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat(red,vlang): Add version formatting (#2987)
Have added version formatting to the red and vlang modules. Note the docs for red already mentioned the `version_format` string but it had not actually been added.
This commit is contained in:
+11
-10
@@ -3044,21 +3044,22 @@ By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | -------------------------------------------- | -------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"V "` | A format string representing the symbol of V |
|
||||
| `detect_extensions` | `["v"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"blue bold"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `vlang` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"V "` | A format string representing the symbol of V |
|
||||
| `detect_extensions` | `["v"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"blue bold"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `vlang` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | -------- | ------------------------------------ |
|
||||
| version | `v0.2` | The version of `v` |
|
||||
| version | `v0.2` | The version of `v` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user