X-Git-Url: http://git.iain.cx/?p=profile.git;a=blobdiff_plain;f=.bash_profile;h=b8e11d4ec7146117735841abf67473f88186c7bb;hp=e061e9c95a2110a0095b66597ca5ae113d3b70ff;hb=5010bd4c510f58dbc1e85e4a230c44304964c42b;hpb=8c8c1365e53b2d7db0d0d5f8539bf260d040d46f diff --git a/.bash_profile b/.bash_profile index e061e9c..b8e11d4 100644 --- a/.bash_profile +++ b/.bash_profile @@ -1,15 +1,24 @@ -# $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 - # And set case-sensitive matching - LC_CTYPE=en_GB; LANG= - for i in ~/.profile.d/*.bashrc; do . $i; done; unset i - # Maybe turn it back on. + + # 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 - unset nocg + + # Reset LC_ALL. + LC_ALL=$lc_all + + unset lc_all nocg __ps1 fi