Skip to content

Commit 9f4c71d

Browse files
committed
Add history flushes on each command to the powerline themes.
1 parent 8c47706 commit 9f4c71d

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

themes/powerline-multiline/powerline-multiline.base.bash

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ function __powerline_prompt_command {
6060
SEGMENTS_AT_LEFT=0
6161
SEGMENTS_AT_RIGHT=0
6262
LAST_SEGMENT_COLOR=""
63+
_save-and-reload-history "${HISTORY_AUTOSAVE:-0}"
6364

6465
## left prompt ##
6566
for segment in $POWERLINE_LEFT_PROMPT; do

themes/powerline-naked/powerline-naked.base.bash

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ function __powerline_left_segment {
2626
LEFT_PROMPT+="$(set_color ${params[1]} -)${pad_before_segment}${params[0]}${normal}"
2727
LAST_SEGMENT_COLOR=${params[1]}
2828
(( SEGMENTS_AT_LEFT += 1 ))
29+
_save-and-reload-history "${HISTORY_AUTOSAVE:-0}"
2930
}
3031

3132
function __powerline_left_last_segment_padding {

themes/powerline/powerline.base.bash

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ function __powerline_prompt_command() {
255255
LEFT_PROMPT=""
256256
SEGMENTS_AT_LEFT=0
257257
LAST_SEGMENT_COLOR=""
258+
save-and-reload-history "${HISTORY_AUTOSAVE:-0}"
258259

259260
if [[ -n "${POWERLINE_PROMPT_DISTRO_LOGO}" ]]; then
260261
LEFT_PROMPT+="$(set_color "${PROMPT_DISTRO_LOGO_COLOR}" "${PROMPT_DISTRO_LOGO_COLORBG}")${PROMPT_DISTRO_LOGO}$(set_color - -)"

0 commit comments

Comments
 (0)