]> git.phdru.name Git - dotfiles.git/blobdiff - bin/xtitle
.shellrc: Check if file `bash_completion` exists
[dotfiles.git] / bin / xtitle
index 6df8cdc282266507ad66b887b28e82fbdc0dbcaa..f734659d5a4a9ea7d7f7f5e03b7adeeb4cb7068c 100755 (executable)
@@ -1,4 +1,4 @@
-#! /usr/bin/env bash
+#! /bin/sh
 
 case "$TERM" in
    *rxvt*|screen*|*term*|vt100)
@@ -7,12 +7,11 @@ case "$TERM" in
       else
          TITLE="$@"
       fi
-      echo -ne "\033]0;${TITLE}\007" # Set xterm caption
-   ;;
-esac
-
-case "$TERM" in
-   screen*)
-      echo -ne "\033k${TITLE}\033\\" # Set screen caption
+      echo -n "\033]0;${TITLE}\007" # Set xterm title
+      case "$TERM" in
+         screen*)
+            echo -n "\033k${TITLE}\033\\" # Set screen/tmux caption
+         ;;
+      esac
    ;;
 esac