mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-05-29 21:47:42 +02:00
Merge pull request #121 from lilydjwg/master
if --color always, always print with color, even when --vimgrep is given
This commit is contained in:
commit
cee2f09a6d
@ -358,12 +358,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 mut with_filename = self.flag_with_filename;
|
let mut with_filename = self.flag_with_filename;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user