OCP-GREP(1)

πŸ“¦
version 1.4.0 Β· 2 versions
, in alpine 3.24

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. WHEN is either always, never or auto. 🌈
  • -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 format FMT. The value FMT must be one of auto, pager, groff or plain. With auto, the format is pager or plain whenever the TERM env var is dumb or 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