Closed
Description
Bash-it base theme provides _save-and-reload-history()
function that does history actions depending on user settings.
While this is defined as [[ $autosave -eq 1 ]] && history -a && history -c && history -r
, the input parameter isn't a global bash-it variable, and so each theme may use its own (the only one supporting it, powerline, seems to use $HISTORY_AUTOSAVE
.
In the other side, I see various themes doing:
prompt_setter() {
local exit_status=$?
# Save history
history -a
history -c
history -r
PS1="foooo"
}
Now, I've a big history file, so while I do want to use history -a
all the times, I don't want to reload it once saved, but do it on-demand.
At the same time, some themes don't do this, so there's no consistency.
So, things to do are:
- Provide
HISTORY_AUTOSAVE_*
variables to define what actions to do with history - Use
_save-and-reload-history()
in all the themes