From 74f9786745fe991283c3ce540a7a4a082128712b Mon Sep 17 00:00:00 2001 From: Martin Gondermann Date: Fri, 24 Jan 2014 15:56:00 +0000 Subject: [PATCH] Colorized git-prompt-help with configured colors and symbols --- git-prompt-help.sh | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/git-prompt-help.sh b/git-prompt-help.sh index b9c699b..19d9312 100644 --- a/git-prompt-help.sh +++ b/git-prompt-help.sh @@ -3,7 +3,7 @@ # being displayed. git_prompt_help() { - cat <&2 + cat <|] BRANCH is a branch name, such as "master" or "stage", a tag name, or commit @@ -12,44 +12,46 @@ hash prefixed with ':'. TRACKING indicates how the local branch differs from the remote branch. It can be empty, or one of: - ↑N - ahead of remote by N commits - ↓N - behind remote by N commits - ↓M↑N - branches diverged, other by M commits, yours by N commits + ${GIT_PROMPT_BRANCH}${GIT_PROMPT_REMOTE}↑N${ResetColor} - ahead of remote by N commits + ${GIT_PROMPT_BRANCH}${GIT_PROMPT_REMOTE}↓N${ResetColor} - behind remote by N commits + ${GIT_PROMPT_BRANCH}${GIT_PROMPT_REMOTE}↓M↑N${ResetColor} - branches diverged, other by M commits, yours by N commits LOCALSTATUS is one of the following: - ✔ - repository clean - ●N - N staged files - ✖N - N unmerged files - ✚N - N changed but *unstaged* files - …N - N untracked files - ⚑N - N stash entries + ${GIT_PROMPT_CLEAN}${ResetColor} - repository clean + ${GIT_PROMPT_STAGED}N${ResetColor} - N staged files + ${GIT_PROMPT_CONFLICTS}N${ResetColor} - N conflicted files + ${GIT_PROMPT_CHANGED}N${ResetColor} - N changed but *unstaged* files + ${GIT_PROMPT_UNTRACKED}N${ResetColor} - N untracked files + ${GIT_PROMPT_STASHED}N${ResetColor} - N stash entries See "git_prompt_examples" for examples. EOF } + help_git_prompt() { git_prompt_help ; } git_prompt_examples() { - cat <&2 + cat <