Condukt.Tools.Grep (Condukt v3.0.0)

Copy Markdown View Source

Tool for searching file contents, after pi's grep tool.

Routes through the active Condukt.Sandbox. Returns matching lines as path:line: text, and the lines around them, when context asks for them, as path-line- text. Long lines are cut to 500 characters, and the output to 100 matches (by default) or 50KB, with a notice saying what was cut.

Parameters

  • pattern - Regular expression (or literal string with literal)
  • path - Directory to search in (optional, defaults to sandbox cwd)
  • glob - Glob filter relative to path; one without /, such as *.ex, matches file names at any depth
  • ignoreCase - Match case-insensitively (default: false)
  • literal - Treat the pattern as a literal string (default: false)
  • context - Lines to show before and after each match (default: 0)
  • limit - Maximum matches to return (default: 100)

Summary

Functions

Callback implementation for Condukt.Tool.description/0.

Callback implementation for Condukt.Tool.name/0.

Callback implementation for Condukt.Tool.parameters/0.

Callback implementation for Condukt.Tool.replay_safe?/1.

Functions

description()

Callback implementation for Condukt.Tool.description/0.

name()

Callback implementation for Condukt.Tool.name/0.

parameters()

Callback implementation for Condukt.Tool.parameters/0.

replay_safe?(opts)

Callback implementation for Condukt.Tool.replay_safe?/1.