diff options
author | Tharre <tharre3@gmail.com> | 2018-08-27 00:32:54 +0200 |
---|---|---|
committer | Tharre <tharre3@gmail.com> | 2018-08-27 01:11:20 +0200 |
commit | 704ad13e3ee607be2d837b9bc250105d85b8c5bf (patch) | |
tree | 99b53fe66c276277c2e25992aa57d2468ae2590f /bin | |
parent | 8b9e816438744b205b686fa360fbca0200852f78 (diff) | |
download | dotfiles-704ad13e3ee607be2d837b9bc250105d85b8c5bf.tar.gz dotfiles-704ad13e3ee607be2d837b9bc250105d85b8c5bf.tar.xz dotfiles-704ad13e3ee607be2d837b9bc250105d85b8c5bf.zip |
zsh: limit history in memory to 10000 lines
10000 lines should suffice in general, no need to waste additional
memory. Additionally hist_expire_dups_first has been removed, because
this causes a lot of additional CPU load, probably loading $HISTFILE
over and over again.
If further history is required, it can be loaded with a function like
the following:
function hist {
local TEMPHISTFILE="$HISTFILE"
local TEMPSIZE=$SAVEHIST
fc -pa
HISTSIZE=$TEMPSIZE
fc -R "$TEMPHISTFILE"
fc -l 0
}
The problem with the above is that it will increase the memory footprint
of the zsh process, up to ~50MiB, that doesn't seem to be freed later.
Just grepping $HISTFILE produces a similar result, without this
drawback.
Diffstat (limited to 'bin')
0 files changed, 0 insertions, 0 deletions