From 1d385f875f70cd45015ed18750898a1628460bcf Mon Sep 17 00:00:00 2001 From: Peter Fern Date: Tue, 15 Oct 2013 21:21:12 +1100 Subject: [PATCH] Avoid infinite recursion in `POWERLINE_OLD_PROMPT_COMMAND` Fixes #678 --- powerline/bindings/bash/powerline.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powerline/bindings/bash/powerline.sh b/powerline/bindings/bash/powerline.sh index cc0a22cc..c853211f 100644 --- a/powerline/bindings/bash/powerline.sh +++ b/powerline/bindings/bash/powerline.sh @@ -38,6 +38,6 @@ _powerline_prompt() { trap "_powerline_tmux_set_columns" SIGWINCH _powerline_tmux_set_columns -[[ "$PROMPT_COMMAND" == "_powerline_prompt" ]] || +[[ "$PROMPT_COMMAND" != "${PROMPT_COMMAND/_powerline_prompt/}" ]] || POWERLINE_OLD_PROMPT_COMMAND="$PROMPT_COMMAND" export PROMPT_COMMAND="_powerline_prompt"