-# Example with the following directory/file structure, $os is Darwin and
-# $hostname is marvin.
-#
-# ~/.zsh
-# ~/.zsh/env
-# ~/.zsh/env.local
-# ~/.zsh/rc
-# ~/.zsh/rc.local
-# ~/.zsh/host/rc.marvin
-# ~/.zsh/os/rc.Darwin
-#
-# To load additional rc files from within ~/.zsh/rc use the following:
-#
-# source_config ~/.zsh os rc $os # loads os/rc.Darwin
-# source_config ~/.zsh host rc $hostname # loads host/rc.marvin
-#
-# To load additional env files from within ~/.zsh/env use the following (note
-# nolocal to prevent loading env.local two times if os and host files don't
-# exist):
-#
-# source_config zsh os env $os nolocal # loads os/rc.Darwin
-# source_config zsh host env $hostname # loads env.local
-#
-# Doesn't fit perfectly in this file, but this is the best place to make it
-# available everywhere.
-function source_config() {
- # Path to the file to source and its local counterpart.
- local source_file=$1/$2/$3.$4
- local source_file_local=$1/$3.local
+# Color bold strings in bold blue.
+LESS_TERMCAP_md="${escape}[01;34m"
+LESS_TERMCAP_me="${escape}[0m"
+export LESS_TERMCAP_md LESS_TERMCAP_me
+# Color underlined strings in bold yellow and underlined.
+LESS_TERMCAP_us="${escape}[01;4;33m"
+LESS_TERMCAP_ue="${escape}[0m"
+export LESS_TERMCAP_us LESS_TERMCAP_ue
+# Color standout mode in bold black with yellow background.
+LESS_TERMCAP_so="${escape}[01;30;43m"
+LESS_TERMCAP_se="${escape}[0m"
+export LESS_TERMCAP_so LESS_TERMCAP_se
+
+# Use ~/.tmp as directory for temporary files if available to reduce security
+# problems on multi-user systems.
+if test -O "$HOME/.tmp" && test -d "$HOME/.tmp"; then
+ TMP=$HOME/.tmp
+ TEMP=$TMP
+ TMPDIR=$TMP
+ export TMP TEMP TMPDIR
+# Also try ~/tmp as fallback.
+elif test -O "$HOME/tmp" && test -d "$HOME/tmp"; then
+ TMP=$HOME/tmp
+ TEMP=$TMP
+ TMPDIR=$TMP
+ export TMP TEMP TMPDIR
+fi
+
+# Change rlwrap's home directory to prevent cluttering ~/.
+RLWRAP_HOME="$HOME/.shell/rlwrap"
+export RLWRAP_HOME