Skip to content

Instantly share code, notes, and snippets.

@carlwiedemann
Forked from msonnabaum/find_func.sh
Created October 25, 2012 17:55
Show Gist options
  • Save carlwiedemann/3954318 to your computer and use it in GitHub Desktop.
Save carlwiedemann/3954318 to your computer and use it in GitHub Desktop.
Find the given function from anywhere in the Drupal codebase, open in TextMate with cursor on same line
function findfunc {
grep -rn "function $1(" `drush dd`| grep -vP "tags|patch$"| awk -F':' '{print $1,$2}' |
while read FILE LINE
do
mate -l ${LINE} ${FILE}
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment