diff options
-rw-r--r-- | src/main.rs | 18 | ||||
-rw-r--r-- | ticket/src/main.rs | 1 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 6830599..a1450dc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,6 +7,7 @@ use configamajig::*; use dialoguer::{ theme::ColorfulTheme, Checkboxes, + Select, }; use shared::find_root; #[cfg(target_family = "unix")] @@ -125,7 +126,22 @@ fn init() -> Result<()> { .map_err(|_| format_err!( "It looks like hooked is not on your $PATH. Did you run 'ds install'?" ))?; - let _ = Command::new("hooked").arg("init").spawn()?.wait()?; + + let langs = &["Python", "Ruby", "Bash"]; + let mut lang_choice = + langs[Select::with_theme(&ColorfulTheme::default()) + .with_prompt( + "Which language do you wish to use for your git hooks?", + ) + .items(langs) + .interact()?] + .to_string(); + lang_choice.make_ascii_lowercase(); + let _ = Command::new("hooked") + .arg("init") + .arg(&lang_choice) + .spawn()? + .wait()?; } Tools::Ticket => { which("ticket") diff --git a/ticket/src/main.rs b/ticket/src/main.rs index 652bd01..8b88306 100644 --- a/ticket/src/main.rs +++ b/ticket/src/main.rs @@ -103,6 +103,7 @@ fn init() -> Result<()> { debug!("Creating closed ticket directory"); fs::create_dir_all(&closed_tickets()?)?; trace!("Done initializing tickets."); + info!("Initialized repo to use ticket"); Ok(()) } |