Put _powerline_prompt at the start
Reason: $? may be overridden by the previous commands in PROMPT_COMMAND that do not keep it like _powerline_prompt does (see `return $last_exit_code`). (@ascrane) Closes #836
This commit is contained in:
parent
70a94ee7d3
commit
2b5b6af002
|
@ -47,7 +47,7 @@ _powerline_prompt() {
|
|||
return $last_exit_code
|
||||
}
|
||||
|
||||
[[ "$PROMPT_COMMAND" != "${PROMPT_COMMAND/_powerline_prompt/}" ]] ||
|
||||
export PROMPT_COMMAND="${PROMPT_COMMAND}"$'\n'"_powerline_prompt"
|
||||
test "x$PROMPT_COMMAND" != "x${PROMPT_COMMAND%_powerline_prompt*}" ||
|
||||
export PROMPT_COMMAND=$'_powerline_prompt\n'"${PROMPT_COMMAND}"
|
||||
|
||||
_powerline_init_tmux_support
|
||||
|
|
Loading…
Reference in New Issue