]> git.wh0rd.org - home.git/blobdiff - .profile.d/utf8.sh
profile.d: set utf-8 terminal mode by default
[home.git] / .profile.d / utf8.sh
diff --git a/.profile.d/utf8.sh b/.profile.d/utf8.sh
new file mode 100644 (file)
index 0000000..7345c68
--- /dev/null
@@ -0,0 +1,11 @@
+if [ "${TERM}" != "dumb" ]; then
+       # First use the temp transition.  Not all terminals support the next mode.
+       printf '\e%%G'
+       # Then use the perm transition and hope it works.
+       printf '\e%%/I'
+       # Wipe out things in case the terminal doesn't either escape sequence.
+       printf '\r     \r'
+
+       # Tell ncurses to not be dumb.
+       export NCURSES_NO_UTF8_ACS=1
+fi