mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
docs: aws segment
This commit is contained in:
parent
3c1c0f87df
commit
616cc3a685
38
docs/docs/segment-aws.md
Normal file
38
docs/docs/segment-aws.md
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
---
|
||||||
|
id: aws
|
||||||
|
title: AWS Context
|
||||||
|
sidebar_label: AWS
|
||||||
|
---
|
||||||
|
|
||||||
|
## What
|
||||||
|
|
||||||
|
Display the currently active AWS profile and region.
|
||||||
|
|
||||||
|
## Sample Configuration
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"type": "aws",
|
||||||
|
"style": "powerline",
|
||||||
|
"powerline_symbol": "\uE0B0",
|
||||||
|
"foreground": "#ffffff",
|
||||||
|
"background": "#FFA400",
|
||||||
|
"properties": {
|
||||||
|
"prefix": " \uE7AD ",
|
||||||
|
"template": "{{.Profile}}{{if .Region}}@{{.Region}}{{end}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
- template: `string` - A go [text/template][go-text-template] template extended with [sprig][sprig] utilizing the
|
||||||
|
properties below. Defaults to `{{.Context}}{{if .Namespace}} :: {{.Namespace}}{{end}}`
|
||||||
|
|
||||||
|
## Template Properties
|
||||||
|
|
||||||
|
- `.Profile`: `string` - the currently active profile
|
||||||
|
- `.Region`: `string` - the currently active region
|
||||||
|
|
||||||
|
[go-text-template]: https://golang.org/pkg/text/template/
|
||||||
|
[sprig]: https://masterminds.github.io/sprig/
|
|
@ -9,6 +9,7 @@ module.exports = {
|
||||||
type: "category",
|
type: "category",
|
||||||
label: "Segments",
|
label: "Segments",
|
||||||
items: [
|
items: [
|
||||||
|
"aws",
|
||||||
"az",
|
"az",
|
||||||
"battery",
|
"battery",
|
||||||
"command",
|
"command",
|
||||||
|
|
|
@ -30,6 +30,12 @@
|
||||||
"description": "The string to display when the command is not available",
|
"description": "The string to display when the command is not available",
|
||||||
"default": ""
|
"default": ""
|
||||||
},
|
},
|
||||||
|
"template": {
|
||||||
|
"type": "string",
|
||||||
|
"title": "Template text",
|
||||||
|
"description": "The template to use to render the segment text",
|
||||||
|
"default": ""
|
||||||
|
},
|
||||||
"block": {
|
"block": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "https://ohmyposh.dev/docs/configure#block",
|
"description": "https://ohmyposh.dev/docs/configure#block",
|
||||||
|
@ -137,7 +143,8 @@
|
||||||
"julia",
|
"julia",
|
||||||
"ruby",
|
"ruby",
|
||||||
"ytm",
|
"ytm",
|
||||||
"executiontime"
|
"executiontime",
|
||||||
|
"aws"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"style": {
|
"style": {
|
||||||
|
@ -705,7 +712,36 @@
|
||||||
},
|
},
|
||||||
"then": {
|
"then": {
|
||||||
"title": "Kubectl Segment",
|
"title": "Kubectl Segment",
|
||||||
"description": "https://ohmyposh.dev/docs/kubectl"
|
"description": "https://ohmyposh.dev/docs/kubectl",
|
||||||
|
"properties": {
|
||||||
|
"properties": {
|
||||||
|
"properties": {
|
||||||
|
"template": {
|
||||||
|
"$ref": "#/definitions/template"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"if": {
|
||||||
|
"properties": {
|
||||||
|
"type": { "const": "aws" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"then": {
|
||||||
|
"title": "AWS Segment",
|
||||||
|
"description": "https://ohmyposh.dev/docs/aws",
|
||||||
|
"properties": {
|
||||||
|
"properties": {
|
||||||
|
"properties": {
|
||||||
|
"template": {
|
||||||
|
"$ref": "#/definitions/template"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue