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:
parent
c42f97b4da
commit
5943b1effe
@ -355,12 +355,14 @@ impl RawArgs {
|
|||||||
self.flag_threads
|
self.flag_threads
|
||||||
};
|
};
|
||||||
let color =
|
let color =
|
||||||
if self.flag_vimgrep {
|
if self.flag_color == "always" {
|
||||||
|
true
|
||||||
|
} else if self.flag_vimgrep {
|
||||||
false
|
false
|
||||||
} else if self.flag_color == "auto" {
|
} else if self.flag_color == "auto" {
|
||||||
atty::on_stdout() || self.flag_pretty
|
atty::on_stdout() || self.flag_pretty
|
||||||
} else {
|
} else {
|
||||||
self.flag_color == "always"
|
false
|
||||||
};
|
};
|
||||||
let eol = b'\n';
|
let eol = b'\n';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user