From 839de0333fb6d8ae80ea6197872872da74b30782 Mon Sep 17 00:00:00 2001 From: Martin Gondermann Date: Thu, 28 Aug 2014 19:44:46 +0200 Subject: [PATCH] Readied overwritten function for displaying the last command indicator --- gitprompt.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gitprompt.sh b/gitprompt.sh index 1dab935e..50863d07 100755 --- a/gitprompt.sh +++ b/gitprompt.sh @@ -93,6 +93,14 @@ function git_prompt_config() fi fi + if [ "x${GIT_PROMPT_SHOW_LAST_COMMAND_INDICATOR}" == "x1" ]; then + if [ $LAST_COMMAND_STATE = 0 ]; then + LAST_COMMAND_INDICATOR="${GIT_PROMPT_COMMAND_OK}"; + else + LAST_COMMAND_INDICATOR="${GIT_PROMPT_COMMAND_FAIL}"; + fi + fi + # Do this only once to define PROMPT_START and PROMPT_END if [[ -z "$PROMPT_START" || -z "$PROMPT_END" ]]; then