2016-12-09 19:08:15 +02:00
|
|
|
function powerline_precmd() {
|
2017-05-10 17:51:30 +03:00
|
|
|
PS1="$(~/bin/powerline-shell/powerline-shell.py $? --colorize-hostname --cwd-max-depth 3 --cwd-max-dir-size 6 --shell zsh 2> /dev/null)"
|
2016-12-09 19:08:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
2016-12-09 21:22:01 +02:00
|
|
|
fi
|