mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-09 20:44:03 -08:00
f47da9592f
BREAKING CHANGE: exit segment is now called status segment. The exit keyword is now deprecated and will be removed in a future release. Please use the status keyword instead: ```diff "segments": { { - "type": "exit" + "type": "status" } } ``` Additionally, the status segment configuration has changed to support $PIPESTATUS. You can include a status template to customize the rendering of each individual status code (supported in fish, zsh and bash). ```json "segments": { { "type": "status", "properties": { "status_template": "{{ if gt .Code 0 }}\uf071{{ else }}\uf00c{{ end }}", "status_separator": " " } } } ``` In case no $PIPESTATUS is available, the status segment will fall back to the exit code of the last command using the status template for rendering. The `{{ .Meaning }}` property has been marked as deprecated and can be replaced with `{{ reason .Code }}`, allowing it to be reused in cross segment templates. resolves #4070
84 lines
2.3 KiB
JSON
84 lines
2.3 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
|
"blocks": [
|
|
{
|
|
"alignment": "left",
|
|
"segments": [
|
|
{
|
|
"foreground": "#88c0d0",
|
|
"style": "plain",
|
|
"template": "<#5e81ac>\u250f[</>{{ .UserName }}<#5e81ac>]</>",
|
|
"type": "session"
|
|
},
|
|
{
|
|
"foreground": "#b48ead",
|
|
"properties": {
|
|
"fetch_stash_count": true,
|
|
"fetch_status": true,
|
|
"fetch_upstream_icon": true
|
|
},
|
|
"style": "plain",
|
|
"template": "<#5e81ac>--[</>{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}<#8fbcbb> \u25cf </>{{ end }}{{ if .Staging.Changed }}<#88c0d0> \u25cf </>{{ end }}<#5e81ac>]</>",
|
|
"type": "git"
|
|
},
|
|
{
|
|
"foreground": "#b48ead",
|
|
"style": "plain",
|
|
"template": "<#5e81ac>--[</>{{.Profile}}{{if .Region}}@{{.Region}}{{end}}<#5e81ac>]</>",
|
|
"type": "aws"
|
|
},
|
|
{
|
|
"foreground": "#b48ead",
|
|
"style": "plain",
|
|
"template": "<#5e81ac>--[</>{{.Context}}{{if .Namespace}} :: {{.Namespace}}{{end}}<#5e81ac>]</>",
|
|
"type": "kubectl"
|
|
},
|
|
{
|
|
"foreground": "#d8dee9",
|
|
"style": "plain",
|
|
"template": "<#5e81ac>[</>\uf0e7<#5e81ac>]</>",
|
|
"type": "root"
|
|
},
|
|
{
|
|
"foreground": "#d8dee9",
|
|
"style": "plain",
|
|
"template": "<#5e81ac>[x</>{{ reason .Code }}<#5e81ac>]</>",
|
|
"type": "status"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"foreground": "#88c0d0",
|
|
"properties": {
|
|
"style": "full"
|
|
},
|
|
"style": "plain",
|
|
"template": "<#5e81ac>\u2516[</>{{ .Path }}<#5e81ac>]</>",
|
|
"type": "path"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
},
|
|
{
|
|
"alignment": "left",
|
|
"newline": true,
|
|
"segments": [
|
|
{
|
|
"foreground": "#5e81ac",
|
|
"style": "plain",
|
|
"template": " \ue602 ",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"type": "prompt"
|
|
}
|
|
],
|
|
"final_space": true,
|
|
"version": 2
|
|
}
|