Function shell_integration_script

Source
pub fn shell_integration_script(kind: ShellKind) -> &'static str
Expand description

Returns the built-in static shell-integration script for a known shell.

Bash, Zsh, and Fish scripts emit private OSC 9001 events in the ailloli_ui: namespace. ShellKind::Unknown returns the empty string. Returning a script does not evaluate it or consult crate::TerminalSecurityPolicy; the host owns consent and installation.

ยงExamples

use ailloli_ui_terminal_core::{shell_integration_script, ShellKind};
assert!(shell_integration_script(ShellKind::Bash).contains("ailloli_ui:prompt_start"));
assert_eq!(shell_integration_script(ShellKind::Unknown), "");