From 88430f3835e473c14bb70f452fc26960c5da9dfe Mon Sep 17 00:00:00 2001 From: xylous Date: Wed, 19 May 2021 18:23:27 +0300 Subject: [PATCH] Remove trailing whitespace from GIT_STATUS variable --- gitstatus.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gitstatus.plugin.zsh b/gitstatus.plugin.zsh index d83a49c..62acd0e 100644 --- a/gitstatus.plugin.zsh +++ b/gitstatus.plugin.zsh @@ -82,6 +82,9 @@ function parse_git_status() { GIT_STATUS+="${GIT_MODIFIED}${GIT_STAGED}" GIT_STATUS+="${GIT_DELETED}${GIT_UNTRACKED}" GIT_STATUS+="${FG_CLR}" + + # Remove trailing whitespace + GIT_STATUS="$(sed 's/[ ]+$//' <<<"$GIT_STATUS")" } ###