]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - shell/env
Simplify configuration setup.
[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 to PATH if available.
13 if [ -d ~/bin ]; then
14     PATH=~/bin:$PATH
15 fi
16 if [ -d ~/.bin ]; then
17     PATH=~/.bin:$PATH
18 fi
19
20 # Use Vim as editor.
21 EDITOR=vim
22 export EDITOR
23
24 # Set less as pager, its configuration is done through the .less file.
25 PAGER=less
26 export PAGER
27
28 # Use ~/tmp as directory for temporary files if available to reduce security
29 # problems on multi-user systems.
30 if [ -O ~/tmp -a -d ~/tmp ]; then
31     TMP=~/tmp
32     TEMP=$TMP
33     TMPDIR=$TMP
34     export TMP TEMP TMPDIR
35 fi
36
37 # Set colors for GNU ls (and zsh completions).
38 # See `dircolors --print-database` for possible colors.
39 LS_COLORS='no=00'
40 LS_COLORS=$LS_COLORS':fi=00'       # normal files: normal
41 LS_COLORS=$LS_COLORS':di=34;01'    # directories: blue bold
42 LS_COLORS=$LS_COLORS':ln=36'       # symbolic links: cyan
43 LS_COLORS=$LS_COLORS':pi=00'       # named pipes: normal
44 LS_COLORS=$LS_COLORS':so=00'       # sockets: normal
45 LS_COLORS=$LS_COLORS':bd=00'       # block devices: normal
46 LS_COLORS=$LS_COLORS':cd=00'       # character devices: normal
47 LS_COLORS=$LS_COLORS':or=36;41'    # orphaned links: red background
48 LS_COLORS=$LS_COLORS':su=31;01;43' # setuid files: yellow background
49 LS_COLORS=$LS_COLORS':sg=31;01;43' # setgid files: yellow background
50 LS_COLORS=$LS_COLORS':ow=34;01;41' # directories writable by others: blue background
51 LS_COLORS=$LS_COLORS':ex=31;01'    # executables: bold red
52 export LS_COLORS
53 # Set the same colors for non GNU ls, except for orphaned links which aren't
54 # supported.
55 LSCOLORS='ExgxxxxxBxxxxxBdBdExEb'
56 #         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
57 #         | | | | | | | | | | |
58 #         | | | | | | | | | | *- directory writable to others, without sticky bit
59 #         | | | | | | | | | *--- directory writable to others, with sticky bit
60 #         | | | | | | | | *----- executable with setgid bit set
61 #         | | | | | | | *------- executable with setuid bit set
62 #         | | | | | | *--------- character special
63 #         | | | | | *----------- block special
64 #         | | | | *------------- executable
65 #         | | | *--------------- pipe
66 #         | | *----------------- socket
67 #         | *------------------- symbolic link
68 #         *--------------------- directory
69 export LSCOLORS
70
71
72 source_debug ". ~/.shell/env (done)"
73
74 # vim: ft=sh