From a398f80ba6ddb4034b32ce88585d7aab2393a5ca Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Tue, 21 Oct 2025 14:38:11 -0400 Subject: [PATCH] Add an action to reveal log file in system file manager (#40815) We document the location of the log file in many places, we should just make it easy to open directly within your file browser. The one thing here is naming. We use dynamic naming for "reveal" actions in the project panel, to reflect the right file manager name per OS, but for a command palette action, I dont think we want to have dynamic code for the action name, just going with finder at the moment. Release Notes: - Added a `zed: reveal log in file manager` action to the command palette. --- crates/workspace/src/workspace.rs | 4 +++- crates/zed/src/zed.rs | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index f3b7fea96d365bb6d12f6eea0cc93518f2683dcb..3dc3b781175cd2f533184735d7759cb27c34930a 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -7015,7 +7015,9 @@ actions!( zed, [ /// Opens the Zed log file. - OpenLog + OpenLog, + /// Reveals the Zed log file in the system file manager. + RevealLogInFileManager ] ); diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index 62cf52de19469f7087c42f91363bc9002312fe1f..3cc6ec86473f09640f2ff35ae0457db65759d7c1 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -178,6 +178,9 @@ pub fn init(cx: &mut App) { open_log_file(workspace, window, cx); }); }); + cx.on_action(|_: &workspace::RevealLogInFileManager, cx| { + cx.reveal_path(paths::log_file().as_path()); + }); cx.on_action(|_: &zed_actions::OpenLicenses, cx| { with_active_or_new_workspace(cx, |workspace, window, cx| { open_bundled_file(