Skip to main content

tool_invocation_of

Function tool_invocation_of 

Source
pub fn tool_invocation_of<'a>(
    peeled: &'a PeeledCommand,
    registry: &impl ToolLookup,
) -> Option<ToolInvocation<'a>>
Expand description

Extract a ToolInvocation from peeled, looking the primary up in registry. Returns None when the primary’s basename is not registered.

peeled must have had wrappers stripped via crate::wrappers::peel_command or one of its siblings. Variable-primary commands (e.g. $TOOL status) cause peel_command to return None, so they never reach this function.