improve _synchistory and _erasehistorydups further

parent b1a4cb91
......@@ -202,23 +202,17 @@ if [[ $(ini_get history_sync) == True ]]; then
mv ${HISTFILE}.tmp ${HISTFILE}
}
if [[ ${HISTCONTROL} == erasedups ]]; then
_synchistory () {
builtin history -a
builtin history -c
builtin history -r
_erasehistorydups
}
else
_synchistory () {
builtin history -a
builtin history -c
builtin history -r
}
fi
_synchistory () {
builtin history -a
builtin history -c
builtin history -r
builtin history -w
}
trap_add '_synchistory' DEBUG
[[ ${HISTCONTROL} == erasedups ]] && trap_add '_erasehistorydups' DEBUG
history () {
_synchistory
builtin history
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment