1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-05-13 21:26:27 +02:00

if --color always, always print with color, even when --vimgrep is given

This commit is contained in:
依云 2016-09-28 11:17:45 +08:00 committed by lilydjwg
parent c42f97b4da
commit 5943b1effe

View File

@ -355,12 +355,14 @@ impl RawArgs {
self.flag_threads
};
let color =
if self.flag_vimgrep {
if self.flag_color == "always" {
true
} else if self.flag_vimgrep {
false
} else if self.flag_color == "auto" {
atty::on_stdout() || self.flag_pretty
} else {
self.flag_color == "always"
false
};
let eol = b'\n';