diff options
author | Rory Bradford <roryrjb@gmail.com> | 2020-04-10 11:34:57 +0100 |
---|---|---|
committer | Rory Bradford <roryrjb@gmail.com> | 2020-04-10 11:34:57 +0100 |
commit | 1cc76724bed0180355e53d705bb9ec30928a71ac (patch) | |
tree | 7ccf9e253c69a844995e3a0572120fc824fcc9dc /rf.1 | |
parent | 8af4130a8927f0f4aaab208769b93da1ef0c32f8 (diff) | |
download | rf-1cc76724bed0180355e53d705bb9ec30928a71ac.tar.gz |
Refactor
Implement `fnmatch` file name matching. Define clang formatting, previously used defaults without a config file; apply formatting. Make `install` more cross-platform. Signed-off-by: Rory Bradford <roryrjb@gmail.com>
Diffstat (limited to 'rf.1')
-rw-r--r-- | rf.1 | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/rf.1 b/rf.1 index 1d5001e..364b719 100644 --- a/rf.1 +++ b/rf.1 @@ -9,7 +9,7 @@ rf \- A tiny and simple file finder .SH DESCRIPTION .B rf -will find files based on simple substring patterns. +will find files based on glob patterns. .SH OPTIONS .TP @@ -42,43 +42,5 @@ Invert matches. .br Limit to [n] matches. The default is 0 which will return all matches. -.SH PATTERNS -Files and directories can be found using very simple patterns. - -.TP -.B "Substrings" -.br -A simple string is basically a substring match. So if you supply a -pattern of "js", rf will match any file that contains the string "js" -anywhere in the filename. If the pattern is ".js" it will match any -".js" or even ".json" files for example, as well as the filename -"script.js.backup", in other words the character "." is just that, it -doesn't have any special significance such as in regular expressions. -It also doesn't have any kind of implicit positional information, it -will just match at any point in the filename. - -.TP -.B "Beginning and end" -.br -There are two characters which are treated as special. The caret -character "^" signifies *at the beginning of* the filename. So for -example if you specify the substring of "bar" it will match the -files "bar", "barbar", "foobar" and "foobarbaz", as that substring -appears at some point in the filename. If you specify the substring -of "^bar" it will only match the files "bar" and "barbar" as that -substring only appears at the beginning of those filenames. - -On the other side, if you use the dollar character "$" it will only -match if at the end of the filename. So in the previous example if -you specified "bar$" it would match both "foobar" and "barbar". - -You can use these characters in combination to only match the whole -string. So with our imaginary directory above, specifying "^bar$" will -only match the file "bar". - -.SH SEE ALSO -.BR find (1), -.BR rg (1) - .SH COPYRIGHT Copyright \(co 2020 Rory Bradford <roryrjb@gmail.com>. |