Skip to main content

install

Function install 

Source
pub fn install(
    existing: Option<&str>,
    command: &str,
    tools: &[Tool],
) -> Result<(String, bool), String>
Expand description

Install the steering hook into existing settings text (or create a fresh document), gating each tool in tools. Returns the new text and whether it changed. Idempotent: re-installing the same command/tools is a no-op; a --mode change rewrites the command in place; a new tool adds its matcher. Comments and layout in existing are preserved.