From fc8ad831d4f570d591ecf100023dcdbe3fcc2538 Mon Sep 17 00:00:00 2001 From: ZyX Date: Wed, 25 Jun 2014 20:40:24 +0400 Subject: [PATCH] Update tmux data even when prompt is disabled Fixes #467 --- powerline/bindings/bash/powerline.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/powerline/bindings/bash/powerline.sh b/powerline/bindings/bash/powerline.sh index e6cb88f7..18b5023a 100644 --- a/powerline/bindings/bash/powerline.sh +++ b/powerline/bindings/bash/powerline.sh @@ -26,6 +26,8 @@ _powerline_init_tmux_support() { return 0 } fi + test "x$PROMPT_COMMAND" != "x${PROMPT_COMMAND%_powerline_tmux_set_pwd*}" || + export PROMPT_COMMAND=$'_powerline_tmux_set_pwd\n'"${PROMPT_COMMAND}" } _run_powerline() { @@ -37,7 +39,6 @@ _powerline_prompt() { local last_exit_code=$? local jobnum="$(jobs -p|wc -l)" PS1="$(_run_powerline aboveleft $last_exit_code $jobnum)" - _powerline_tmux_set_pwd return $last_exit_code }