diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-22 02:35:46 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-22 02:35:46 +0100 |
| commit | 5ed59329be62c0b3a59fb47a89fd8c00a74bed5d (patch) | |
| tree | e3aea8013c7ef1aa54d1beb36f0ea7d10004241d /README.md | |
| parent | 069301a603ad07338179bafed0c35b6fe3b372f2 (diff) | |
| download | crep-5ed59329be62c0b3a59fb47a89fd8c00a74bed5d.tar.gz | |
Add Levenshtein distance
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -35,9 +35,12 @@ make all ## Usage ```bash -./crep <search_term> [path] +./crep [-c|--case-sensitive] [-l|--levenshtein <dist>] [-d|--depth <level>] <search_term> [path] ``` +- `-c, --case-sensitive`: Enable case-sensitive matching (default is case-insensitive). +- `-l, --levenshtein <dist>`: Enable fuzzy matching with a maximum Levenshtein distance of `<dist>`. +- `-d, --depth <level>`: Set the maximum recursion depth for directory traversal. - `<search_term>`: The string to search for within function/method names. - `[path]`: Optional. The directory or file to search (defaults to current directory). @@ -48,6 +51,7 @@ make all ### Examples Search for all functions containing "init" in the current directory: + ```bash ./crep init . ``` @@ -62,6 +66,12 @@ Run with debug logging enabled: DEBUG=1 ./crep init . ``` +Search for "main" allowing for 2 typos (e.g. "mian"): + +```bash +./crep -l 2 "mian" main.c +``` + ## How It Works `crep` works by: |
