Skip to content

Instantly share code, notes, and snippets.

@leoliu
Last active October 6, 2017 00:58
Show Gist options
  • Save leoliu/7314772 to your computer and use it in GitHub Desktop.
Save leoliu/7314772 to your computer and use it in GitHub Desktop.
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