Add option gcloud.project_aliases (#3599)

* feat: gcloud.project_aliases

* feat: add option gcloud.project_aliases
This commit is contained in:
Kotaro Abe
2022-02-14 21:16:45 +09:00
committed by GitHub
parent 0ea16e2641
commit 32aca11c4a
3 changed files with 59 additions and 7 deletions
+19 -7
View File
@@ -1224,13 +1224,14 @@ This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gc
### Options
| Option | Default | Description |
| ---------------- | -------------------------------------------------------- | --------------------------------------------------------------- |
| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | The format for the module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. |
| `region_aliases` | | Table of region aliases to display in addition to the GCP name. |
| `style` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `gcloud` module. |
| Option | Default | Description |
| ----------------- | -------------------------------------------------------- | ---------------------------------------------------------------- |
| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | The format for the module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. |
| `region_aliases` | | Table of region aliases to display in addition to the GCP name. |
| `project_aliases` | | Table of project aliases to display in addition to the GCP name. |
| `style` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `gcloud` module. |
### Variables
@@ -1279,6 +1280,17 @@ us-central1 = "uc1"
asia-northeast1 = "an1"
```
#### Display account and aliased project
```toml
# ~/.config/starship.toml
[gcloud]
format = 'on [$symbol$account(@$domain)(\($project\))]($style) '
[gcloud.project_aliases]
very-long-project-name = "vlpn"
```
## Git Branch
The `git_branch` module shows the active branch of the repo in your current directory.