fdcfun: search C function definition in Linux source

This commit is contained in:
giomba 2021-11-30 17:24:26 +01:00
parent 12b8f29978
commit 9289bff8cf
1 changed files with 9 additions and 0 deletions

9
zshrc
View File

@ -3806,6 +3806,15 @@ if command -v direnv &> /dev/null ; then
eval "$(direnv hook zsh)"
fi
# Command to search C function definitions, with Linux kernel coding style.
# Example:
# $ fdcfun wait_for_completion
if command -v rg &> /dev/null; then
fdcfun() {
rg -U "$1(.*)\n\{"
}
fi
# add local binaries
if [[ -r ~/bin ]]; then
PATH=$PATH:~/bin