Skip to main content

apply_parameters

Function apply_parameters 

Source
pub fn apply_parameters(command: &str, params: &[Parameter]) -> String
Expand description

Replace auto-detected parameter values in a command string with {{PLACEHOLDER}} syntax.

Applies replacements longest-first to avoid partial matches (e.g., “/home/alice” is replaced before “alice”). Manual placeholders (already {{NAME}} in the string) are left as-is.