diff --git a/Themes/agnoster.json b/Themes/agnoster.json index 3b444d5c34b0..a993e54d3b26 100644 --- a/Themes/agnoster.json +++ b/Themes/agnoster.json @@ -71,7 +71,7 @@ "foreground": "#ffffff", "background": "#ff8080", "properties": { - "error_icon": "" + "prefix": "" } } ] diff --git a/Themes/avit.json b/Themes/avit.json index 04a295a6313a..40f4c0910d64 100644 --- a/Themes/avit.json +++ b/Themes/avit.json @@ -41,7 +41,7 @@ "style": "plain", "foreground": "#C94A16", "properties": { - "error_icon": "x" + "prefix": "x" } } ] diff --git a/Themes/darkblood.json b/Themes/darkblood.json index 43657570a49e..f7ddd31ffd3c 100644 --- a/Themes/darkblood.json +++ b/Themes/darkblood.json @@ -46,8 +46,7 @@ "style": "plain", "foreground": "#ffffff", "properties": { - "error_icon": "x", - "prefix": "<#CB4B16>[", + "prefix": "<#CB4B16>[x", "postfix": "<#CB4B16>]" } } diff --git a/Themes/emodipt.json b/Themes/emodipt.json index 45e543dfc914..22ab7d1828c8 100644 --- a/Themes/emodipt.json +++ b/Themes/emodipt.json @@ -52,7 +52,7 @@ "style": "plain", "foreground": "#C94A16", "properties": { - "error_icon": "x" + "prefix": "x" } }, { diff --git a/Themes/fish.json b/Themes/fish.json index fb0ec4556420..50be235e7fa5 100644 --- a/Themes/fish.json +++ b/Themes/fish.json @@ -9,7 +9,7 @@ "style": "plain", "foreground": "#ffffff", "properties": { - "error_icon": " ", + "prefix": " ", "postfix": "" } }, diff --git a/Themes/honukai.json b/Themes/honukai.json index 5c85de8a223f..caf2967b3fe9 100644 --- a/Themes/honukai.json +++ b/Themes/honukai.json @@ -89,8 +89,7 @@ "style": "plain", "foreground": "#CB4B16", "properties": { - "prefix": "", - "error_icon": "" + "prefix": "" } }, { diff --git a/Themes/jandedobbeleer.json b/Themes/jandedobbeleer.json index af5b4cbbfa6d..e7077e7963c8 100644 --- a/Themes/jandedobbeleer.json +++ b/Themes/jandedobbeleer.json @@ -91,12 +91,11 @@ "leading_diamond": "", "trailing_diamond": "", "properties": { - "error_icon": "", "display_exit_code": false, "always_enabled": true, "error_color": "#e91e63", "color_background": true, - "prefix": "<#193549> " + "prefix": "<#193549> " } } ] diff --git a/Themes/material.json b/Themes/material.json index 7cc91062743d..c59d9635aea5 100644 --- a/Themes/material.json +++ b/Themes/material.json @@ -36,7 +36,7 @@ "style": "plain", "foreground": "#DCB977", "properties": { - "error_icon": "✗", + "prefix": "✗", "display_exit_code": false } }, diff --git a/Themes/paradox.json b/Themes/paradox.json index 3406ed438a88..e28f0ce11064 100644 --- a/Themes/paradox.json +++ b/Themes/paradox.json @@ -71,7 +71,7 @@ "foreground": "#ffffff", "background": "#ff8080", "properties": { - "error_icon": "" + "prefix": "" } } ] diff --git a/Themes/pararussel.json b/Themes/pararussel.json index db5f97a02def..084df3424760 100644 --- a/Themes/pararussel.json +++ b/Themes/pararussel.json @@ -37,7 +37,7 @@ "style": "plain", "foreground": "#DCB977", "properties": { - "error_icon": "✗", + "prefix": "✗", "display_exit_code": false } } diff --git a/Themes/powerlevel10k_classic.json b/Themes/powerlevel10k_classic.json index e30a18f3f544..47a6d1814298 100644 --- a/Themes/powerlevel10k_classic.json +++ b/Themes/powerlevel10k_classic.json @@ -92,8 +92,7 @@ "style": "plain", "foreground": "#D4E157", "properties": { - "prefix": "", - "error_icon": "❯", + "prefix": "❯", "always_enabled": true, "error_color": "#FF5252", "display_exit_code": false diff --git a/Themes/powerline.json b/Themes/powerline.json index 86e4eaee6603..3c47f576f732 100644 --- a/Themes/powerline.json +++ b/Themes/powerline.json @@ -64,7 +64,7 @@ "foreground": "#ffffff", "background": "#ff8080", "properties": { - "error_icon": "" + "prefix": "" } } ] diff --git a/Themes/robbyrussel.json b/Themes/robbyrussel.json index 249307583c17..828019264742 100644 --- a/Themes/robbyrussel.json +++ b/Themes/robbyrussel.json @@ -37,7 +37,7 @@ "style": "plain", "foreground": "#DCB977", "properties": { - "error_icon": "✗", + "prefix": "✗", "display_exit_code": false } } diff --git a/Themes/sorin.json b/Themes/sorin.json index b79b05feeb67..4f69e89920a0 100644 --- a/Themes/sorin.json +++ b/Themes/sorin.json @@ -9,7 +9,7 @@ "style": "plain", "foreground": "#CB4B16", "properties": { - "error_icon": "" + "prefix": "" } }, { diff --git a/Themes/star.json b/Themes/star.json index 62534fa36856..86407f7be8d6 100644 --- a/Themes/star.json +++ b/Themes/star.json @@ -47,7 +47,7 @@ "style": "plain", "foreground": "#C94A16", "properties": { - "error_icon": "x" + "prefix": "x" } } ] diff --git a/Themes/zash.json b/Themes/zash.json index 437450ceaa9f..eda1bff82433 100644 --- a/Themes/zash.json +++ b/Themes/zash.json @@ -49,7 +49,7 @@ "style": "plain", "foreground": "#DCB977", "properties": { - "error_icon": "✗", + "prefix": "✗", "display_exit_code": false, "postfix": "" } diff --git a/segment_exit.go b/segment_exit.go index c4bca1c0da26..a9a2907bc4dc 100644 --- a/segment_exit.go +++ b/segment_exit.go @@ -8,8 +8,6 @@ type exit struct { } const ( - //ErrorIcon represents icon to display in case of error - ErrorIcon Property = "error_icon" //DisplayExitCode shows or hides the error code DisplayExitCode Property = "display_exit_code" //AlwaysEnabled decides whether or not to always display the exitcode info @@ -35,7 +33,6 @@ func (e *exit) init(props *properties, env environmentInfo) { } func (e *exit) getFormattedText() string { - errorIcon := e.props.getString(ErrorIcon, "X") exitCode := e.getMeaningFromExitCode() colorBackground := e.props.getBool(ColorBackground, false) if e.env.lastErrorCode() != 0 && !colorBackground { @@ -44,7 +41,7 @@ func (e *exit) getFormattedText() string { if e.env.lastErrorCode() != 0 && colorBackground { e.props.background = e.props.getColor(ErrorColor, e.props.background) } - return fmt.Sprintf("%s%s", errorIcon, exitCode) + return exitCode } func (e *exit) getMeaningFromExitCode() string {