From c6cfb2102f415cedc4910f0dddedad9516e3580a Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Fri, 7 Mar 2008 00:28:46 +0100 Subject: =?utf-8?q?-=20pas=20de=20branche=20GIT=20dans=20les=20dossiers=20non=20g=C3=A9r=C3=A9s=20!! =20-=20d=C3=A9claration=20de=20DATE=3D=20pour=20le=20prompt=20dans=20le=20bon=20bloc..?= MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.5.4.1" This is a multi-part message in MIME format. --------------1.5.4.1 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit --- 01_Functions.zsh | 2 ++ 11_Prompts.zsh | 3 +-- 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} -- cgit v1.2.3