1
0
Fork 0
dotfiles/.config/zsh/configs/functions

21 lines
473 B
Bash

# 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.