mahbinstuff/powerline_init
2017-04-28 12:11:42 +03:00

16 lines
430 B
Text

function powerline_precmd() {
PS1="$(~/sturf/banga-powerline/powerline-shell.py $? --colorize-hostname --cwd-max-depth 3 --cwd-max-dir-size 6 --shell zsh 2> /dev/null)"
}
function install_powerline_precmd() {
for s in "${precmd_functions[@]}"; do
if [ "$s" = "powerline_precmd" ]; then
return
fi
done
precmd_functions+=(powerline_precmd)
}
if [ "$TERM" != "linux" ]; then
install_powerline_precmd
fi