//! Bash mode: handles submitting a shell command from the bash input panel. use crate::app::state::rest::AppStateRest; /// Launch a background bash job for the submitted command. /// /// Flow: ignore empty input → spawn the job (fire-and-forget, the job's /// output is polled elsewhere via `bgbash::control`) → mark state dirty /// so the TUI re-renders. /// /// Why: the returned `BashJob` handle is intentionally dropped — this /// function only needs to kick the job off; the job registers itself in /// the shared jobs map for later polling. pub fn handle_bash_submit(state: &mut AppStateRest, command: String) { if !command.is_empty() { let _ = crate::app::bgbash::job::spawn_bash_job(command); state.dirty = true; } }