chiark / gitweb /
bash_profile: Don't call `vt-is-UTF8' on a pty.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 3 May 2009 10:12:58 +0000 (11:12 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 5 May 2009 10:14:46 +0000 (11:14 +0100)
It just hangs.  Call tty(1) and pattern match the result.

bash_profile

index d36c42d18844cfcd9be01de97ddc6c42a2072ce1..08e4e136f11b590fab9dde4ca753d092819e4061 100644 (file)
@@ -116,8 +116,8 @@ if [ "$DISPLAY" != "" ]; then
   LANG=`mdw-conf x-ctype`
 else
   : ${LANG=${LC_CTYPE-${LC_ALL-`mdw-conf console-ctype`}}}
-  case "$TERM" in
-    linux)
+  case "$TERM,`tty`" in
+    linux,/dev/tty*)
       if vt-is-UTF8 >/dev/null 2>&1; then
        ctype=.utf8
       else