citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

commit 3e3c942e3256876054c47c0eef7dbb20c493ad58
parent e98a671366ee40920223165e73f15fb7ccc40935
Author: William Casarin <jb55@jb55.com>
Date:   Thu, 12 Nov 2020 18:51:25 -0800

fuzz/hist: do uniq, maintaining order

Diffstat:
Mbin/fuzz-run-hist | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bin/fuzz-run-hist b/bin/fuzz-run-hist @@ -1,6 +1,7 @@ #!/usr/bin/env bash +FUZZ_HISTSIZE=${FUZZ_HISTSIZE:-10000} touch $HOME/.fuzzhist -<$HOME/.fuzzhist uniq | tail -n 10000 > $HOME/.fuzzhist.2 +tail -n $FUZZ_HISTSIZE | tac $HOME/.fuzzhist | awk '!visited[$0]++' | tac > $HOME/.fuzzhist.2 mv $HOME/.fuzzhist.2 $HOME/.fuzzhist cmd=$(<$HOME/.fuzzhist $FUZZER --tac) && echo $cmd