From f9ae1eb72e472077a8f0f7e5439d308513df0757 Mon Sep 17 00:00:00 2001 From: Martin Luder Date: Tue, 1 Nov 2011 14:45:10 +0100 Subject: [PATCH] Remove whitespace --- themes/maser.zsh-theme | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/themes/maser.zsh-theme b/themes/maser.zsh-theme index 628b68711..c7a087663 100644 --- a/themes/maser.zsh-theme +++ b/themes/maser.zsh-theme @@ -4,12 +4,12 @@ function collapse_pwd { local pwd_truncation_length=20 local dir=$(pwd) - + if $(echo $dir | grep "^$HOME" >>/dev/null) then dir="~$(echo $dir | awk -F$HOME '{print $2}')" fi - + if [ $(echo -n $dir | wc -c | tr -d " ") -gt $pwd_truncation_length ] then dir="…${dir[-$pwd_truncation_length,-1]}" @@ -29,7 +29,7 @@ function git_remote_information { local n_commits="$(egrep -o "by [0-9]+ commit" <<< $git_status | awk '{ print $2 }')" remote_information=" ahead($n_commits)" fi - + if grep -q "have diverged" <<< $git_status ; then local n_commits="$(egrep -o "have [0-9]+ and [0-9]+ different commit" <<< $git_status | awk '{ print $2,$4 }')" remote_information=" diverged($n_commits)" @@ -62,4 +62,3 @@ ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭" PROMPT="${pwd} ➤ " RPROMPT="${return_code} ${git_information}" -