Skip to content

Instantly share code, notes, and snippets.

@KainokiKaede
Forked from anonymous/dirtags_mac.sh
Created December 19, 2012 10:49
Show Gist options
  • Save KainokiKaede/4335891 to your computer and use it in GitHub Desktop.
Save KainokiKaede/4335891 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Inspired by dirtags.sh from: http://ctags.sourceforge.net/faq.html#15
# Using "Approach 3" written in the website, but there are two changes.
# 1. Type one command and you are done. For current dir: $ dirtags_mac.sh .
# I'm pretty sure you don't want do this at $HOME, so handle with care!
# 2. Use ctags in MacVim.app directory. Do not use the Mac default. It sucks.
# Please do not forget to chmod +x
CMDNAME=`basename $0`
if [ $# -ne 1 ]; then
echo "Usage: $CMDNAME dir" 1>&2
exit 1
fi
cd $1
pwd
for var in `find * -type d`
do
cd $var
/Applications/MacVim.app/Contents/MacOS/ctags *
cd - > /dev/null # cd yells when used with - option, so /dev/null it.
done
/Applications/MacVim.app/Contents/MacOS/ctags --file-scope=no -R
@KainokiKaede
Copy link
Author

Oops, I wasn't logged in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment