diff options
| author | Alejandro Colomar <alx.manpages@gmail.com> | 2022-05-06 23:16:42 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2025-10-29 21:28:45 +0100 |
| commit | bc400ddb7b0a641a6bb8c696430ce6aca422ad1a (patch) | |
| tree | 3543845244ffea0cc4d76388ea623adbb04f9540 | |
| parent | a6aae8250933426ae1097e526167ffc50259b31e (diff) | |
| download | man-pages-bc400ddb7b0a641a6bb8c696430ce6aca422ad1a.tar.gz | |
grepc: grepc_func_def: Increase robustness of regex
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
| -rwxr-xr-x | bin/grepc | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -54,7 +54,8 @@ function grepc_func_def() | grep '\.[ch]$' \ | xargs grep -l "^$1\b" \ | sort \ - | xargs pcregrep -Mn "(?s)^\$[\w\s*]+?^$1\(.*?^}" /dev/null \ + | xargs pcregrep -Mn \ + "(?s)^[\w\s*]+?^$1\([\w\s(,)[\]*]+?(...)?\)\s*{.*?^}" /dev/null \ | sed -E 's/^[^: ]+:[0-9]+:/\n\n&/'; } |
