Skip to content

Commit

Permalink
don't try to unexport PROMPT_COMMAND on bash < 4.2 (GH liquidprompt#474)
Browse files Browse the repository at this point in the history
  • Loading branch information
dolmen authored and Panagiotis Kkolos committed Nov 21, 2016
1 parent 65150be commit 61e4193
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion liquidprompt
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,10 @@ prompt_on()
# incorrectly export it from their profile/bashrc (GitHub #450),
# so we preventively UNexport it.
# TODO: warn the user if it was exported
declare -g +x PROMPT_COMMAND
if (( ${BASH_VERSION%%.*} > 4 )) || [[ ${BASH_VERSION} > 4.2 ]]; then
# -g is only available since bash 4.2
declare -g +x PROMPT_COMMAND
fi

# Disable parameter/command expansion from PS1
shopt -u promptvars
Expand Down

0 comments on commit 61e4193

Please sign in to comment.