Should not strip ANSI codes when --ansi is not set

This commit is contained in:
Junegunn Choi
2015-08-28 21:23:10 +09:00
parent 698e8008df
commit 90b0cd44ac
4 changed files with 22 additions and 10 deletions

View File

@@ -174,7 +174,7 @@ func Run(opts *Options) {
chunks: snapshot,
pattern: pattern})
for i := 0; i < merger.Length(); i++ {
fmt.Println(merger.Get(i).AsString())
fmt.Println(merger.Get(i).AsString(opts.Ansi))
}
}
os.Exit(0)
@@ -250,7 +250,7 @@ func Run(opts *Options) {
fmt.Println()
}
for i := 0; i < count; i++ {
fmt.Println(val.Get(i).AsString())
fmt.Println(val.Get(i).AsString(opts.Ansi))
}
os.Exit(0)
}