From 796773bce04354c221e1e956c465dc662c02caa2 Mon Sep 17 00:00:00 2001 From: Brett Mack Date: Thu, 8 Mar 2018 08:52:46 +0000 Subject: [PATCH] powerline --- .gopowerline.zsh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .gopowerline.zsh 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