From 13cf0d0c71f64f69f473d017c145757d02ddb901 Mon Sep 17 00:00:00 2001 From: secnigma <78214540+secnigma@users.noreply.github.com> Date: Thu, 23 May 2024 11:13:55 +0530 Subject: [PATCH] Fixed red terminal bug on exit Fixed that annoying bug, which sets the terminal character color to red, when exiting from hosts list view (sshed to) using keyboard shortcut Ctrl+C. Reference: https://github.com/mgutz/ansi?tab=readme-ov-file#example --- cmd/cmd.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/cmd.go b/cmd/cmd.go index 3728296..a020629 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -77,6 +77,8 @@ func main() { if err != nil { fmt.Println(ansi.Red, fmt.Sprintf("Error: %s", err)) + reset := ansi.ColorCode("reset") + fmt.Println(reset) os.Exit(1) } }