dotfiles/zsh/func/init_rc_configure_prompt

27 lines
540 B
Text
Raw Normal View History

2021-12-31 11:54:55 -08:00
#!/usr/bin/env zsh
# Eryn Wells <eryn@erynwells.me>
local theme=$1
if [[ -z "$1" ]]; then
theme=loquacious
fi
2021-12-31 11:54:55 -08:00
autoload -U add-zsh-hook
autoload -Uz vcs_info
2021-12-31 11:54:55 -08:00
zstyle ':vcs_info:*' disable p4 bzr cdv darcs mtn svk tla cvs svn
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:git:general:*' formats '%b'
2021-12-31 11:54:55 -08:00
# Export the current Git branch before every prompt.
function export_gitbranch {
vcs_info general
export gitbranch=${vcs_info_msg_0_}
2021-12-31 11:54:55 -08:00
}
add-zsh-hook precmd export_gitbranch
autoload -U promptinit
promptinit
prompt $theme