diff --git a/main.go b/main.go index 3ed971a..d47d074 100644 --- a/main.go +++ b/main.go @@ -165,7 +165,7 @@ func flagParser(cmdP *cmdParams) { narrow := flag.Bool("narrow", false, "Display weather in narrow view") quiet := flag.Bool("quiet", false, "Add the quiet flag") superQuiet := flag.Bool("super-quiet", false, "Add the super quiet flag") - noColors := flag.Bool("no-colors", false, "Disable displaying colors") + noColors := flag.Bool("no-colors", false, "Disable displaying colors (always enabled on windows)") addFrame := flag.Bool("add-frame", false, "Add a frame to the output") midTransparency := flag.Bool("mid-transparency", false, "Enable mid-transparency (PNG only)") transparency := flag.Bool("transparency", false, "Enable transparency (PNG only)") @@ -177,6 +177,13 @@ func flagParser(cmdP *cmdParams) { flag.Parse() + // Windows does not have color encoding + // so let's make sure windows users are happy + term := os.Getenv("TERM") + if term == "" { + *noColors = true + } + if *metric { cmdP.Flags += METRIC }