Skip to main content

matches_hook

Function matches_hook 

Source
pub fn matches_hook(
    matcher: &Option<String>,
    tool_name: &str,
    args: &Value,
) -> bool
Expand description

Returns true if input_tool / args satisfy the given matcher pattern.

  • None pattern matches everything.
  • "run_shell" matches only that tool name.
  • "run_shell(git *)" matches run_shell with command starting with "git ".