diff --git a/.gopowerline.zsh b/.gopowerline.zsh new file mode 100644 index 0000000..8318da3 --- /dev/null +++ b/.gopowerline.zsh @@ -0,0 +1,16 @@ +function powerline_precmd() { + PS1="$(/usr/local/bin/powerline-go -error $? -shell zsh -cwd-max-depth 4 -modules "cwd,perms,git,hg,jobs,root")" +} + +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