Last active
September 17, 2023 07:33
-
-
Save chendotjs/9bec5dfba8e328e905c605480fb5958e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
if [[ $# -lt 1 ]]; then | |
ctags -R -x --kinds-C=pd /usr/include/bpf/ | |
else | |
funcline=$(ctags -R -x --kinds-C=pd /usr/include/bpf/ | grep $1) | |
echo $funcline | awk '{printf("%s %s\n", $4, $3)}' | if read -r src linenum; then | |
ag -B 1 -A 5 "$1\(" $src | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment