X-Git-Url: http://git.iain.cx/?p=profile.git;a=blobdiff_plain;f=.bash_profile;h=6c93ffe524ac50a885edece07537155c1fe22723;hp=e905a8665a1222b89b75ea4e31e5398a187c0e05;hb=fbb8103d9b90c369b770286ea49b99ecb7352d36;hpb=2da9ea6da645cdb26ca23d12f7f52c60351f3a4c diff --git a/.bash_profile b/.bash_profile index e905a86..6c93ffe 100644 --- a/.bash_profile +++ b/.bash_profile @@ -1,7 +1,24 @@ -#echo "$(date +'%F %T'): pid: $$; ppid: $PPID; tty: $(tty); .bash_profile" >> ~/.nx/spam -if $(tty -s) || [ "${0:0:1}" = "-" ]; then - for i in ~/.profile.d/*.bashrc; do . $i; done; unset i +if $(tty -s) || [ "${0:0:1}" = "-" -o "$1" = "force" ]; then + # Remember if nocaseglob was on. + shopt -q nocaseglob + nocg=$? + # Turn it off so we source stuff in the right order. + shopt -u nocaseglob + + # Remember LC_ALL. + lc_all=$LC_ALL + # Turn it off to set case-sensitive matching + LC_ALL=C + + # Source all scripts. + for i in ~/.profile.d/*.bashrc; do . "$i"; done; unset i + + # Maybe turn nocaseglob back on. + [ $nocg = 0 ] && shopt -s nocaseglob + + # Reset LC_ALL. + LC_ALL=$lc_all + + unset lc_all nocg __ps1 fi -#export IP01=.bash_profile -#export IP01BASH_PROFILE=.bash_profile