- if [ -z "$TERM" ]; then
- eval `tset -Q -s -m 'network:?xterm'`
- fi
-
- stty sane erase ^H
-
- if which less >/dev/null 2>&1; then
- HAS_LESS=true
- fi
-
- case "$TERM" in
- linux)
- # mutt, python and vim
- BACKGROUND=DARK
- export BACKGROUND
- [ -n "$HAS_LESS" ] && . "$HOME"/lib/config/less/dark_bg
- ;;
-
- *rxvt*|screen*|*term*|vt100)
- BACKGROUND=LIGHT
- export BACKGROUND
- [ -n "$HAS_LESS" ] && . "$HOME"/lib/config/less/light_bg
- ;;
- esac
-
- if [ -x /usr/bin/dircolors ]; then
- test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
- fi
-
- if [ -n "$HAS_LESS" ]; then
- PAGER=less
- LESS="Rgimq"
- case "$LC_CTYPE" in
- *UTF-8) LESSCHARSET=utf-8
- ;;
-
- *) LESSCHARSET=koi8-r
- ;;
- esac
- #LESSCHARDEF=32c.
- LESSEDIT='vim ?lt+%lt. -- %f'
- export LESS LESSCHARSET LESSEDIT # LESSCHARDEF
-
- # make less more friendly for non-text input files, see lesspipe(1)
- #[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
-
- else
- PAGER=more
- fi
- export PAGER
-
- EDITOR="$HOME"/.vim/vim.sh
- FCEDIT="$EDITOR"
- VISUAL="$EDITOR"
- export EDITOR FCEDIT VISUAL
-
- HISTCONTROL=ignoreboth
- HISTIGNORE='&: *:x:X:[bf]g'
- HISTFILE="$HOME/.sh_history"
- HISTFILESIZE=2000
- HISTSIZE=1000
- export HISTCONTROL HISTIGNORE HISTFILE HISTFILESIZE HISTSIZE
-
- # Used by bash/mc for hostname completion
- HOSTFILE="$HOME"/lib/config/hosts
- export HOSTFILE
-
- MAIL="/var/mail/$USER"
- MAILPATH="$MAIL:$HOME/mail/admin:$HOME/mail/block:$HOME/mail/bulk"
- if [ -d "$HOME"/mail/lists/ ]; then
- MAILPATH="$MAILPATH:`echo $HOME/mail/lists/* | sed 's/ /:/g'`"
- fi
- export MAIL MAILPATH
-
- BROWSER="links2:links:elinks:w3m:lynx"
- case "$TERM" in
- *rxvt*|screen*|*term*|vt100)
- BROWSER="l:$BROWSER"
- ;;
- esac
- export BROWSER
-
- #all_proxy="http://localhost:3128"
- #ftp_proxy="$all_proxy"
- #gopher_proxy="$all_proxy"
- #http_proxy="$all_proxy"
- #https_proxy="$all_proxy"
- auto_proxy="file:///home/phd/admin/WWW/Mozilla/mozilla.pac"
- no_proxy="localhost,127.0.0.1"
- #export all_proxy ftp_proxy http_proxy https_proxy auto_proxy no_proxy # gopher_proxy
- export auto_proxy no_proxy
-
- ENV="$HOME/.shellrc"
- export ENV
-
- # set variable identifying the chroot you work in (used in the prompt below)
- if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
- debian_chroot="`cat /etc/debian_chroot`"
- fi
-
- if test -n "$BASH_VERSION"; then
- if [ -r "$HOME"/admin/prog/bash_prompt ]; then
- . "$HOME"/admin/prog/bash_prompt
- set_prompts
- unset set_prompts
- else
- OPS1="${debian_chroot:+($debian_chroot)}\u@\h:\W \$SHLVL\\$ "
- fi
-
- . "$ENV"
-
- else
- OPS1="${debian_chroot:+($debian_chroot)}`/usr/bin/whoami`@`/bin/hostname -s` > "
- fi
-
- ### biff controls new mail notification
- #biff n
- ### mesg controls messages (write/talk) from other users
- mesg n
- # make mail(1) use a pager
- crt=; export crt
-
- PYTHONSTARTUP="$HOME"/lib/python/init.py
- export PYTHONSTARTUP
-
- name="Oleg Broytman"
- email="phd@phdru.name"
-
- GIT_AUTHOR_NAME="$name"
- GIT_AUTHOR_EMAIL="$email"
- GIT_COMMITTER_NAME="$name"
- GIT_COMMITTER_EMAIL="$email"
- export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL
-
- HGUSER="$name <$email>"
- export HGUSER
-
- unset name email
-
- #if test -f .hushlogin && ! cmp -s .motd /etc/motd; then
- # tee $HOME/.motd < /etc/motd
- #fi
+ #if test -f .hushlogin && ! cmp -s .motd /etc/motd; then
+ # tee $HOME/.motd < /etc/motd
+ #fi
+
+ if [ -z "$TERM" ]; then
+ eval `tset -Q -s -m 'network:?xterm'`
+ fi
+
+ stty sane erase ^H
+
+ if which less >/dev/null 2>&1; then
+ HAS_LESS=true
+ fi
+
+ case "$TERM" in
+ linux)
+ # mutt, python and vim
+ BACKGROUND=DARK
+ export BACKGROUND
+ [ -n "$HAS_LESS" ] && . "$HOME"/lib/config/less/dark_bg
+ ;;
+
+ *rxvt*|screen*|*term*|vt100)
+ BACKGROUND=LIGHT
+ export BACKGROUND
+ [ -n "$HAS_LESS" ] && . "$HOME"/lib/config/less/light_bg
+ ;;
+ esac
+
+ if [ -x /usr/bin/dircolors ]; then
+ test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
+ fi
+
+ if [ -n "$HAS_LESS" ]; then
+ PAGER=less
+ LESS="Rgimq"
+ case "$LC_CTYPE" in
+ *UTF-8) LESSCHARSET=utf-8
+ ;;
+
+ *) LESSCHARSET=koi8-r
+ ;;
+ esac
+ #LESSCHARDEF=32c.
+ LESSEDIT='vim ?lt+%lt. -- %f'
+ export LESS LESSCHARSET LESSEDIT # LESSCHARDEF
+
+ # make less more friendly for non-text input files, see lesspipe(1)
+ #[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
+
+ else
+ PAGER=more
+ fi
+ export PAGER
+
+ EDITOR="$HOME"/.vim/vim.sh
+ FCEDIT="$EDITOR"
+ VISUAL="$EDITOR"
+ export EDITOR FCEDIT VISUAL
+
+ HISTCONTROL=ignoreboth
+ HISTIGNORE='&: *:[bf]g:cd:clear:e:exit:logout:l:ls:ll:llp:mc:w:X:x'
+ HISTFILE="$HOME/.sh_history"
+ HISTFILESIZE=2000
+ HISTSIZE=1000
+ export HISTCONTROL HISTIGNORE HISTFILE HISTFILESIZE HISTSIZE
+
+ # Used by bash/mc for hostname completion
+ HOSTFILE="$HOME"/lib/config/hosts
+ export HOSTFILE
+
+ MAIL="/var/mail/$USER"
+ MAILPATH="$MAIL:$HOME/mail/admin:$HOME/mail/block:$HOME/mail/bulk"
+ if [ -d "$HOME"/mail/lists/ ]; then
+ MAILPATH="$MAILPATH:`echo $HOME/mail/lists/* | sed 's/ /:/g'`"
+ fi
+ export MAIL MAILPATH
+ if [ -n "$STY" -a "$WINDOW" != 0 ]; then
+ unset MAILCHECK
+ fi
+
+ BROWSER="links2:links:elinks:w3m:lynx"
+ case "$TERM" in
+ *rxvt*|screen*|*term*|vt100)
+ BROWSER="l:$BROWSER"
+ ;;
+ esac
+ export BROWSER
+
+ #all_proxy="http://localhost:3128"
+ #ftp_proxy="$all_proxy"
+ #gopher_proxy="$all_proxy"
+ #http_proxy="$all_proxy"
+ #https_proxy="$all_proxy"
+ auto_proxy="file:///home/phd/admin/WWW/Mozilla/mozilla.pac"
+ no_proxy="localhost,127.0.0.1"
+ #export all_proxy ftp_proxy http_proxy https_proxy auto_proxy no_proxy # gopher_proxy
+ export auto_proxy no_proxy
+
+ ENV="$HOME/.shellrc"
+ export ENV
+
+ # set variable identifying the chroot you work in (used in the prompt below)
+ if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
+ debian_chroot="`cat /etc/debian_chroot`"
+ fi
+
+ if test -n "$BASH_VERSION"; then
+ . "$HOME/.bashrc"
+ else
+ PS1="${debian_chroot:+($debian_chroot)}`/usr/bin/whoami`@`/bin/hostname -s` > "
+ fi
+
+ ### biff controls new mail notification
+ #biff n
+ ### mesg controls messages (write/talk) from other users
+ mesg n
+ # make mail(1) use a pager
+ crt=; export crt
+
+ PYTHONSTARTUP="$HOME"/lib/python/init.py
+ export PYTHONSTARTUP
+
+ name="Oleg Broytman"
+ email="phd@phdru.name"
+
+ GIT_AUTHOR_NAME="$name"
+ GIT_AUTHOR_EMAIL="$email"
+ GIT_COMMITTER_NAME="$name"
+ GIT_COMMITTER_EMAIL="$email"
+ export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL
+
+ HGUSER="$name <$email>"
+ export HGUSER
+
+ unset name email
+
+ #if which pyenv >/dev/null 2>&1; then
+ # PYENV_ROOT="$HOME/.pyenv"
+ # export PYENV_ROOT
+ # PATH="$PYENV_ROOT/bin:$PATH"
+ # eval "`pyenv init --path`"
+ #fi
+
+ #SCREENDIR="$HOME"/tmp/screen
+ #export SCREENDIR
+ #mkdir -p "$SCREENDIR"
+ #chmod 700 "$SCREENDIR"