X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=shell%2Fenv;h=45b98bcfcf6cd2a666a14c8de347d0faf8f8fd78;hb=b538cc0a5d055ec8884377dab6d7566c687af93b;hp=c1a950e70a465c188558f552f81306851a15fdda;hpb=d1777f8edd13a781c96010fc86b52a96f2080994;p=config%2Fdotfiles.git diff --git a/shell/env b/shell/env index c1a950e..45b98bc 100644 --- a/shell/env +++ b/shell/env @@ -1,5 +1,20 @@ # Configuration file for environment related options for all shells. +# Copyright (C) 2011-2012 Simon Ruderich +# +# This file is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this file. If not, see . + source_debug ". ~/.shell/env" @@ -10,14 +25,14 @@ 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 +if test -d "$HOME/.shell/bin"; then + PATH="$HOME/.shell/bin:$PATH" fi -if [ -d ~/bin ]; then - PATH=~/bin:$PATH +if test -d "$HOME/bin"; then + PATH="$HOME/bin:$PATH" fi -if [ -d ~/.bin ]; then - PATH=~/.bin:$PATH +if test -d "$HOME/.bin"; then + PATH="$HOME/.bin:$PATH" fi # Use Vim as editor. @@ -30,19 +45,23 @@ export PAGER # Use ~/.tmp as directory for temporary files if available to reduce security # problems on multi-user systems. -if [ -O ~/.tmp -a -d ~/.tmp ]; then - TMP=~/.tmp +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 [ -O ~/tmp -a -d ~/tmp ]; then - TMP=~/tmp +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 + # Set colors for GNU ls (and zsh completions). # See `dircolors --print-database` for possible colors. LS_COLORS='no=00'