From 5fcab43f887d02ad7b772e4f1989404318a368d0 Mon Sep 17 00:00:00 2001 From: Rory Bradford Date: Thu, 1 Jul 2021 10:53:41 +0100 Subject: Update README Signed-off-by: Rory Bradford --- README.md | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 450e6b7..64ffacd 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,37 @@ ### From Source -Absolute minimum requirements are a C99 compiler. `rf` has been successfully -tested on OpenBSD, FreeBSD and Linux (with glibc and musl), on amd64 and arm -and with clang and gcc. For man pages you will require +__Requirements:__ + +Minimum requirements are a C99 compiler and a POSIX-like environment. The build +system is `make`, any flavour _should_ be fine. For man pages you will require [__scdoc__(1)](https://sr.ht/~sircmpwn/scdoc/). - $ make install +__Building:__ + +Unless you have custom requirements, just use `make`, the following options +are available: + + $ make # -> dynamic binary + $ make static # -> static binary + # make install # -> install dynamic binary and man pages to PREFIX ## Usage -See `man rf` for more details and examples. \ No newline at end of file +### Command Line + +Let's start with a few simple examples. + +If you want to find all `.c` files recursively from the current directory: + + $ rf \*.c + +This is essentially a shortened version of the traditional `find . -name \*.c`. +Underneath rf uses [`fnmatch`](https://man.openbsd.org/fnmatch) so all the usual +glob rules apply. You can also use substring matching instead, something like: + + $ rf -s hello + +This would match any files with 'hello' any where in the name. Although this is +less flexible, it can potentially make things easier and faster depending on +the particular use case. -- cgit 1.4.1-2-gfad0