forked from 1b-agent/opencadstudio-upstream
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
636c0917e0
commit
e9a2b9d196
1 file changed
+8
-1
+8
-1
@@ -27,7 +27,14 @@ fn main() -> iced::Result {
|
|||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
{
|
{
|
||||||
use clap::Parser;
|
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
|
// GPU probe child: exercise one backend offscreen, print one JSON
|
||||||
// line on success and exit 0/1. This must run before any logging/GUI
|
// line on success and exit 0/1. This must run before any logging/GUI
|
||||||
|
|||||||
Reference in new issue
Block a user