.env
author Oleksandr Gavenko <gavenkoa@gmail.com>
Fri, 09 Jan 2015 23:31:59 +0200
changeset 722 9bd7ce98c7ce
parent 708 06a040a98984
child 750 58e68b82bf46
permissions -rw-r--r--
colored-stats
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
654
88c5d34d3032 Mark file as sh script for Emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 653
diff changeset
     1
# Bash and Zsh common env var settings. -*- sh -*-
250
405b343c1214 Add remainder how debug.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 242
diff changeset
     2
405b343c1214 Add remainder how debug.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 242
diff changeset
     3
# set -x
405b343c1214 Add remainder how debug.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 242
diff changeset
     4
# set -u
11
339675ac5fd3 Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     5
595
e5df58a9559f Set variables for Debian maintenance tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 594
diff changeset
     6
export DEBFULLNAME='Oleksandr Gavenko'
e5df58a9559f Set variables for Debian maintenance tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 594
diff changeset
     7
export DEBEMAIL='gavenkoa@gmail.com'
e5df58a9559f Set variables for Debian maintenance tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 594
diff changeset
     8
11
339675ac5fd3 Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     9
# XXX for mc, cvs, svn, ...
179
ed15e30ff41a Set editor to VIM. Bind edit command for shells.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 176
diff changeset
    10
export EDITOR=vim
11
339675ac5fd3 Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    11
339675ac5fd3 Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    12
# XXX vim and gnome-terminal have support for 256 colours in fedora 8 at least
339675ac5fd3 Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    13
# Note debian/ubuntu users should install the ncurses-term package to support this
339675ac5fd3 Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    14
# export TERM=xterm-256color
339675ac5fd3 Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    15
32
031655c93305 Special case for CYGWIN to properly display russian letters in rxvt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 30
diff changeset
    16
# Special case for CYGWIN to properly display russian letters in rxvt.
34
cddddb009921 Added useful comment.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 32
diff changeset
    17
# Don't forget set in Windows SHELL=/bin/bash. If default SHELL is sh then .bashrc will not be read.
285
60fc251ec270 Bash string comparison does not require hack.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 280
diff changeset
    18
if [[ $OSTYPE = cygwin ]]; then
258
e3c456cab7ba Use only $OSTYPE to detect Cygwin.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 257
diff changeset
    19
  export LANG=ru_RU.CP1251
e3c456cab7ba Use only $OSTYPE to detect Cygwin.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 257
diff changeset
    20
  # Avoid permission problem in Cygwin.
e3c456cab7ba Use only $OSTYPE to detect Cygwin.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 257
diff changeset
    21
  umask 0000
32
031655c93305 Special case for CYGWIN to properly display russian letters in rxvt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 30
diff changeset
    22
fi
126
d342461b401b Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 109
diff changeset
    23
594
521916a26ee2 Fix: forget export variable to environment.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 541
diff changeset
    24
export TIME_STYLE=long-iso
521916a26ee2 Fix: forget export variable to environment.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 541
diff changeset
    25
300
f7c19d2b4263 Move CDPATH place hold to use it from MC after xinit load...
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 299
diff changeset
    26
# Easy cd to often used dirs.
698
39d24046cebf Simplify path to my projects.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 655
diff changeset
    27
export CDPATH=.:~:~/devel:~/devel/my
300
f7c19d2b4263 Move CDPATH place hold to use it from MC after xinit load...
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 299
diff changeset
    28
279
5845d7aa3ca4 Update paths only once.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 268
diff changeset
    29
if [[ ! $PATH =~ $HOME/usr/bin ]]; then
5845d7aa3ca4 Update paths only once.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 268
diff changeset
    30
  export PATH=$PATH:~/usr/bin
5845d7aa3ca4 Update paths only once.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 268
diff changeset
    31
fi
541
550f4a008534 Add /usr/sbin and /sbin to user PATH.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 480
diff changeset
    32
if [[ ! :$PATH =~ :/usr/sbin ]]; then
550f4a008534 Add /usr/sbin and /sbin to user PATH.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 480
diff changeset
    33
  export PATH=/usr/sbin:$PATH
550f4a008534 Add /usr/sbin and /sbin to user PATH.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 480
diff changeset
    34
fi
550f4a008534 Add /usr/sbin and /sbin to user PATH.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 480
diff changeset
    35
if [[ ! :$PATH =~ :/sbin ]]; then
550f4a008534 Add /usr/sbin and /sbin to user PATH.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 480
diff changeset
    36
  export PATH=/sbin:$PATH
299
2771c1f6f3c5 Add '/usr/sbin' to 'PATH' and '$HOME/usr/lib' to 'LD_LIBRARY_PATH'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 285
diff changeset
    37
fi
2771c1f6f3c5 Add '/usr/sbin' to 'PATH' and '$HOME/usr/lib' to 'LD_LIBRARY_PATH'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 285
diff changeset
    38
708
06a040a98984 Detect empty LD_LIBRARY_PATH.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 698
diff changeset
    39
[[ -z $LD_LIBRARY_PATH ]] && LD_LIBRARY_PATH=$HOME/usr/lib
06a040a98984 Detect empty LD_LIBRARY_PATH.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 698
diff changeset
    40
if [[ ! :$LD_LIBRARY_PATH =~ :$HOME/usr/lib ]]; then
299
2771c1f6f3c5 Add '/usr/sbin' to 'PATH' and '$HOME/usr/lib' to 'LD_LIBRARY_PATH'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 285
diff changeset
    41
  export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":$HOME/usr/lib
2771c1f6f3c5 Add '/usr/sbin' to 'PATH' and '$HOME/usr/lib' to 'LD_LIBRARY_PATH'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 285
diff changeset
    42
fi
126
d342461b401b Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 109
diff changeset
    43
708
06a040a98984 Detect empty LD_LIBRARY_PATH.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 698
diff changeset
    44
if [[ -z $MANPATH ]]; then
126
d342461b401b Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 109
diff changeset
    45
  export MANPATH=~/usr/share/man:
279
5845d7aa3ca4 Update paths only once.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 268
diff changeset
    46
elif [[ ! $MANPATH =~ $HOME/usr/share/man: ]]; then
5845d7aa3ca4 Update paths only once.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 268
diff changeset
    47
  export MANPATH=$MANPATH:$HOME/usr/share/man:
126
d342461b401b Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 109
diff changeset
    48
fi
d342461b401b Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 109
diff changeset
    49
708
06a040a98984 Detect empty LD_LIBRARY_PATH.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 698
diff changeset
    50
if [[ -z $INFOPATH ]]; then
126
d342461b401b Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 109
diff changeset
    51
  export INFOPATH=~/usr/share/info:
279
5845d7aa3ca4 Update paths only once.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 268
diff changeset
    52
elif [[ ! $INFOPATH =~ $HOME/usr/share/info: ]]; then
5845d7aa3ca4 Update paths only once.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 268
diff changeset
    53
  export INFOPATH=$INFOPATH:$HOME/usr/share/info:
126
d342461b401b Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 109
diff changeset
    54
fi
d342461b401b Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 109
diff changeset
    55
226
97139da73273 Enable python statement readline completion and readline history for interactive Python .
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 221
diff changeset
    56
export PYTHONSTARTUP=~/.pystartup
97139da73273 Enable python statement readline completion and readline history for interactive Python .
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 221
diff changeset
    57
639
bef22a7d822b Enable daemon mode for gradle.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 595
diff changeset
    58
export GRADLE_OPTS='-Dorg.gradle.daemon=true'
bef22a7d822b Enable daemon mode for gradle.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 595
diff changeset
    59
655
2565437c1410 Set NPM prefix to local user directory.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 654
diff changeset
    60
export PATH=$PATH:/home/user/.npm-packages/bin
2565437c1410 Set NPM prefix to local user directory.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 654
diff changeset
    61