Merge pull request #1379 from leventyalcin/feature/save_history_immediately

add an env var that themes can save history immediately
This commit is contained in:
Nils Winkler
2019-07-08 08:47:09 +02:00
committed by GitHub
4 changed files with 10 additions and 2 deletions

View File

@@ -499,3 +499,8 @@ function safe_append_prompt_command {
fi
fi
}
function _save-and-reload-history() {
local autosave=${1:-0}
[[ $autosave -eq 1 ]] && history -a && history -c && history -r
}