X-Git-Url: http://git.iain.cx/?p=profile.git;a=blobdiff_plain;f=.bash_profile;h=d0db134f18d97ef5c0aa351609f1767f1fb330cb;hp=58f8c11feb6d225823e0f88a3440683bb7a70054;hb=e04927534891bc179e49d461e1cedd99f201cd1f;hpb=ca64aa2532e685c218f01e97f72cb9478f489bba diff --git a/.bash_profile b/.bash_profile index 58f8c11..d0db134 100644 --- a/.bash_profile +++ b/.bash_profile @@ -1,5 +1,25 @@ # $Id$ if $(tty -s) || [ "${0:0:1}" = "-" ]; 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