Skip to content

Commit

Permalink
Readied overwritten function for displaying the last command indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
magicmonty committed Aug 28, 2014
1 parent 926c441 commit 839de03
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gitprompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 839de03

Please sign in to comment.