1 # Configuration file for environment related options for all shells.
3 # Copyright (C) 2011-2013 Simon Ruderich
5 # This file is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # This file is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this file. If not, see <http://www.gnu.org/licenses/>.
19 source_debug ". ~/.shell/env"
22 # Use UTF-8 encoding in the terminal. Don't use LC_ALL as it's used for
23 # debugging purposes. Thanks to twb in #screen on Freenode (2009-10-02 10:25
28 # Make sure $LANGUAGE is not set. It's a GNU extension which can overwrite
29 # variables like $LANG or $LC_ALL.
32 # Add ~/bin and ~/.bin and ~/.shell/bin to PATH if available.
33 if test -d "$HOME/.shell/bin"; then
34 PATH="$HOME/.shell/bin:$PATH"
36 if test -d "$HOME/bin"; then
37 PATH="$HOME/bin:$PATH"
39 if test -d "$HOME/.bin"; then
40 PATH="$HOME/.bin:$PATH"
47 # Set less as pager, its configuration is done through the ~/.less file.
51 # Use ~/.tmp as directory for temporary files if available to reduce security
52 # problems on multi-user systems.
53 if test -O "$HOME/.tmp" && test -d "$HOME/.tmp"; then
57 export TMP TEMP TMPDIR
58 # Also try ~/tmp as fallback.
59 elif test -O "$HOME/tmp" && test -d "$HOME/tmp"; then
63 export TMP TEMP TMPDIR
66 # Change rlwrap's home directory to prevent cluttering ~/.
67 RLWRAP_HOME="$HOME/.shell/rlwrap"
70 # Set colors for GNU ls (and Zsh completions).
71 if test -f "$HOME/.shell/dircolors"; then
72 . "$HOME/.shell/dircolors"
74 # Set the same colors for non GNU ls, except for special cases which aren't
76 LSCOLORS='ExgxxxxxBxxxxxBdBdExEb'
77 # ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
78 # | | | | | | | | | | |
79 # | | | | | | | | | | *- directory writable to others, without sticky bit
80 # | | | | | | | | | *--- directory writable to others, with sticky bit
81 # | | | | | | | | *----- executable with setgid bit set
82 # | | | | | | | *------- executable with setuid bit set
83 # | | | | | | *--------- character special
84 # | | | | | *----------- block special
85 # | | | | *------------- executable
86 # | | | *--------------- pipe
87 # | | *----------------- socket
88 # | *------------------- symbolic link
89 # *--------------------- directory
93 source_debug ". ~/.shell/env (done)"