add an env var that themes can save history immediately

pull/1379/head
Levent Yalcin 2019-05-20 14:18:32 +01:00
parent 9b4a049571
commit 09a48d89cc
No known key found for this signature in database
GPG Key ID: 26426B2D80C07FBE
2 changed files with 4 additions and 0 deletions

View File

@ -14,6 +14,8 @@ function __powerline_prompt_command {
LEFT_PROMPT="" LEFT_PROMPT=""
[[ $HISTORY_AUTOSAVE -eq 1 ]] && history -a && history -c && history -r
## left prompt ## ## left prompt ##
for segment in $POWERLINE_PROMPT; do for segment in $POWERLINE_PROMPT; do
local info="$(__powerline_${segment}_prompt)" local info="$(__powerline_${segment}_prompt)"

View File

@ -56,3 +56,5 @@ POWERLINE_PROMPT=${POWERLINE_PROMPT:="user_info scm python_venv ruby cwd"}
safe_append_prompt_command __powerline_prompt_command safe_append_prompt_command __powerline_prompt_command
HISTORY_AUTOSAVE=${HISTORY_AUTOSAVE:-0}