mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-27 03:49:40 -08:00
refactor: rename display exit code
This commit is contained in:
parent
c0aa27a342
commit
71c610aaa8
|
@ -92,7 +92,7 @@
|
|||
"trailing_diamond": "",
|
||||
"properties": {
|
||||
"error_icon": "",
|
||||
"display_error_code": false,
|
||||
"display_exit_code": false,
|
||||
"always_enabled": true,
|
||||
"error_color": "#e91e63",
|
||||
"color_background": true,
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
"foreground": "#DCB977",
|
||||
"properties": {
|
||||
"error_icon": "✗",
|
||||
"display_error_code": false
|
||||
"display_exit_code": false
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
"foreground": "#DCB977",
|
||||
"properties": {
|
||||
"error_icon": "✗",
|
||||
"display_error_code": false
|
||||
"display_exit_code": false
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
"error_icon": "❯",
|
||||
"always_enabled": true,
|
||||
"error_color": "#FF5252",
|
||||
"display_error_code": false
|
||||
"display_exit_code": false
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
"foreground": "#DCB977",
|
||||
"properties": {
|
||||
"error_icon": "✗",
|
||||
"display_error_code": false
|
||||
"display_exit_code": false
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
"foreground": "#DCB977",
|
||||
"properties": {
|
||||
"error_icon": "✗",
|
||||
"display_error_code": false,
|
||||
"display_exit_code": false,
|
||||
"postfix": ""
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@ type exit struct {
|
|||
const (
|
||||
//ErrorIcon represents icon to display in case of error
|
||||
ErrorIcon Property = "error_icon"
|
||||
//DisplayErrorCode shows or hides the error code
|
||||
DisplayErrorCode Property = "display_error_code"
|
||||
//DisplayExitCode shows or hides the error code
|
||||
DisplayExitCode Property = "display_exit_code"
|
||||
//AlwaysEnabled decides whether or not to always display the exitcode info
|
||||
AlwaysEnabled Property = "always_enabled"
|
||||
//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 {
|
||||
if !e.props.getBool(DisplayErrorCode, true) {
|
||||
if !e.props.getBool(DisplayExitCode, true) {
|
||||
return ""
|
||||
}
|
||||
switch e.env.lastErrorCode() {
|
||||
|
|
Loading…
Reference in a new issue