From 148350ca9281286d09608cb3ad48facbb3db9a1a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 6 Jun 2026 02:19:52 +0900 Subject: feat(command): wire exec binary as __exec_command listener Register the selected binary as a Callable::String listener for the __exec_command event, matching PHP ExecCommand's addListener call. Co-Authored-By: Claude Opus 4.8 --- crates/shirabe/src/command/exec_command.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'crates/shirabe/src/command/exec_command.rs') diff --git a/crates/shirabe/src/command/exec_command.rs b/crates/shirabe/src/command/exec_command.rs index 3f70cf8..cfc0e89 100644 --- a/crates/shirabe/src/command/exec_command.rs +++ b/crates/shirabe/src/command/exec_command.rs @@ -122,8 +122,11 @@ impl ExecCommand { let dispatcher = crate::command::composer_full(&composer) .get_event_dispatcher() .clone(); - // TODO(phase-b): add_listener takes a Callable; wiring binary as callable not yet ported - let _ = &binary; + dispatcher.borrow_mut().add_listener( + "__exec_command", + crate::event_dispatcher::Callable::String(binary), + 0, + ); let initial_working_directory = self.get_application()?.get_initial_working_directory(); if let Some(ref iwd) = initial_working_directory { -- cgit v1.3.1