cleanup-branches 0.1.0

A CLI tool to delete local Git branches that are already merged into a target branch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pub enum Colour {
    Red,
    Green,
    Yellow,
    Blue,
}

pub fn paint(colour: Colour, text: &str) -> String {
    let code = match colour {
        Colour::Red    => "0;31",
        Colour::Green  => "0;32",
        Colour::Yellow => "1;33",
        Colour::Blue   => "0;34",
    };
    format!("\x1b[{code}m{text}\x1b[0m")
}