diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh
index 7cf15b0a0ee2d09775ee03aa7d419cd81961364e..871ab28dfa82f8c63d43538c64c18409b393c78b 100644
--- a/lib/termsupport.zsh
+++ b/lib/termsupport.zsh
@@ -28,6 +28,14 @@ function title {
       if [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
         print -Pn "\e]2;$2:q\a" # set window name
         print -Pn "\e]1;$1:q\a" # set tab name
+      else
+        # Try to use terminfo to set the title
+        # If the feature is available set title
+        if [[ -n "$terminfo[fsl]" ]] && [[ -n "$terminfo[tsl]" ]]; then
+	  echoti tsl
+	  print -Pn "$1"
+	  echoti fsl
+	fi
       fi
       ;;
   esac