diff options
author | Alejandro Colomar <alx@kernel.org> | 2023-11-03 15:08:49 +0100 |
---|---|---|
committer | Alejandro Colomar <alx@kernel.org> | 2023-11-03 23:05:45 +0100 |
commit | 55dd5d7255c85c3229efb42cdedfef496d983c76 (patch) | |
tree | 0f0fab8470f9913bd75438b77819852a903f4bd7 /share | |
parent | 824733e33015d716bf1ae35f703288721a86f2dc (diff) |
Don't find files recursively
grep only one file (or stdin).
The current implementation doesn't allow filterin standard input, which
I miss some times. I'm removing this feature now, to be able to rewrite
most of the program in a way that allows filtering stdin, and then will
consider adding back a recursive mode if necessary.
Also, don't remove the two blanks at the start of the output, for
consistency when calling this program via xargs(1), which will become
more common now that it only handles single files.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man1/grepc.1 | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/share/man/man1/grepc.1 b/share/man/man1/grepc.1 index 2d9e8dd..2d9cde5 100644 --- a/share/man/man1/grepc.1 +++ b/share/man/man1/grepc.1 @@ -5,7 +5,7 @@ grepc \- find C declarations, definitions, and uses in source code .B grepc .RI [ option\~ .\|.\|.\&] .I pattern -.RI [ file\~ .\|.\|.] +.RI [ file ] .SH DESCRIPTION .MR grepc 1 searches for C declarations, definitions, and/or uses of @@ -18,14 +18,10 @@ is a PCRE pattern. It normally represents a C identifier, and word boundaries are implicitly added to it in most cases. .PP -If -.I file -is a directory, -the search is recursive within that directory. If no .I file is given, -the working directory is searched. +the program reads the standard input. .SS Types of code This program can search for several types of code. The following arguments can be passed to the @@ -158,6 +154,8 @@ Default: .SH EXAMPLES .EX .RB \(ti/src/nginx/unit$ " grepc nxt_sprintf;" +\& +\& \&./src/nxt_sprintf.h:15: NXT_EXPORT u_char *nxt_cdecl nxt_sprintf(u_char *buf, u_char *end, const char *fmt, ...); |