Commit 882f4caa authored by Dom Sekotill's avatar Dom Sekotill
Browse files

zsh-plugin: added prefix to virtual env name in term title

parent 0b1567c4
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
if typeset -f workon_cwd &>/dev/null; then
	function workon_title {
		local prefix="${ENV_TITLE_PREFIX-[VirtualEnv] }"
		if [[ "$ENV_NAME" != "" ]] && [[ "$VIRTUAL_ENV" != "" ]]; then
			if [[ "$TMUX" != "" ]]; then
				printf '\033k%s\033' "$ENV_NAME"
				printf '\033k%s%s\033' "$prefix" "$ENV_NAME"
			else
				printf '\033]0;%s\007' "$ENV_NAME"
				printf '\033]0;%s%s\007' "$prefix" "$ENV_NAME"
			fi
		fi
	}