mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-28 20:39:40 -08:00
44 lines
1.2 KiB
Plaintext
44 lines
1.2 KiB
Plaintext
---
|
|
id: gcp
|
|
title: GCP Context
|
|
sidebar_label: GCP
|
|
---
|
|
|
|
## What
|
|
|
|
Display the currently active GCP project, region and account
|
|
|
|
## Sample Configuration
|
|
|
|
import Config from '@site/src/components/Config.js';
|
|
|
|
<Config data={{
|
|
"type": "gcp",
|
|
"style": "powerline",
|
|
"powerline_symbol": "\uE0B0",
|
|
"foreground": "#ffffff",
|
|
"background": "#47888d",
|
|
"template": " \uE7B2 {{.Project}} :: {{.Account}} "
|
|
}}/>
|
|
|
|
## Template ([info][templates])
|
|
|
|
:::note default template
|
|
|
|
```template
|
|
{{ if .Error }}{{ .Error }}{{ else }}{{ .Project }}{{ end }}
|
|
```
|
|
|
|
:::
|
|
|
|
### Properties
|
|
|
|
| Name | Type | Description |
|
|
| ---------- | -------- | ------------------------------------------------------------------------ |
|
|
| `.Project` | `string` | the currently active project |
|
|
| `.Account` | `string` | the currently active account |
|
|
| `.Region` | `string` | default region for the active context |
|
|
| `.Error` | `string` | contains any error messages generated when trying to load the GCP config |
|
|
|
|
[templates]: /docs/configuration/templates
|