mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-08-11 10:11:58 -07:00
Hack in Windows console coloring.
The code has suffered and needs refactoring/commenting. BUT... IT WORKS!
This commit is contained in:
@@ -5,15 +5,15 @@ redirected to a file? etc... We use this information to tweak various default
|
||||
configuration parameters such as colors and match formatting.
|
||||
*/
|
||||
|
||||
use libc;
|
||||
|
||||
#[cfg(unix)]
|
||||
pub fn stdin_is_atty() -> bool {
|
||||
use libc;
|
||||
0 < unsafe { libc::isatty(libc::STDIN_FILENO) }
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
pub fn stdout_is_atty() -> bool {
|
||||
use libc;
|
||||
0 < unsafe { libc::isatty(libc::STDOUT_FILENO) }
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user