NAME

Developer::Dashboard::CLI::OpenFileGrep - content-search adapter for dashboard of

SYNOPSIS

use Developer::Dashboard::CLI::OpenFileGrep qw(grep_matching_files);
my @files = grep_matching_files( args => [ '-nr', 'needle', 'src' ] );

DESCRIPTION

Runs the system grep executable for the historical dashboard of grep mode and returns the unique files containing matches. Arguments remain an array rather than shell text, so patterns and paths are passed literally to the child process. -H and -n are added to make output consistently identifiable when the search scope contains only one file.

PURPOSE

This module adapts content grep results to the file chooser used by the dashboard open-file command.

WHY IT EXISTS

Path-name regex search and content search are distinct operations. Keeping grep execution and result decoding here prevents the main open-file resolver from confusing `grep` options with path patterns and keeps process handling small and testable.

WHEN TO USE

Use this module when changing the `dashboard of grep` content-search interface, grep process failure handling, or conversion of grep output into file matches.

HOW TO USE

Call grep_matching_files with the arguments following the grep token. It returns matching paths in first-seen order, returns an empty list for grep's normal no-match status, and reports execution errors or invalid grep arguments explicitly.

WHAT USES IT

Developer::Dashboard::CLI::OpenFile dispatches the public dashboard of grep form to this module, then sends the returned paths to the regular print or editor-selection flow.

EXAMPLES

my @recursive = grep_matching_files( args => [ '-nr', 'needle', 'lib' ] );
my @literal   = grep_matching_files( args => [ '-nr', '-F', 'a+b', 'lib' ] );