+Double invocation protected by "$_home_short_dotbashrc" flag
[nethome.git] / .bashrc
1 if [ -z "$_home_short_dotbashrc" ];then
2         _home_short_dotbashrc=true
3
4 if [ -f /etc/bashrc ];then source /etc/bashrc;fi
5
6 function _bash_profile_addpath  # variable,dirpathname
7 {
8         if [ '!' -d "$2" ];then return;fi
9         if [ -n "$3" -o -z "`eval "echo \\${$1}"`" ];then
10                 eval "$1='$2'"
11         else
12                 # we want to override any original directories, place dirpathname first!
13                 eval "$1=\"$2:\${$1}\""
14         fi
15         export "$1"
16 }
17
18 _bash_profile_addpath PATH            "$HOME/bin"
19 _bash_profile_addpath PATH            "$HOME/sbin"
20 _bash_profile_addpath LD_LIBRARY_PATH "$HOME/lib"
21 _bash_profile_addpath MANPATH         "$HOME/man"
22 _bash_profile_addpath PERLLIB         "$HOME/lib/perl5/site_perl"
23 _bash_profile_addpath PERLLIB         "$HOME/lib/perl5/site_perl/`perl -V:version|cut -d "'" -f 2`"
24 _bash_profile_addpath CVSROOT         "$HOME/cvs" single
25 _bash_profile_addpath CVSROOT         "$HOME/pserver/cvs" single
26
27 unset -f _bash_profile_addpath
28
29 alias ls='ls -bF'
30 alias l='ls -lbF'
31 alias maple="ssh -t vega.fjfi.cvut.cz maple"
32 #alias cc='cc -I/home/short/include'
33 alias vi='vim'
34
35 weberr="/var/log/httpd/error/klokan.error_log"
36 if [ -f "$weberr" ];then alias weberr='tail "$weberr"';fi
37 weblog="/var/log/httpd/klokan.access_log"
38 if [ -f "$weblog" ];then alias weblog='tail -n 20000 "$weblog"|grep "\\(~\\|%7[eE]\\)short"';fi
39
40 export IGNOREEOF=10
41 export TMOUT=900
42 export EDITOR='vim'
43 export LC_CTYPE=cs_CZ.ISO-8859-2
44
45 function cvsdiff    { cvs diff   "$@" 2>&1|             less; }; export -f cvsdiff
46 function cvsdiffi   { cvs diff   "$@" 2>&1|grep -v '^?'|less; }; export -f cvsdiffi
47 function cvsupdate  { cvs update "$@" 2>&1|             less; }; export -f cvsupdate
48 function cvsupdatei { cvs update "$@" 2>&1|grep -v '^?'|less; }; export -f cvsupdatei
49
50 ulimit -c 0
51
52 if [ -f "$HOME/.bashrc.local" ];then source "$HOME/.bashrc.local";fi
53
54 fi      # _home_short_dotbashrc