Do not try to set title inside Emacs term emulator.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Fri, 14 Apr 2017 10:16:12 +0300
changeset 849 04cb764675f3
parent 848 748e1e894339
child 855 8a6f8cbd2cce
child 857 1d03fdde0081
Do not try to set title inside Emacs term emulator.
.bashrc
--- a/.bashrc	Tue Apr 04 17:21:08 2017 +0300
+++ b/.bashrc	Fri Apr 14 10:16:12 2017 +0300
@@ -11,12 +11,19 @@
 
 PS1='\n==============================================================================\r$?|\u@\h \w \nbash# '
 PS2='> '
+
 case "$TERM" in
   xterm*|eterm-color|screen|linux)
-    PS1=$'\e]0;bash \w\a\n\e[36m==============================================================================\r$?|\e[31m\u\e[35m@\h\e[0m\e[36m \w \n\[\e[1m\e[31m\]bash#\[\e[0m\] '
+    PS1=$'\n\e[36m==============================================================================\r$?|\e[31m\u\e[35m@\h\e[0m\e[36m \w \n\[\e[1m\e[31m\]bash#\[\e[0m\] '
     PS2=$'\[\e[32m\]> \[\e[0m\]'
   ;;
 esac
+# Set current directory in terminal emulator title.
+case "$TERM" in
+  xterm*|screen|linux)
+    PS1=$'\e]0;bash \w\a'"$PS1"
+  ;;
+esac
 
 if command -v dircolors >/dev/null 2>&1 && [[ -f ~/.dircolors ]]; then
   eval "`dircolors -b ~/.dircolors`"