Use a different escape sequence for magenta.
[profile.git] / .bash_profile
index e061e9c..d0db134 100644 (file)
@@ -5,11 +5,21 @@ if $(tty -s) || [ "${0:0:1}" = "-" ]; then
   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=
+
+  # 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 it back on.
+
+  # 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