Skip to content

Instantly share code, notes, and snippets.

@leoliu
Last active Oct 6, 2017
Embed
What would you like to do?
gctags
#!/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