Skip to content

Instantly share code, notes, and snippets.

@xealits
Forked from leoliu/gctags
Created May 19, 2014 13:28
Show Gist options
  • Save xealits/595d0f4bdc0d126c9359 to your computer and use it in GitHub Desktop.
Save xealits/595d0f4bdc0d126c9359 to your computer and use it in GitHub Desktop.
#!/bin/bash
export GTAGSLABEL=ctags
if [ -r $PWD/.globalrc ]; then
GTAGSCONF=$PWD/.globalrc
elif [ -r $HOME/.globalrc ]; then
GTAGSCONF=$HOME/.globalrc
elif [ -r /usr/local/share/gtags/gtags.conf ]; then
GTAGSCONF=/usr/local/share/gtags/gtags.conf
fi
export GTAGSCONF
if which mkid > /dev/null; then
gtags -I
else
gtags
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment