Fixes issue with PROMPT_COMMAND ending in semi-colon

pull/773/head
Sam Gunaratne 2016-08-03 10:04:24 +01:00
parent e64cc5b6f1
commit 1a4c03b08c
1 changed files with 2 additions and 1 deletions

View File

@ -408,6 +408,7 @@ function safe_append_prompt_command {
if [[ -n $1 ]] ; then if [[ -n $1 ]] ; then
case $PROMPT_COMMAND in case $PROMPT_COMMAND in
*$1*) ;; *$1*) ;;
"") PROMPT_COMMAND="$1";;
*) PROMPT_COMMAND="$1;$PROMPT_COMMAND";; *) PROMPT_COMMAND="$1;$PROMPT_COMMAND";;
esac esac
fi fi