Exit code
Whatโ
Displays the last exit code or that the last command failed based on the configuration.
Sample Configurationโ
- json
- yaml
- toml
{
"type": "exit",
"style": "diamond",
"foreground": "#ffffff",
"background": "#00897b",
"background_templates": [
"{{ if gt .Code 0 }}#e91e63{{ end }}"
],
"trailing_diamond": "๎ด",
"template": "<#193549>๎ฐ</> ๎บ ",
"properties": {
"always_enabled": true
}
}
type: exit
style: diamond
foreground: "#ffffff"
background: "#00897b"
background_templates:
- "{{ if gt .Code 0 }}#e91e63{{ end }}"
trailing_diamond: ๎ด
template: "<#193549>๎ฐ</> ๎บ "
properties:
always_enabled: true
type = "exit"
style = "diamond"
foreground = "#ffffff"
background = "#00897b"
background_templates = [ "{{ if gt .Code 0 }}#e91e63{{ end }}" ]
trailing_diamond = "๎ด"
template = "<#193549>๎ฐ</> ๎บ "
[properties]
always_enabled = true
Propertiesโ
Name | Type | Description |
---|---|---|
always_enabled | boolean | always show the status - defaults to false |
Template (info)โ
default template
{{ if gt .Code 0 }}\uf00d {{ .Meaning }}{{ else }}\uf42e{{ end }}
Propertiesโ
Name | Type | Description |
---|---|---|
.Code | number | the last known exit code |
.Meaning | string | the textual meaning linked to exit code (if applicable, otherwise identical to .Code ) |