chiark / gitweb /
set -e to make it easier to kill this
[bin.git] / xterm-title
old mode 100644 (file)
new mode 100755 (executable)
index 7a6a536..bec2c03
@@ -1,2 +1,6 @@
 #! /bin/sh
-echo -en '\e]2;'"$*"'\e\\'
+case $TERM in
+    xterm|screen*)
+       printf '\033]0;'"$*"'\a'
+       ;;
+esac