pub_just/
command_color.rs

1use super::*;
2
3#[derive(Copy, Clone, ValueEnum)]
4pub enum CommandColor {
5  Black,
6  Blue,
7  Cyan,
8  Green,
9  Purple,
10  Red,
11  Yellow,
12}
13
14impl From<CommandColor> for ansi_term::Color {
15  fn from(command_color: CommandColor) -> Self {
16    match command_color {
17      CommandColor::Black => Self::Black,
18      CommandColor::Blue => Self::Blue,
19      CommandColor::Cyan => Self::Cyan,
20      CommandColor::Green => Self::Green,
21      CommandColor::Purple => Self::Purple,
22      CommandColor::Red => Self::Red,
23      CommandColor::Yellow => Self::Yellow,
24    }
25  }
26}