diff --git a/src/app/commands/display.rs b/src/app/commands/display.rs index 1c01dfc68..7a29318c0 100644 --- a/src/app/commands/display.rs +++ b/src/app/commands/display.rs @@ -914,7 +914,13 @@ impl OpenCADStudio { // DATALINK — import a CSV file into a table placed at the // origin (one-time import; a live re-reading link is future work). - cmd if cmd == "DATALINK" || cmd.starts_with("DATALINK ") => { + "DATALINK" => { + use crate::command::ValuePromptCommand; + let c = ValuePromptCommand::new("DATALINK", "DATALINK path to the .csv file:"); + self.command_line.push_info(&c.prompt()); + self.tabs[i].active_cmd = Some(Box::new(c)); + } + cmd if cmd.starts_with("DATALINK ") => { let path = cmd.trim_start_matches("DATALINK").trim(); if path.is_empty() { self.command_line.push_info( @@ -968,7 +974,14 @@ impl OpenCADStudio { // LANDXMLIMPORT — import survey points (LandXML // elements) as Point objects. Reads the coordinate text content // (northing easting elevation) → Point at (easting, northing, elev). - cmd if cmd == "LANDXMLIMPORT" || cmd.starts_with("LANDXMLIMPORT ") => { + "LANDXMLIMPORT" => { + use crate::command::ValuePromptCommand; + let c = + ValuePromptCommand::new("LANDXMLIMPORT", "LANDXMLIMPORT path to the .xml file:"); + self.command_line.push_info(&c.prompt()); + self.tabs[i].active_cmd = Some(Box::new(c)); + } + cmd if cmd.starts_with("LANDXMLIMPORT ") => { let path = cmd.trim_start_matches("LANDXMLIMPORT").trim(); if path.is_empty() { self.command_line.push_info( diff --git a/src/app/commands/fileops.rs b/src/app/commands/fileops.rs index 959ad48b0..9fad65821 100644 --- a/src/app/commands/fileops.rs +++ b/src/app/commands/fileops.rs @@ -330,11 +330,13 @@ impl OpenCADStudio { // SCRIPT — run a command script: each non-blank, non-comment // line is fed through the same command path the `--script` startup // flag uses, so the behaviour matches headless automation exactly. - cmd if cmd == "SCRIPT" - || cmd == "SCR" - || cmd.starts_with("SCRIPT ") - || cmd.starts_with("SCR ") => - { + "SCRIPT" | "SCR" => { + use crate::command::ValuePromptCommand; + let c = ValuePromptCommand::new("SCRIPT", "SCRIPT path to the .scr file:"); + self.command_line.push_info(&c.prompt()); + self.tabs[i].active_cmd = Some(Box::new(c)); + } + cmd if cmd.starts_with("SCRIPT ") || cmd.starts_with("SCR ") => { let path = cmd.split_once(' ').map(|(_, r)| r.trim().to_string()); match path { Some(p) if !p.is_empty() => match std::fs::read_to_string(&p) { diff --git a/src/app/commands/view.rs b/src/app/commands/view.rs index da60aa083..8402e5183 100644 --- a/src/app/commands/view.rs +++ b/src/app/commands/view.rs @@ -235,7 +235,13 @@ impl OpenCADStudio { // CUIEXPORT — write the keyboard-shortcut customizations // (the drawing-independent CUI data) to a plain "KEY COMMAND" file. - cmd if cmd == "CUIEXPORT" || cmd.starts_with("CUIEXPORT ") => { + "CUIEXPORT" => { + use crate::command::ValuePromptCommand; + let c = ValuePromptCommand::new("CUIEXPORT", "CUIEXPORT file to save shortcuts to:"); + self.command_line.push_info(&c.prompt()); + self.tabs[i].active_cmd = Some(Box::new(c)); + } + cmd if cmd.starts_with("CUIEXPORT ") => { let path = cmd.trim_start_matches("CUIEXPORT").trim(); if path.is_empty() { self.command_line.push_info( @@ -259,11 +265,13 @@ impl OpenCADStudio { // CUIIMPORT / CUILOAD — load shortcut customizations from a // "KEY COMMAND" file (lines starting with # are ignored). - cmd if cmd == "CUIIMPORT" - || cmd == "CUILOAD" - || cmd.starts_with("CUIIMPORT ") - || cmd.starts_with("CUILOAD ") => - { + "CUIIMPORT" | "CUILOAD" => { + use crate::command::ValuePromptCommand; + let c = ValuePromptCommand::new("CUIIMPORT", "CUIIMPORT shortcuts file to load:"); + self.command_line.push_info(&c.prompt()); + self.tabs[i].active_cmd = Some(Box::new(c)); + } + cmd if cmd.starts_with("CUIIMPORT ") || cmd.starts_with("CUILOAD ") => { let path = cmd .trim_start_matches("CUIIMPORT") .trim_start_matches("CUILOAD")