Skip to content

Instantly share code, notes, and snippets.

@joec4i
Last active August 29, 2015 14:09
Show Gist options
  • Save joec4i/efcbb83bbdb51b06ccb0 to your computer and use it in GitHub Desktop.
Save joec4i/efcbb83bbdb51b06ccb0 to your computer and use it in GitHub Desktop.
#!/bin/bash
ctags -h ".php" -R \
--tag-relative=yes \
--totals=yes \
--exclude=".git" \
--exclude=".js" \
--exclude=".twig" \
--exclude=".css" \
--exclude="web/images" \
--exclude="cache" \
--PHP-kinds=cf \
--regex-PHP="/(abstract)?\s+class\s+([^ ]+)/\2/c/" \
--regex-PHP="/(static|abstract|public|protected|private)\s+function\s+(\&\s+)?([^ (]+)/\3/f/" \
--regex-PHP="/interface\s+([^ ]+)/\1/i/" \
--regex-PHP="/\$([a-zA-Z_][a-zA-Z0-9_]*)/\1/v/" \
--regex-php="/^[ \t]*trait[ \t]+([a-z0_9_]+)/\1/t,traits/i"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment