diff --git a/src/main.rs b/src/main.rs index c62f3b2..e62a7e1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,11 +5,7 @@ use std::process::{Command, Stdio}; use structopt::StructOpt; pub mod gui; - -fn run_tui(root_path: std::path::PathBuf) -> Result<(), Box> { - println!("Starting the TUI editor at {:?}", root_path); - Ok(()) -} +pub mod tui; /// Command line interface IDE with full GUI and headless modes. /// If no flags are provided the GUI editor is launched in a separate process. @@ -46,7 +42,7 @@ fn main() -> Result<(), Box> { true => gui::run(root_path), false => match args.tui { // Open the TUI editor if requested, otherwise use the QML GUI by default. - true => run_tui(root_path), + true => tui::run(root_path), false => { // Relaunch the CLIDE GUI in a separate process. Command::new(std::env::current_exe()?) diff --git a/src/tui.rs b/src/tui.rs new file mode 100644 index 0000000..2f3e4cd --- /dev/null +++ b/src/tui.rs @@ -0,0 +1,6 @@ +use std::error::Error; + +pub fn run(root_path: std::path::PathBuf) -> Result<(), Box> { + println!("Starting the TUI editor at {:?}", root_path); + Ok(()) +}