feat(azure): subscription name aliases (#4949)

* From issue #4448, added `subscription_aliases`
as a field for the Azure module

Can be set in starship.toml with
[azure.subscription_aliases]

* Updated config file schema

* Added entry into documentation

* Update README.md

* Formatted with dprint
This commit is contained in:
marcybell
2023-04-14 03:03:14 +08:00
committed by GitHub
parent edb96cad58
commit 27ffa37cfd
4 changed files with 107 additions and 7 deletions
+16 -6
View File
@@ -448,12 +448,13 @@ The `azure` module shows the current Azure Subscription. This is based on showin
### Options
| Variable | Default | Description |
| ---------- | ---------------------------------------- | ------------------------------------------ |
| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. |
| `symbol` | `'ﴃ '` | The symbol used in the format. |
| `style` | `'blue bold'` | The style used in the format. |
| `disabled` | `true` | Disables the `azure` module. |
| Variable | Default | Description |
| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- |
| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. |
| `symbol` | `'ﴃ '` | The symbol used in the format. |
| `style` | `'blue bold'` | The style used in the format. |
| `disabled` | `true` | Disables the `azure` module. |
| `subscription_aliases` | `{}` | Table of subscription name aliases to display in addition to Azure subscription name. |
### Examples
@@ -481,6 +482,15 @@ symbol = "ﴃ "
style = "blue bold"
```
#### Display Subscription Name Alias
```toml
# ~/.config/starship.toml
[azure.subscription_aliases]
very-long-subscription-name = 'vlsn'
```
## Battery
The `battery` module shows how charged the device's battery is and its current charging status.