magicmonty/bash-git-prompt — pull request #18 by maddingo (2013-08-16 18:18:27+00:00)
Title: fixed problems when pre-set PROMPT_COMMAND has trailing semi-colon

There was a problem on my Mac where the PROMPT_COMMAND is set to 'update_terminal_cwd; ' (with a trailing space and a trailing semi-colon. This triggers a syntax error on the resulting double semi-colon.
The two line remove all trailing spaces and then all trailing semi-colons