mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-09-20 05:27:31 -07:00
refactor: rename display exit code
This commit is contained in:
parent
c0aa27a342
commit
71c610aaa8
|
@ -92,7 +92,7 @@
|
||||||
"trailing_diamond": "",
|
"trailing_diamond": "",
|
||||||
"properties": {
|
"properties": {
|
||||||
"error_icon": "",
|
"error_icon": "",
|
||||||
"display_error_code": false,
|
"display_exit_code": false,
|
||||||
"always_enabled": true,
|
"always_enabled": true,
|
||||||
"error_color": "#e91e63",
|
"error_color": "#e91e63",
|
||||||
"color_background": true,
|
"color_background": true,
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
"foreground": "#DCB977",
|
"foreground": "#DCB977",
|
||||||
"properties": {
|
"properties": {
|
||||||
"error_icon": "✗",
|
"error_icon": "✗",
|
||||||
"display_error_code": false
|
"display_exit_code": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
"foreground": "#DCB977",
|
"foreground": "#DCB977",
|
||||||
"properties": {
|
"properties": {
|
||||||
"error_icon": "✗",
|
"error_icon": "✗",
|
||||||
"display_error_code": false
|
"display_exit_code": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -96,7 +96,7 @@
|
||||||
"error_icon": "❯",
|
"error_icon": "❯",
|
||||||
"always_enabled": true,
|
"always_enabled": true,
|
||||||
"error_color": "#FF5252",
|
"error_color": "#FF5252",
|
||||||
"display_error_code": false
|
"display_exit_code": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
"foreground": "#DCB977",
|
"foreground": "#DCB977",
|
||||||
"properties": {
|
"properties": {
|
||||||
"error_icon": "✗",
|
"error_icon": "✗",
|
||||||
"display_error_code": false
|
"display_exit_code": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
"foreground": "#DCB977",
|
"foreground": "#DCB977",
|
||||||
"properties": {
|
"properties": {
|
||||||
"error_icon": "✗",
|
"error_icon": "✗",
|
||||||
"display_error_code": false,
|
"display_exit_code": false,
|
||||||
"postfix": ""
|
"postfix": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,8 +10,8 @@ type exit struct {
|
||||||
const (
|
const (
|
||||||
//ErrorIcon represents icon to display in case of error
|
//ErrorIcon represents icon to display in case of error
|
||||||
ErrorIcon Property = "error_icon"
|
ErrorIcon Property = "error_icon"
|
||||||
//DisplayErrorCode shows or hides the error code
|
//DisplayExitCode shows or hides the error code
|
||||||
DisplayErrorCode Property = "display_error_code"
|
DisplayExitCode Property = "display_exit_code"
|
||||||
//AlwaysEnabled decides whether or not to always display the exitcode info
|
//AlwaysEnabled decides whether or not to always display the exitcode info
|
||||||
AlwaysEnabled Property = "always_enabled"
|
AlwaysEnabled Property = "always_enabled"
|
||||||
//ErrorColor specify a different foreground color for the error text when using always_show = true
|
//ErrorColor specify a different foreground color for the error text when using always_show = true
|
||||||
|
@ -48,7 +48,7 @@ func (e *exit) getFormattedText() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *exit) getMeaningFromExitCode() string {
|
func (e *exit) getMeaningFromExitCode() string {
|
||||||
if !e.props.getBool(DisplayErrorCode, true) {
|
if !e.props.getBool(DisplayExitCode, true) {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
switch e.env.lastErrorCode() {
|
switch e.env.lastErrorCode() {
|
||||||
|
|
Loading…
Reference in a new issue