Back to Oh My Posh

GCP Context

website/docs/segments/cloud/gcp.mdx

29.12.01.3 KB
Original Source

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: " \udb84\uddf6 {{.Project}} :: {{.Account}} ", }} />

Template (info)

:::note default template

template
{{ if .Error }}{{ .Error }}{{ else }}{{ .Project }}{{ end }}

:::

Properties

NameTypeDescription
.Projectstringthe currently active project
.Accountstringthe currently active account
.Regionstringdefault region for the active context
.ActiveConfigstringthe active configuration name
.Errorstringcontains any error messages generated when trying to load the GCP config