oh-my-posh/website/docs/segments/gcp.mdx

44 lines
1.2 KiB
Plaintext
Raw Normal View History

2022-08-17 09:12:18 -07:00
---
id: gcp
title: GCP Context
sidebar_label: GCP
---
## What
Display the currently active GCP project, region and account
## Sample Configuration
2023-03-31 11:55:36 -07:00
import Config from '@site/src/components/Config.js';
<Config data={{
2022-08-17 09:12:18 -07:00
"type": "gcp",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#47888d",
2022-10-06 02:08:56 -07:00
"template": " \uE7B2 {{.Project}} :: {{.Account}} "
2023-03-31 11:55:36 -07:00
}}/>
2022-08-17 09:12:18 -07:00
## Template ([info][templates])
:::note default template
```template
2022-08-17 09:12:18 -07:00
{{ 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 |
2022-08-17 09:12:18 -07:00
[templates]: /docs/configuration/templates