create_tags is added
This commit is contained in:
@@ -282,6 +282,39 @@ function cgrep() {
|
||||
fi
|
||||
}
|
||||
|
||||
function create_tags() {
|
||||
#Bloomberg
|
||||
if [ -e /opt/swt/bin/ctags ]; then
|
||||
CTAGS=/opt/swt/bin/ctags
|
||||
else
|
||||
CTAGS=ctags
|
||||
fi
|
||||
CTAGS_OPT='--recurse=yes '
|
||||
CTAGS_OPT+='--verbose '
|
||||
CTAGS_OPT+='--totals=yes '
|
||||
CTAGS_OPT+='--tag-relative=yes '
|
||||
|
||||
CTAGS_DIR='.ctags_dir'
|
||||
if [ -f $PWD/$CTAGS_DIR ]; then
|
||||
CTAGS_ROOT="$PWD"
|
||||
elif [ -f $PWD/../$CTAGS_DIR ]; then
|
||||
CTAGS_ROOT="$PWD/.."
|
||||
elif [ -f $PWD/../../$CTAGS_DIR]; then
|
||||
CTAGS_ROOT="$PWD/../.."
|
||||
else
|
||||
CTAGS_ROOT="$PWD"
|
||||
fi
|
||||
|
||||
if [ -f $CTAGS_ROOT/$CTAGS_DIR ]; then
|
||||
CTAGS_SRC="-L $CTAGS_ROOT/$CTAGS_DIR"
|
||||
else
|
||||
CTAGS_SRC='$@'
|
||||
fi
|
||||
|
||||
cd $CTAGS_ROOT
|
||||
$CTAGS $CTAGS_OPT $CTAGS_SRC
|
||||
cd -
|
||||
}
|
||||
|
||||
# Add an "alert" alias for long running commands. Use like so:
|
||||
# sleep 10; alert
|
||||
|
||||
@@ -1,5 +1,24 @@
|
||||
# Basic options
|
||||
--recurse=yes
|
||||
--verbose
|
||||
--tag-relative=yes
|
||||
--exclude=.git
|
||||
|
||||
--exclude=.git*
|
||||
--exclude=.doxygen
|
||||
--exclude=*.o
|
||||
--exclude=*.d
|
||||
--exclude=*.a
|
||||
--exclude=*.so
|
||||
--exclude=*.tsk
|
||||
--exclude=*.cap
|
||||
--exclude=*.defs
|
||||
--exclude=*.dep
|
||||
--exclude=*.mem
|
||||
--exclude=*.opts
|
||||
--exclude=*.pub
|
||||
--exclude=*.txt
|
||||
--exclude=*.swp
|
||||
--exclude=*.swo
|
||||
--exclude=*.swn
|
||||
--exclude=build
|
||||
--exclude=llcalc*
|
||||
--exclude=ported.*
|
||||
--exclude=00*
|
||||
--exclude=*plink*
|
||||
|
||||
Reference in New Issue
Block a user