]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - shell/env
b7b1e13a28d7e17b56c02e1693d01d26cacc61b3
[config/dotfiles.git] / shell / env
1 # Configuration file for environment related options for all shells.
2
3
4 source_debug ". ~/.shell/env"
5
6
7 # Use UTF-8 encoding in the terminal. Don't use LC_ALL as it's used for
8 # debugging purposes. Thanks to twb in Freenode/#screen (2009-10-02 10:25).
9 LANG=en_US.UTF-8
10 export LANG
11
12 # Add ~/bin and ~/.bin and ~/.shell/bin to PATH if available.
13 if [ -d ~/.shell/bin ]; then
14     PATH=~/.shell/bin:$PATH
15 fi
16 if [ -d ~/bin ]; then
17     PATH=~/bin:$PATH
18 fi
19 if [ -d ~/.bin ]; then
20     PATH=~/.bin:$PATH
21 fi
22
23 # Use Vim as editor.
24 EDITOR=vim
25 export EDITOR
26
27 # Set less as pager, its configuration is done through the .less file.
28 PAGER=less
29 export PAGER
30
31 # Use ~/.tmp as directory for temporary files if available to reduce security
32 # problems on multi-user systems.
33 if [ -O ~/.tmp -a -d ~/.tmp ]; then
34     TMP=~/.tmp
35     TEMP=$TMP
36     TMPDIR=$TMP
37     export TMP TEMP TMPDIR
38 # Also try ~/tmp as fallback.
39 elif [ -O ~/tmp -a -d ~/tmp ]; then
40     TMP=~/tmp
41     TEMP=$TMP
42     TMPDIR=$TMP
43     export TMP TEMP TMPDIR
44 fi
45
46 # Change rlwrap's home directory to prevent cluttering ~.
47 RLWRAP_HOME=~/.shell/rlwrap
48 export RLWRAP_HOME
49
50 # Set colors for GNU ls (and zsh completions).
51 # See `dircolors --print-database` for possible colors.
52 LS_COLORS='no=00'
53 LS_COLORS=$LS_COLORS':fi=00'       # normal files: normal
54 LS_COLORS=$LS_COLORS':di=34;01'    # directories: blue bold
55 LS_COLORS=$LS_COLORS':ln=36'       # symbolic links: cyan
56 LS_COLORS=$LS_COLORS':pi=00'       # named pipes: normal
57 LS_COLORS=$LS_COLORS':so=00'       # sockets: normal
58 LS_COLORS=$LS_COLORS':bd=00'       # block devices: normal
59 LS_COLORS=$LS_COLORS':cd=00'       # character devices: normal
60 LS_COLORS=$LS_COLORS':or=36;41'    # orphaned links: red background
61 LS_COLORS=$LS_COLORS':su=31;01;43' # setuid files: yellow background
62 LS_COLORS=$LS_COLORS':sg=31;01;43' # setgid files: yellow background
63 LS_COLORS=$LS_COLORS':ow=34;01;41' # directories writable by others: blue background
64 LS_COLORS=$LS_COLORS':ex=31;01'    # executables: bold red
65 export LS_COLORS
66 # Set the same colors for non GNU ls, except for orphaned links which aren't
67 # supported.
68 LSCOLORS='ExgxxxxxBxxxxxBdBdExEb'
69 #         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
70 #         | | | | | | | | | | |
71 #         | | | | | | | | | | *- directory writable to others, without sticky bit
72 #         | | | | | | | | | *--- directory writable to others, with sticky bit
73 #         | | | | | | | | *----- executable with setgid bit set
74 #         | | | | | | | *------- executable with setuid bit set
75 #         | | | | | | *--------- character special
76 #         | | | | | *----------- block special
77 #         | | | | *------------- executable
78 #         | | | *--------------- pipe
79 #         | | *----------------- socket
80 #         | *------------------- symbolic link
81 #         *--------------------- directory
82 export LSCOLORS
83
84
85 source_debug ". ~/.shell/env (done)"
86
87 # vim: ft=sh