citadel

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

commit 65f14535fdf5ba2c96cc35c39d911ae74dadb660
parent 5ce1980d19d1b233c072517860b890c394c4fe1e
Author: William Casarin <jb55@jb55.com>
Date:   Mon,  4 Jan 2021 08:24:12 -0800

fuzz-compres-hist: make it work on any file

Diffstat:
Mbin/fuzz-compress-hist | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/bin/fuzz-compress-hist b/bin/fuzz-compress-hist @@ -1,4 +1,5 @@ #!/usr/bin/env bash -touch $HOME/.fuzzhist -tac $HOME/.fuzzhist | awk '!visited[$0]++' | tac > $HOME/.fuzzhist.2 -mv $HOME/.fuzzhist.2 $HOME/.fuzzhist +HISTFILE=${1:-$HOME/.fuzzhist} +touch "$HISTFILE" +tac "$HISTFILE" | awk '!visited[$0]++' | tac > "$HISTFILE".2 +mv "$HISTFILE.2" "$HISTFILE"