OCP-GREP(1)
OCP-GREP(1) π the Ocp-grep Manual, but make it bestie-core
okay so bestie, welcome to ocp-grep β the Ocp-grep Manual β and we're gonna make it make sense. π«Άβ¨
β¨ NAME β¨
ocp-grep β locates instances of a given OCaml ident in source files, handling (local) opens, module, etc. π
πΈ SYNOPSIS πΈ
ocp-grep [--color=WHEN] [--regexp-strings] [--strings] [OPTION]β¦ ID [FILES]β¦
π ARGUMENTS π
FILESβ files or directories to search into. By default, searches for project root. ποΈID(required) β fully qualified ident to search for (eg.List.map,Set.Make.add, ...), or string with option-s. π
π¦ OPTIONS π¦
-c WHEN,--color=WHENβ colorize the output.WHENis eitheralways,neverorauto. π-e,--regexp-stringsβ like--strings, but search a POSIX regular expression. π§-s,--stringsβ search strings within strings in the source, instead of searching code. π
π COMMON OPTIONS π
--help[=FMT](default=auto) β show this help in formatFMT. The valueFMTmust be one ofauto,pager,grofforplain. Withauto, the format ispagerorplainwhenever theTERMenv var isdumbor undefined. π«Ά--versionβ show version information. π
π EXIT STATUS π
ocp-grep exits with the following status:
0β on success. β123β on indiscriminate errors reported on standard error. π124β on command line parsing errors. π125β on unexpected internal errors (bugs). π
π BUGS π
Current version doesn't handle shadowing and different kinds of idents, therefore you can get false positive if a type and a value have the name. bestie, that's the false-positive warning, not a vibe. π
Field records don't currently respect the distributive {Module.' syntax. Also, if you use record disambiguation, you're on your own for field names since this program doesn't know about typing. π«
okay bye bestie β this iconic manual's source/version footer is Ocp-grep 1.4.0 (no date on the line, just the version tea), and we're out πβ¨
π¦ where this page comes from
- alpine 3.24: ocp-index-doc 1.4.0-r3 Β· LGPL-2.1-only WITH OCaml-LGPL-linking-exception AND GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms