Update tmux data even when prompt is disabled

Fixes #467
This commit is contained in:
ZyX 2014-06-25 20:40:24 +04:00
parent 1dd5f42b9d
commit fc8ad831d4
1 changed files with 2 additions and 1 deletions

View File

@ -26,6 +26,8 @@ _powerline_init_tmux_support() {
return 0 return 0
} }
fi fi
test "x$PROMPT_COMMAND" != "x${PROMPT_COMMAND%_powerline_tmux_set_pwd*}" ||
export PROMPT_COMMAND=$'_powerline_tmux_set_pwd\n'"${PROMPT_COMMAND}"
} }
_run_powerline() { _run_powerline() {
@ -37,7 +39,6 @@ _powerline_prompt() {
local last_exit_code=$? local last_exit_code=$?
local jobnum="$(jobs -p|wc -l)" local jobnum="$(jobs -p|wc -l)"
PS1="$(_run_powerline aboveleft $last_exit_code $jobnum)" PS1="$(_run_powerline aboveleft $last_exit_code $jobnum)"
_powerline_tmux_set_pwd
return $last_exit_code return $last_exit_code
} }