Commit cb3d87e9 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Set terminal title to hostname in iterm

parent c41eaf84
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -116,9 +116,13 @@ linux)
	# Set title
	# (not suported by linux VT)
	hostname=`hostname -f 2>/dev/null || hostname`
	SET_TITLE=`printf '\e]2;%s\007' "$hostname"`
	case $LC_TERMINAL in
		iTerm2) code=1 ;;
		*) code=2 ;;
	esac
	SET_TITLE=`printf '\e]%i;%s\007' $code "$hostname"`
	PROMPTCODES="$SET_TITLE"
	echo "$SET_TITLE"
	unset hostname
	unset hostname code
	;;
esac