From 0c92b97f24fccaad6018bb03dc22232ddc09394b Mon Sep 17 00:00:00 2001 From: guneysus Date: Sat, 24 Jan 2015 14:21:59 +0200 Subject: [PATCH] Collapse/Uncollapse git_prompt/working dir functions added --- themes/powerline_fancy.zsh-theme | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/themes/powerline_fancy.zsh-theme b/themes/powerline_fancy.zsh-theme index 9b0a55133..b2ae69e50 100644 --- a/themes/powerline_fancy.zsh-theme +++ b/themes/powerline_fancy.zsh-theme @@ -159,3 +159,27 @@ fi POWERLINE_GIT_INFO_RIGHT='$(git_prompt_short_sha)' RPROMPT="%F{green}$POWERLINE_GIT_INFO_RIGHT" + +update_prompt(){ + PROMPT="$POWERLINE_SEC1_BG$POWERLINE_SEC1_TXT$POWERLINE_USER_NAME %k%f$POWERLINE_SEC1_FG%K{blue}"$''"%k%f%F{white}%K{blue} "$POWERLINE_CURRENT_PATH"%F{blue}"$POWERLINE_GIT_INFO_LEFT" %k"$''"%f " + +} +collapse_git () { + POWERLINE_GIT_INFO_LEFT=" %F{blue}%K{white}"$''"%F{white}%F{black}%K{white}"$'%F{white}' + update_prompt +} + +collapse_wd () { + POWERLINE_CURRENT_PATH='%1d' + update_prompt +} + +uncollapse_git () { + POWERLINE_GIT_INFO_LEFT=" %F{blue}%K{white}"$''"%F{white}%F{black}%K{white}"$'$(git_prompt_info)$(git_prompt_status)%F{white}' + update_prompt +} + +uncollapse_wd () { + POWERLINE_CURRENT_PATH='$(_wd)' + update_prompt +}