.bashrc chopped into separate file.

This commit is contained in:
2021-06-16 04:12:17 -07:00
parent 3cb73cb62c
commit 4609a035af
6 changed files with 186 additions and 113 deletions

62
config/.profile.dev Executable file
View File

@@ -0,0 +1,62 @@
#!/bin/bash
#
# colored GCC warnings and errors
#
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
function cgrep() {
if [[ $# -eq 0 ]]
then
echo "Usage: cgrep <pattern> "
else
grep -nR --colour \
--include=\*.cpp \
--include=\*.c \
--include=\*.hpp \
--include=\*.h \
--include=\*.inc \
--include=\*.php \
--include=\*.py \
--include=\*.sh \
--exclude-dir=.git \
--exclude-dir=.svn \
--exclude-dir=llcalc* \
--exclude-dir=00* \
"$1" .
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_CFG='.ctags_dir'
CTAGS_ROOT="$PWD"
if [ ! -f $PWD/$CTAGS_DIR_CFG ]; then
GIT_ROOT=$(git top pwd)
if [ -f $GIT_ROOT/$CTAGS_DIR_CFG ]; then
CTAGS_ROOT="$GIT_ROOT"
fi
fi
if [ -f $CTAGS_ROOT/$CTAGS_DIR_CFG ]; then
CTAGS_SRC="-L $CTAGS_ROOT/$CTAGS_DIR"
else
CTAGS_SRC="$@"
fi
cd $CTAGS_ROOT
$CTAGS $CTAGS_OPT $CTAGS_SRC
cd -
}