mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-27 03:49:40 -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",
|
||||
label: "Segments",
|
||||
items: [
|
||||
"aws",
|
||||
"az",
|
||||
"battery",
|
||||
"command",
|
||||
|
|
|
@ -30,6 +30,12 @@
|
|||
"description": "The string to display when the command is not available",
|
||||
"default": ""
|
||||
},
|
||||
"template": {
|
||||
"type": "string",
|
||||
"title": "Template text",
|
||||
"description": "The template to use to render the segment text",
|
||||
"default": ""
|
||||
},
|
||||
"block": {
|
||||
"type": "object",
|
||||
"description": "https://ohmyposh.dev/docs/configure#block",
|
||||
|
@ -137,7 +143,8 @@
|
|||
"julia",
|
||||
"ruby",
|
||||
"ytm",
|
||||
"executiontime"
|
||||
"executiontime",
|
||||
"aws"
|
||||
]
|
||||
},
|
||||
"style": {
|
||||
|
@ -705,7 +712,36 @@
|
|||
},
|
||||
"then": {
|
||||
"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