-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Color codes do not work in windows #143
Comments
+1 |
Here's how I disabled colors in case any window users are desperate:
If you used go get to install this like I did, you'll find the source in ~\go\src\github.com\ultralist\ultralist. Modify that file, run a go build, then copy the new ultralist.exe to ~\go\bin, and then it should start working without colors immediately. |
i don't know the first thing about Go, but i managed to resolve this with the following changes: diff --git a/ultralist/screen_printer.go b/ultralist/screen_printer.go
index 9e8f89c..acc03ff 100644
--- a/ultralist/screen_printer.go
+++ b/ultralist/screen_printer.go
@@ -7,6 +7,7 @@ import (
"strconv"
"strings"
"time"
+ "text/tabwriter"
"github.com/cheynewallace/tabby"
"github.com/fatih/color"
@@ -48,7 +49,7 @@ func (f *ScreenPrinter) Print(groupedTodos *GroupedTodos, printNotes bool) {
}
sort.Strings(keys)
- tabby := tabby.New()
+ tabby := tabby.NewCustom(tabwriter.NewWriter(color.Output, 0, 0, 2, ' ', 0))
tabby.AddLine()
for _, key := range keys {
tabby.AddLine(cyan.Sprint(key)) maybe based on this you could solve this the idiomatic way. i got this from these (https://github.com/fatih/color): // Windows supported too! Just don't forget to change the output to color.Output
fmt.Fprintf(color.Output, "Windows support: %s", color.GreenString("PASS")) for Tabby using the |
@bothzoli I'll create a PR based upon this change and test it out. |
thanks a lot. |
@bothzoli give that PR a review. if it looks good I'll merge it and build a release! |
@00001 @cvrn @bothzoli @robertpateii just released 0.9.4 which includes this fix https://github.com/ultralist/ultralist/releases |
Reading todo contents is more or less impossible when using 'xterm -bg lemonchiffon', or any bright background.
Is there a way to change or disable colors, without affecting the terminal?
The text was updated successfully, but these errors were encountered: