summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--01_Functions.zsh2
-rw-r--r--11_Prompts.zsh3
2 files changed, 3 insertions, 2 deletions
diff --git a/01_Functions.zsh b/01_Functions.zsh
index b2a9e2d..82bde17 100644
--- a/01_Functions.zsh
+++ b/01_Functions.zsh
@@ -47,6 +47,8 @@ get_git_branch ()
{
local my_git_branch
+ [ "$(git-ls-files . | head -n 1)" == "" ] && return
+
# Get current working GIT branch
my_git_branch="$(git-branch 2>&- | grep -E '^\* ' | cut -c3-)"
diff --git a/11_Prompts.zsh b/11_Prompts.zsh
index 9ce6c85..8817cc0 100644
--- a/11_Prompts.zsh
+++ b/11_Prompts.zsh
@@ -108,12 +108,11 @@ old_precmd()
ERRORSIZE=${#error}
ERROR="%(?;;"$C_$COLOR_BAR$_C"-"$C_$COLOR_ERRR$_C"%?)"
- DATE=$C_$COLOR_BRACES$_C"[ "$C_$COLOR_DATE$_C"%D{%a-%d-%b-%Y %H:%M:%S}"$C_$COLOR_BRACES$_C" ]"$C_$COLOR_BAR$_C"-"
# Flush the term title
-
term_title
# Date
+ DATE=$C_$COLOR_BRACES$_C"[ "$C_$COLOR_DATE$_C"%D{%a-%d-%b-%Y %H:%M:%S}"$C_$COLOR_BRACES$_C" ]"$C_$COLOR_BAR$_C"-"
DATEEXPAND=$(expand_text "$DATE")
DATESIZE=${#DATEEXPAND}