From 354a5cad970453043fe25c2a184afc7808e235c2 Mon Sep 17 00:00:00 2001 From: Lincoln Atkinson Date: Mon, 17 Jul 2017 15:01:13 -0700 Subject: Fix invisible file path text in PowerShell (#557) change default path color on Windows This avoids a conflict with a PowerShell configuration that causes text to be invisible. Fixes #342 --- src/args.rs | 3 +++ src/printer.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/args.rs b/src/args.rs index cd905b45..fb37c715 100644 --- a/src/args.rs +++ b/src/args.rs @@ -692,7 +692,10 @@ impl<'a> ArgMatches<'a> { fn color_specs(&self) -> Result { // Start with a default set of color specs. let mut specs = vec![ + #[cfg(unix)] "path:fg:magenta".parse().unwrap(), + #[cfg(windows)] + "path:fg:cyan".parse().unwrap(), "line:fg:green".parse().unwrap(), "match:fg:red".parse().unwrap(), "match:style:bold".parse().unwrap(), diff --git a/src/printer.rs b/src/printer.rs index 843b3530..6fc16708 100644 --- a/src/printer.rs +++ b/src/printer.rs @@ -576,7 +576,7 @@ pub struct ColorSpecs { /// Valid colors are `black`, `blue`, `green`, `red`, `cyan`, `magenta`, /// `yellow`, `white`. /// -/// Valid style instructions are `nobold` and `bold`. +/// Valid style instructions are `nobold`, `bold`, `intense`, `nointense`. #[derive(Clone, Debug, Eq, PartialEq)] pub struct Spec { ty: OutType, -- cgit v1.2.3