Skip to main content

color_flag

Function color_flag 

Source
pub fn color_flag() -> ColorFlag
Available on crate feature process only.
Expand description

Create a --color always|never flag that can be added to a command, based on if color is enabled for the current process using this crate’s cli flags

§Example

use cu::pre::*;

cu::which("git")?
  .command()
  .add(cu::color_flag());
   // ... more config