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