mirror of
https://github.com/powerline/powerline.git
synced 2025-04-08 19:25:04 +02:00
Record last exit code before running anything
Otherwise powerline receieves value from the previous command in _powerline_prompt function.
This commit is contained in:
parent
6439800d9c
commit
1df447ebc1
@ -13,9 +13,10 @@ _powerline_tmux_set_columns() {
|
||||
}
|
||||
|
||||
_powerline_prompt() {
|
||||
local last_exit_code=$?
|
||||
[[ -z "$POWERLINE_OLD_PROMPT_COMMAND" ]] ||
|
||||
eval $POWERLINE_OLD_PROMPT_COMMAND
|
||||
PS1="$(powerline shell left -r bash_prompt --last_exit_code=$?)"
|
||||
PS1="$(powerline shell left -r bash_prompt --last_exit_code=$last_exit_code)"
|
||||
_powerline_tmux_set_pwd
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user