Merge PR #1584 from yztink/fix/scr-scripts: support .scr scripts, multi-line and single-line formats, and command prefixes

This commit is contained in:
Hakan Seven committed 2026-10-02 10:00:01 +03:00
commit c7df841711
6 files changed
+222 -34

No files matched your search

+5
View File
@@ -116,6 +116,11 @@ impl OpenCADStudio {
Some(rest) => (rest.trim(), true),
None => (cmd, false),
};
let cmd = cmd.trim();
// AutoCAD command prefixes: '_' (international name), '.' (built-in name bypass)
let cmd = cmd.strip_prefix('.').unwrap_or(cmd);
let cmd = cmd.strip_prefix('_').unwrap_or(cmd);
let cmd = cmd.strip_prefix('.').unwrap_or(cmd);
let resolved = self.resolve_alias(cmd);
let cmd = resolved.as_deref().unwrap_or(cmd);
if is_spacemouse_command(cmd) {