aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/bashhistory
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/bashhistory')
-rwxr-xr-x.local/bin/bashhistory8
1 files changed, 4 insertions, 4 deletions
diff --git a/.local/bin/bashhistory b/.local/bin/bashhistory
index 73d8376..a0f8300 100755
--- a/.local/bin/bashhistory
+++ b/.local/bin/bashhistory
@@ -7,9 +7,9 @@ current="$HISTFILE"
lockfile='/tmp/bashhistory_Ri5ki9ei.lock'
_prune() {
- sed --in-place '/^#/d' "$1" && # Remove all timestamps.
- sed --in-place '/.........../!d' "$1" && # Remove all commands less than 11 characters.
- sort --unique "$1" > "$1.tmp" && mv --force "$1.tmp" "$1" # Remove all duplicate entries.
+ sed --in-place '/^#/d' "$1" && # Remove all timestamps.
+ sed --in-place '/.........../!d' "$1" && # Remove all commands less than 11 characters.
+ sort --unique "$1" > "$1.tmp" && mv --force "$1.tmp" "$1" > /dev/null 2>&1 # Remove all duplicate entries.
}
_migrate() {
@@ -31,7 +31,7 @@ _store() {
mkdir --parents "$directory"
touch "$current" "$lockfile"
-trap 'rm "$lockfile"; trap - EXIT; exit' EXIT INT HUP
+trap 'rm "$lockfile" > /dev/null 2>&1; trap - EXIT; exit' EXIT INT HUP
_migrate || true
_store