mirror of
https://github.com/marcusDenslow/FERRUM.git
synced 2026-10-25 23:58:49 +01:00
40 lines
1022 B
C
40 lines
1022 B
C
/**
|
|
* grep.h
|
|
* Header for fast text searching in files with fuzzy matching capabilities
|
|
*/
|
|
|
|
#ifndef GREP_H
|
|
#define GREP_H
|
|
|
|
#include "common.h"
|
|
|
|
/**
|
|
* Run grep with interactive interface
|
|
*
|
|
* Shows a split view with files on left, matches on right, and
|
|
* updates search results with each keystroke
|
|
*/
|
|
void run_interactive_grep_session(void);
|
|
|
|
/**
|
|
* Command handler for the "grep" command
|
|
*
|
|
* Usage: grep [options] pattern [file/directory]
|
|
* Options:
|
|
* -n, --line-numbers Show line numbers
|
|
* -i, --ignore-case Ignore case distinctions
|
|
* -r, --recursive Search directories recursively
|
|
* -f, --fuzzy Use fuzzy matching instead of exact
|
|
* --file Specify files/directories to search (otherwise searches
|
|
* current dir)
|
|
*
|
|
* If called without arguments, opens an interactive grep UI with a split view
|
|
* that updates as you type.
|
|
*
|
|
* @param args Command arguments
|
|
* @return 1 to continue shell execution, 0 to exit shell
|
|
*/
|
|
int lsh_grep(char **args);
|
|
|
|
#endif // GREP_H
|