Skip to main content

run_shell_command

Function run_shell_command 

Source
pub fn run_shell_command(cmd_text: &str) -> Result<()>
Expand description

Run a shell command with the user’s $SHELL (falling back to /bin/sh). Tears down and rebuilds the terminal around the command.

On success returns Ok(()) — the terminal is restored and the caller should redraw. On failure (shell not found, etc.) returns Err(...); the terminal is still restored. The error message is safe to surface in the status line.