Fix for issue #883
This commit is contained in:
@@ -464,11 +464,13 @@ function aws_profile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function safe_append_prompt_command {
|
function safe_append_prompt_command {
|
||||||
if [[ -n $1 ]] ; then
|
local prompt_re="\<${1}\>" # exact match regex
|
||||||
case $PROMPT_COMMAND in
|
|
||||||
*$1*) ;;
|
if [[ ${PROMPT_COMMAND} =~ ${prompt_re} ]]; then
|
||||||
"") PROMPT_COMMAND="$1";;
|
return
|
||||||
*) PROMPT_COMMAND="$1;$PROMPT_COMMAND";;
|
elif [[ -z ${PROMPT_COMMAND} ]]; then
|
||||||
esac
|
PROMPT_COMMAND="${1}"
|
||||||
|
else
|
||||||
|
PROMPT_COMMAND="${1};${PROMPT_COMMAND}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user