startup: /b runs a script, as --script does

Shortcuts written for other CAD programs pass the startup script as
`/b script.scr`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-15 01:43:42 +03:00
1 parent 636c0917e0
commit e9a2b9d196
1 file changed
+8 -1
+8 -1
View File
@@ -27,7 +27,14 @@ fn main() -> iced::Result {
#[cfg(not(target_arch = "wasm32"))]
{
use clap::Parser;
let args = cli::Cli::parse();
// `/b script.scr`, the startup switch shortcuts carry, is `--script`.
let args = cli::Cli::parse_from(std::env::args_os().map(|arg| {
if arg == "/b" || arg == "/B" {
"--script".into()
} else {
arg
}
}));
// GPU probe child: exercise one backend offscreen, print one JSON
// line on success and exit 0/1. This must run before any logging/GUI