From: Mark Wooding Date: Sun, 3 May 2009 10:12:58 +0000 (+0100) Subject: bash_profile: Don't call `vt-is-UTF8' on a pty. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/c537b3bfacb5ca65cc6c3c2b7919c1b3190bb3a0?ds=sidebyside bash_profile: Don't call `vt-is-UTF8' on a pty. It just hangs. Call tty(1) and pattern match the result. --- diff --git a/bash_profile b/bash_profile index d36c42d..08e4e13 100644 --- a/bash_profile +++ b/bash_profile @@ -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