From eea0ffcdc071fe0268f32409bfefae137894c872 Mon Sep 17 00:00:00 2001 From: Dustin Swan Date: Fri, 8 Mar 2013 14:55:59 -0700 Subject: [PATCH] Adding powerline-shell for zsh --- powerline-shell | 1 + zshrc | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 160000 powerline-shell diff --git a/powerline-shell b/powerline-shell new file mode 160000 index 0000000..5db13df --- /dev/null +++ b/powerline-shell @@ -0,0 +1 @@ +Subproject commit 5db13df59db7074da94b99b56379068e2e81463b diff --git a/zshrc b/zshrc index 5c3f32f..e734872 100644 --- a/zshrc +++ b/zshrc @@ -1,4 +1,18 @@ -PROMPT="%~> " +# powerline-shell +function powerline_precmd() { + export PS1="$(~/dotfiles/powerline-shell/powerline-shell.py $? --shell zsh)" +} + +function install_powerline_precmd() { + for s in "${precmd_functions[@]}"; do + if [ "$s" = "powerline_precmd" ]; then + return + fi + done + precmd_functions+=(powerline_precmd) +} + +install_powerline_precmd alias vi=vim alias tmux="tmux -2"