Skip to main content

detect_category

Function detect_category 

Source
pub fn detect_category(command: &str) -> CommandCategory
Expand description

Detect command category from command string.

Analyzes the command string to determine its category, which is used as a fallback when no pattern matches for large outputs.

§Categories

  • Status: Test runners, builds, linters → quiet success
  • Content: File viewers and diffs → always passthrough
  • Data: Listing and querying commands → index for recall
  • Unknown: Anything else → passthrough (safe default)

§Arguments

  • command - The command string to analyze

§Returns

A CommandCategory indicating the command’s type.