.env
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sat, 28 Jan 2017 01:45:34 +0200
changeset 821 7bfa94a26cde
parent 800 3af8147163dc
child 891 0b73115730eb
permissions -rw-r--r--
Swap modifiers to previous assignment because I don't want to fix them in ~/.fvwm. Assign keycode to Caps_Lock before aliasing to LCtrl so ~/.xmodmaprc script can be re-evaluated without errors.
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, ...
776
6b37ae369769 Use terminal emacsclient as EDITOR.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 766
diff changeset
    10
export EDITOR=et
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
285
60fc251ec270 Bash string comparison does not require hack.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 280
diff changeset
    16
if [[ $OSTYPE = cygwin ]]; then
258
e3c456cab7ba Use only $OSTYPE to detect Cygwin.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 257
diff changeset
    17
  # Avoid permission problem in Cygwin.
e3c456cab7ba Use only $OSTYPE to detect Cygwin.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 257
diff changeset
    18
  umask 0000
32
031655c93305 Special case for CYGWIN to properly display russian letters in rxvt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 30
diff changeset
    19
fi
126
d342461b401b Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 109
diff changeset
    20
594
521916a26ee2 Fix: forget export variable to environment.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 541
diff changeset
    21
export TIME_STYLE=long-iso
521916a26ee2 Fix: forget export variable to environment.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 541
diff changeset
    22
300
f7c19d2b4263 Move CDPATH place hold to use it from MC after xinit load...
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 299
diff changeset
    23
# Easy cd to often used dirs.
789
2607b8c7638d New path to my projects base directory. Now it shorter!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 787
diff changeset
    24
export CDPATH=.:$HOME:$HOME/devel:$HOME/my
300
f7c19d2b4263 Move CDPATH place hold to use it from MC after xinit load...
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 299
diff changeset
    25
797
6cf66a062f3b ~/usr/bin can't be placed before /bin in PATH because cygrun is recursively
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 796
diff changeset
    26
if [[ ! :$PATH: =~ :$HOME/usr/xbin: ]]; then
6cf66a062f3b ~/usr/bin can't be placed before /bin in PATH because cygrun is recursively
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 796
diff changeset
    27
  # To override /bin and /usr/bin.
6cf66a062f3b ~/usr/bin can't be placed before /bin in PATH because cygrun is recursively
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 796
diff changeset
    28
  export PATH=$HOME/usr/xbin:$PATH
6cf66a062f3b ~/usr/bin can't be placed before /bin in PATH because cygrun is recursively
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 796
diff changeset
    29
fi
787
98c7afe91a58 Make more stricter pattern checking to avoid double PATH extending
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 786
diff changeset
    30
if [[ ! :$PATH: =~ :$HOME/usr/bin: ]]; then
797
6cf66a062f3b ~/usr/bin can't be placed before /bin in PATH because cygrun is recursively
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 796
diff changeset
    31
  export PATH=$PATH:$HOME/usr/bin
279
5845d7aa3ca4 Update paths only once.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 268
diff changeset
    32
fi
787
98c7afe91a58 Make more stricter pattern checking to avoid double PATH extending
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 786
diff changeset
    33
if [[ ! :$PATH: =~ :/usr/sbin: ]]; then
541
550f4a008534 Add /usr/sbin and /sbin to user PATH.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 480
diff changeset
    34
  export PATH=/usr/sbin:$PATH
550f4a008534 Add /usr/sbin and /sbin to user PATH.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 480
diff changeset
    35
fi
787
98c7afe91a58 Make more stricter pattern checking to avoid double PATH extending
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 786
diff changeset
    36
if [[ ! :$PATH: =~ :/sbin: ]]; then
541
550f4a008534 Add /usr/sbin and /sbin to user PATH.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 480
diff changeset
    37
  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
    38
fi
787
98c7afe91a58 Make more stricter pattern checking to avoid double PATH extending
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 786
diff changeset
    39
if [[ ! :$PATH: =~ :$HOME/.local/bin: ]]; then
786
2a3e6cf308f2 "~" expanded only on word start. Use "$HOME" instead of ~ for this
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 785
diff changeset
    40
  export PATH=$PATH:$HOME/.local/bin
766
354c4af78183 ~/.local/bin used by "pip install --user".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 750
diff changeset
    41
fi
800
3af8147163dc Enable OpenCSW packages on Solaris.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 798
diff changeset
    42
if [[ $OSTYPE = solaris*  &&  ! :$PATH: =~ :/opt/csw/bin: ]]; then
3af8147163dc Enable OpenCSW packages on Solaris.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 798
diff changeset
    43
  export PATH=$PATH:/opt/csw/bin
3af8147163dc Enable OpenCSW packages on Solaris.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 798
diff changeset
    44
fi
766
354c4af78183 ~/.local/bin used by "pip install --user".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 750
diff changeset
    45
299
2771c1f6f3c5 Add '/usr/sbin' to 'PATH' and '$HOME/usr/lib' to 'LD_LIBRARY_PATH'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 285
diff changeset
    46
708
06a040a98984 Detect empty LD_LIBRARY_PATH.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 698
diff changeset
    47
[[ -z $LD_LIBRARY_PATH ]] && LD_LIBRARY_PATH=$HOME/usr/lib
787
98c7afe91a58 Make more stricter pattern checking to avoid double PATH extending
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 786
diff changeset
    48
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
    49
  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
    50
fi
126
d342461b401b Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 109
diff changeset
    51
798
a976c73e4873 Do not set MANPATH on NetBSD, because there is non-GNU man and it does not
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 797
diff changeset
    52
case $OSTYPE in
a976c73e4873 Do not set MANPATH on NetBSD, because there is non-GNU man and it does not
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 797
diff changeset
    53
  netbsd*) ;;                               # Do nothing, because NetBSD uses non-GNU man.
a976c73e4873 Do not set MANPATH on NetBSD, because there is non-GNU man and it does not
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 797
diff changeset
    54
  *)
a976c73e4873 Do not set MANPATH on NetBSD, because there is non-GNU man and it does not
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 797
diff changeset
    55
    if [[ -z $MANPATH ]]; then
a976c73e4873 Do not set MANPATH on NetBSD, because there is non-GNU man and it does not
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 797
diff changeset
    56
        export MANPATH=$HOME/usr/share/man:
a976c73e4873 Do not set MANPATH on NetBSD, because there is non-GNU man and it does not
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 797
diff changeset
    57
    elif [[ ! $MANPATH =~ $HOME/usr/share/man: ]]; then
a976c73e4873 Do not set MANPATH on NetBSD, because there is non-GNU man and it does not
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 797
diff changeset
    58
        export MANPATH=$MANPATH:$HOME/usr/share/man:
a976c73e4873 Do not set MANPATH on NetBSD, because there is non-GNU man and it does not
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 797
diff changeset
    59
    fi
a976c73e4873 Do not set MANPATH on NetBSD, because there is non-GNU man and it does not
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 797
diff changeset
    60
    ;;
a976c73e4873 Do not set MANPATH on NetBSD, because there is non-GNU man and it does not
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 797
diff changeset
    61
esac
126
d342461b401b Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 109
diff changeset
    62
708
06a040a98984 Detect empty LD_LIBRARY_PATH.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 698
diff changeset
    63
if [[ -z $INFOPATH ]]; then
786
2a3e6cf308f2 "~" expanded only on word start. Use "$HOME" instead of ~ for this
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 785
diff changeset
    64
  export INFOPATH=$HOME/usr/share/info:
279
5845d7aa3ca4 Update paths only once.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 268
diff changeset
    65
elif [[ ! $INFOPATH =~ $HOME/usr/share/info: ]]; then
5845d7aa3ca4 Update paths only once.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 268
diff changeset
    66
  export INFOPATH=$INFOPATH:$HOME/usr/share/info:
126
d342461b401b Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 109
diff changeset
    67
fi
d342461b401b Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 109
diff changeset
    68
786
2a3e6cf308f2 "~" expanded only on word start. Use "$HOME" instead of ~ for this
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 785
diff changeset
    69
export PYTHONSTARTUP=$HOME/.pystartup
226
97139da73273 Enable python statement readline completion and readline history for interactive Python .
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 221
diff changeset
    70
639
bef22a7d822b Enable daemon mode for gradle.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 595
diff changeset
    71
export GRADLE_OPTS='-Dorg.gradle.daemon=true'
bef22a7d822b Enable daemon mode for gradle.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 595
diff changeset
    72
787
98c7afe91a58 Make more stricter pattern checking to avoid double PATH extending
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 786
diff changeset
    73
if [[ ! :$PATH: =~ :$HOME/.npm-packages/bin: ]]; then
786
2a3e6cf308f2 "~" expanded only on word start. Use "$HOME" instead of ~ for this
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 785
diff changeset
    74
  export PATH=$PATH:$HOME/.npm-packages/bin
785
ec32614ca2bc Remove fixed path.~
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 776
diff changeset
    75
fi
655
2565437c1410 Set NPM prefix to local user directory.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 654
diff changeset
    76