greping function referer

November 25, 2012


func-referers()
{
git grep --show-function --line-number "$@" \
| perl -ne '/(.*=\d+)=(.*?(\w+)\(.*)/ && print "$3 \t$1\t$2\n"; '
}

References:
- git grep

grep with show-function

November 12, 2012

You can grep sources and see context function like with diff –show-c-function or diff -p.

Search sources stored in git and show the preceding line that contains the function name of the match:

git grep –show-function STR

Same, but search files not in git, even without git repository:

git grep –no-index –show-function STR

References:
- git grep

You are welcome to post here your comment on article
Comparison of channel capacity and video throughput

Please post your comments on Android internals.
Android internals
No e-mail required to post.

Please leave here your comments on http://www.makelinux.net/kernel_map.
(no email required)

Comments on Linux system

February 9, 2010

Follow

Get every new post delivered to your Inbox.