X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=.bashrc;h=88a0a40d785780b7ef1e170d01af050161a4dd71;hp=e0e981d3f4887fc4480c1f3b5fca2e35db59b304;hb=38bdaa392257c530a091a96e60e32671bd069afe;hpb=509e5a1bca2799cbe364bdc7ed4a315eeea298ee diff --git a/.bashrc b/.bashrc index e0e981d..88a0a40 100644 --- a/.bashrc +++ b/.bashrc @@ -144,7 +144,8 @@ alias disass='objdump -D --target=binary --architecture=i386' alias cal='cal -m' alias vncreadonly='vncviewer -FullColor -Shared -ViewOnly' alias diff='diff -u' -alias rpm='rpm --qf "%{name}-%{version}-%{release}.%{arch}\n"' +alias rpmqf='rpm --qf "%{name}-%{version}-%{release}.%{arch}\n"' +alias gdbn='gdb -nx --command=~/.gdbinit' # '2>/dev/null' to prevent: unalias: x: not found unalias 2>/dev/null cp # -i @@ -232,11 +233,14 @@ function mi { ( ); };export -f mi function ctags {(unset ctags; if [ $# -ne 0 -a '(' $# -ne 1 -o "$1" '!=' "--c-types=+px" ')' ];then ctags "$@";else - find -type f -a '!' -name tags -a '!' -name TAGS -a '(' -false \ + find -name testsuite -prune -o \ + -type f -a '!' -name tags -a '!' -name TAGS -a '(' -false \ -o -name "*.[chC]" \ -o -name "*.cc" \ + -o -name "*.cxx" \ -o -name "*.java" \ -o -name "*.p[lm]" \ + -o -name "*.py" \ ')' \ |ctags --file-tags -L - "$@" fi; );}; export -f ctags @@ -250,6 +254,23 @@ function ipcsrmall { ipcs|awk '/- Shared Memory/{x="-m"}/- Semaphore/{x="-s"}/^0 function eog {(unset eog; touch /tmp/eog.$$;eog "$@" {,,,,,,,,,}/tmp/eog.$$;rm -f /tmp/eog.$$; );}; export -f eog function diffc { diff -u "$@"|grep -v '^\(Only in \|Binary files\)'; }; export -f diffc function diffi { diffc -X ~/.diffi.list "$@"; }; export -f diffi +function cvs {(unset cvs; + local _opts _opts_d _now _line _o + if grep -iw "sources.redhat.com:/cvs/src" CVS/Root &>/dev/null;then _opts_d="";else _opts_d="-d";fi + _now=false + _line="" + _opts="" + while [ $# != 0 ];do + _o="$1" + shift + _line="$_line $_o" + if [ "$_o" = "--" ] && ! $_now;then _now=true;continue;fi + if [ "${_o#-}" != "$_o" ] && ! $_now;then continue;fi + if [ "$_o" = update -o "$_o" = upd -o "$_o" = up ];then _opts="$_opts_d";fi + break + done + cvs $_line $_opts "$@" + ); }; export -f cvs ulimit -S -c 0 set +H