Commit 88a025c3 by PotatoGim

bashrc 개선

parent 8e75b8b5
......@@ -15,7 +15,7 @@
#---------------------------------------------------------------------------
# Description : Make tags using ctags with C sources
# Authors : Gim Ji-Hyeon <potatogim@gluesys.com>
# Authors : Gim Ji-Hyeon <potatogim@potatogim.net>
# Written at :
# Parameters : none
#---------------------------------------------------------------------------
......@@ -27,18 +27,46 @@ function mkctags
--exclude=".svn" --exclude=".git" --exclude="*~" \
--file-scope=no -f tags .
find $PWD \( -name "*.asm" -o \
-name "*.c" -name "*.h" \
-name "*.S" -o -name "*.s" -o \
-name "Makefile" -o -name "*.mk" \) \
find $PWD \( -name "*.asm" -o -name "*.[chsS]" -o -name "Makefile" \
-o -name "*.mk" \) \
-print > cscope.files
cscope -i cscope.files
}
#---------------------------------------------------------------------------
# Description : Make tags using ctags with Linux Kernel sources
# Authors : Gim Ji-Hyeon <potatogim@potatogim.net>
# Written at : 2015년 01월 13일 15:07
# Parameters :
#---------------------------------------------------------------------------
function mkktags
{
$src="$PWD"
$arch=`uname -m`
rm -f tags cscope.files cscope.out
ctags --recurse --totals --sort=foldcase \
--exclude=".svn" --exclude=".git" --exclude="*~" \
--file-scope=no -f tags .
find $src \( -path "$src/arch/*" -not -path "$src/arch/$arch*" -prune \
-o -path "$src/include/asm-*" \
-not -path "$src/include/asm-$arch*" -prune \
-o -path "$src/tmp*" -prune \
-o -path "$src/Documentation*" -prune \
-o -path "$src/scripts*" -prune
-o -path "$src/drivers*" -prune \
-o -name "*.[chxsS]" -o -name "*.asm" \) \
-print > $src/cscope.files
cscope -b -q -k -k -i cscope.files
}
#---------------------------------------------------------------------------
# Description : Make tags using ctags with C++ sources
# Authors : Gim Ji-Hyeon <potatogim@gluesys.com>
# Authors : Gim Ji-Hyeon <potatogim@potatogim.net>
# Written at :
# Parameters : none
#---------------------------------------------------------------------------
......@@ -51,14 +79,14 @@ function mkcpptags
--c++-kinds=+p --fields=+iaS --extra=+q --file-scope=no -f tags .
### http://www.topbug.net/blog/2012/03/17/generate-ctags-files-for-c-slash-c-plus-plus-source-files-and-all-of-their-included-header-files/
#
# gcc -M $* | sed -e 's/[\\ ]/\n/g' | sed -e '/^$/d' -e '/\.o:[ \t]*$/d' | \
# ctags -L - --c++-kinds=+p --fields=+iaS --extra=+q
# ctags -L - --c++-kinds=+p --fields=+iaS --extra=+q
#
find $PWD \( -name "*.asm" -o \
-name "*.c" -o -name "*.cxx" -o -name "*.cc" -o -name "*.cpp" -o \
-name "*.h" -o -name "*.hxx" -o -name "*.hh" -o -name "*.hpp" -o \
-name "*.S" -o -name "*.s" -o \
-name "Makefile" -o -name "*.mk" \) \
find $PWD \( -name "*.asm" -o -name "*.[chsS]" -o -name "*.[ch]xx" \
-o -name "*.[ch]pp" -o -name "*.cc" -o -name "*.hh" \
-o -name "Makefile" -o -name "*.mk" \) \
-print > cscope.files
cscope -i cscope.files
......@@ -66,7 +94,7 @@ function mkcpptags
#---------------------------------------------------------------------------
# Description : Make tags using ctags with perl sources
# Authors : Gim Ji-Hyeon <potatogim@gluesys.com>
# Authors : Gim Ji-Hyeon <potatogim@potatogim.net>
# Written at :
# Parameters : none
#---------------------------------------------------------------------------
......@@ -78,8 +106,8 @@ function mkperltags
--exclude="blib" --exclude=".svn" --exclude=".git" --exclude="*~" \
--languages="Perl" --langmap="Perl:+.t" -f tags .
find $PWD \( -name "*.pm" -o -name "*.pl" -o -name "*.t" -o \
-name "Makefile" -o -name "*.mk" \) \
find $PWD \( -name "*.p[lm]" -o -name "*.t" -o \
-name "Makefile" -o -name "Makefile.PL" -o -name "*.mk" \) \
-print > cscope.files
cscope -b -q -i cscope.files
......@@ -88,20 +116,21 @@ function mkperltags
#---------------------------------------------------------------------------
# Description : Make tags using ctags with default headers
# Authors : Gim Ji-Hyeon <potatogim@gluesys.com>
# Authors : Gim Ji-Hyeon <potatogim@potatogim.net>
# Written at :
# Parameters : none
#---------------------------------------------------------------------------
function mkgtags
{
ctags --sort=foldcase --c++-kinds=+p --fields=+iaS --extra=+q --recurse -f${HOME}/.ctags/c++ /usr/include/c++
ctags --sort=foldcase --c++-kinds=+p --fields=+iaS --extra=+q --recurse -f${HOME}/.ctags/boost /usr/include/boost
ctags --sort=foldcase --c++-kinds=+p --fields=+iaS --extra=+q --recurse -f${HOME}/.ctags/qt4 /usr/include/qt4
ctags --sort=foldcase --c++-kinds=+p --fields=+iaS --extra=+q \
--recurse -f${HOME}/.ctags/c++ /usr/include/c++
ctags --sort=foldcase --c++-kinds=+p --fields=+iaS --extra=+q \
--recurse -f${HOME}/.ctags/boost /usr/include/boost
}
#---------------------------------------------------------------------------
# Description : Run vmplayer
# Authors : Gim Ji-Hyeon <potatogim@gluesys.com>
# Authors : Gim Ji-Hyeon <potatogim@potatogim.net>
# Written at :
# Parameters : none
#---------------------------------------------------------------------------
......@@ -112,7 +141,7 @@ function pg_runvm
#---------------------------------------------------------------------------
# Description : Run x11vnc
# Authors : Gim Ji-Hyeon <potatogim@gluesys.com>
# Authors : Gim Ji-Hyeon <potatogim@potatogim.net>
# Written at :
# Parameters : none
#---------------------------------------------------------------------------
......@@ -124,7 +153,7 @@ function pg_runvnc
#---------------------------------------------------------------------------
# Description : Rename VM on VMware ESXi Server
# Authors : Gim Ji-Hyeon <potatogim@gluesys.com>
# Authors : Gim Ji-Hyeon <potatogim@potatogim.net>
# Written at : Tue Aug 27 08:09:28 UTC 2013
# Parameters :
# $1 : from
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment