]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - shell/env
shell/aliases: Correctly use "$@" instead of $* for arguments.
[config/dotfiles.git] / shell / env
index 15d8f4590aba5fa1fab570528f318d09ebde9f7e..b7b1e13a28d7e17b56c02e1693d01d26cacc61b3 100644 (file)
--- a/shell/env
+++ b/shell/env
@@ -10,15 +10,15 @@ LANG=en_US.UTF-8
 export LANG
 
 # Add ~/bin and ~/.bin and ~/.shell/bin to PATH if available.
+if [ -d ~/.shell/bin ]; then
+    PATH=~/.shell/bin:$PATH
+fi
 if [ -d ~/bin ]; then
     PATH=~/bin:$PATH
 fi
 if [ -d ~/.bin ]; then
     PATH=~/.bin:$PATH
 fi
-if [ -d ~/.shell/bin ]; then
-    PATH=~/.shell/bin:$PATH
-fi
 
 # Use Vim as editor.
 EDITOR=vim
@@ -28,15 +28,25 @@ export EDITOR
 PAGER=less
 export PAGER
 
-# Use ~/tmp as directory for temporary files if available to reduce security
+# Use ~/.tmp as directory for temporary files if available to reduce security
 # problems on multi-user systems.
-if [ -O ~/tmp -a -d ~/tmp ]; then
+if [ -O ~/.tmp -a -d ~/.tmp ]; then
+    TMP=~/.tmp
+    TEMP=$TMP
+    TMPDIR=$TMP
+    export TMP TEMP TMPDIR
+# Also try ~/tmp as fallback.
+elif [ -O ~/tmp -a -d ~/tmp ]; then
     TMP=~/tmp
     TEMP=$TMP
     TMPDIR=$TMP
     export TMP TEMP TMPDIR
 fi
 
+# Change rlwrap's home directory to prevent cluttering ~.
+RLWRAP_HOME=~/.shell/rlwrap
+export RLWRAP_HOME
+
 # Set colors for GNU ls (and zsh completions).
 # See `dircolors --print-database` for possible colors.
 LS_COLORS='no=00'