add an env var that themes can save history immediately
parent
9b4a049571
commit
09a48d89cc
|
|
@ -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)"
|
||||||
|
|
|
||||||
|
|
@ -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}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue