Brijesh's Git Server — gitcc @ 6d5984e44c3caac3b4552b9f0b0db124a110bca9

failed attempt at automatic git workflow

src/utils.rs (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
use dialoguer::{theme::ColorfulTheme, Select};

pub fn select_option(options: &[&str]) -> Option<usize> {
    let selection = Select::with_theme(&ColorfulTheme::default())
        .with_prompt("Select an option:")
        .default(0)
        .items(options)
        .interact_opt()
        .unwrap();

    return selection;
}