From eb2a4820e83036c3e58d34f78137002d10939fe5 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 24 Oct 2026 05:59:10 -0700 Subject: [PATCH] Scripts: Recent Script Files lists the last ten scripts and Cmd+Alt+Shift+D reruns the newest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit File ▸ Scripts gets a Recent Script Files submenu with the ten scripts run last, newest first: script files run with Run Script File… or a command, and the installed and bundled scripts of File ▸ Scripts. ScriptUI panels are not listed. The list is kept in the settings. Each entry runs its script again through `file.runScript {"recent": i}`, and Cmd+Alt+Shift+D runs the most recent one; the key can be changed in Edit ▸ Keyboard Shortcuts. An entry records whether it ran a file or an installed script, so a file named like a bundled script runs again as that file. --- crates/engine/src/commands/file_more.rs | 28 +++++++++++++- crates/engine/src/commands/scripts.rs | 50 +++++++++++++++++++++++++ crates/engine/src/menus.rs | 9 ++++- crates/engine/src/prefs.rs | 33 ++++++++++++++++ crates/engine/src/shortcuts.rs | 15 ++++++++ crates/ui-egui/src/i18n.rs | 11 ++++++ crates/ui-egui/src/menus.rs | 22 ++++++++++- crates/ui-egui/src/native_menu.rs | 1 + docs/plugins.md | 1 + docs/scripting-parity.md | 1 + 10 files changed, 168 insertions(+), 3 deletions(-) diff --git a/crates/engine/src/commands/file_more.rs b/crates/engine/src/commands/file_more.rs index 74a86e1d8..e92b43dc0 100644 --- a/crates/engine/src/commands/file_more.rs +++ b/crates/engine/src/commands/file_more.rs @@ -430,12 +430,29 @@ fn collect_files(s: &mut Session, p: &Value) -> Result { /// array or JSON lines of `{"command": id, "params": {…}}` (also accepts the control channel's /// `{"method": "engine.execute", "params": {"id", "params"}}`). fn run_script(s: &mut Session, p: &Value) -> Result { + // File ▸ Scripts ▸ Recent Script Files ▸