Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add history flushes on each command to the powerline themes #1883

Merged
merged 3 commits into from
Oct 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions themes/powerline-multiline/powerline-multiline.base.bash
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ function __powerline_prompt_command {
SEGMENTS_AT_RIGHT=0
LAST_SEGMENT_COLOR=""

_save-and-reload-history "${HISTORY_AUTOSAVE:-0}"

## left prompt ##
for segment in $POWERLINE_LEFT_PROMPT; do
local info="$(__powerline_${segment}_prompt)"
Expand Down
2 changes: 2 additions & 0 deletions themes/powerline-naked/powerline-naked.base.bash
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ function __powerline_left_segment {
LEFT_PROMPT+="$(set_color ${params[1]} -)${pad_before_segment}${params[0]}${normal}"
LAST_SEGMENT_COLOR=${params[1]}
(( SEGMENTS_AT_LEFT += 1 ))

_save-and-reload-history "${HISTORY_AUTOSAVE:-0}"
}

function __powerline_left_last_segment_padding {
Expand Down
2 changes: 2 additions & 0 deletions themes/powerline/powerline.base.bash
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ function __powerline_prompt_command() {
SEGMENTS_AT_LEFT=0
LAST_SEGMENT_COLOR=""

save-and-reload-history "${HISTORY_AUTOSAVE:-0}"
ira-bv marked this conversation as resolved.
Show resolved Hide resolved

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