summaryrefslogtreecommitdiffstats
path: root/bin/grepc
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2022-05-11 21:36:45 +0200
committerAlejandro Colomar <alx.manpages@gmail.com>2022-05-11 21:36:51 +0200
commit7e957a08fb09062db85f66b93fd858b8dfcd21b1 (patch)
tree35d63854880f266b9c2af56b555165ba6f1d43a0 /bin/grepc
parent76d630056966061a0e4962a8f22d12fe8a453c7f (diff)
grepc, grepc.1: Don't print leading blank lines.
Also, update the manual page EXAMPLES regarding blank lines. Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Diffstat (limited to 'bin/grepc')
-rwxr-xr-xbin/grepc21
1 files changed, 13 insertions, 8 deletions
diff --git a/bin/grepc b/bin/grepc
index 56a1914..e8c49c3 100755
--- a/bin/grepc
+++ b/bin/grepc
@@ -223,18 +223,23 @@ grepc_type()
}
+grepc_grepc()
+{
+ grepc_macro "$1";
+ grepc_enum_constant "$1";
+ grepc_func "$1";
+ grepc_linux "$1";
+ grepc_glibc "$1";
+ grepc_type "$1";
+}
+
+
main()
{
grepc_parse_cmd $@;
-
grepc_find_files "$identifier";
-
- grepc_macro "$identifier";
- grepc_enum_constant "$identifier";
- grepc_func "$identifier";
- grepc_linux "$identifier";
- grepc_glibc "$identifier";
- grepc_type "$identifier";
+ grepc_grepc "$identifier" \
+ | tail -n+3;
}