# vim:set ft=zsh

whed() {
	$EDITOR "$(which "$1")"
}

venv_prompt() {
  [[ -n ${VIRTUAL_ENV} ]] || return
  echo -e "%F{yellow}%f ${VIRTUAL_ENV:t:gs/%/%%}"
}

function write_title_cmd() {
    if [ ${1[(w)1]} != "lfwrap" ]; then
        echo -ne "\033]0;$(print -P "%n@%m [%3~] » ${1[(w)1]}")\007"
    fi
}

function write_title_wd() { echo -ne "\033]0;$(print -P "%n@%m [%3~]")\007" }

# reset_beam() { echo -ne '\e[5 q' } # Use beam shape cursor for each new prompt.