Skip to content

Instantly share code, notes, and snippets.

View robbyki's full-sized avatar

Robby robbyki

View GitHub Profile
@calexandre
calexandre / merge-zsh-history.sh
Last active May 31, 2024 06:33
Merge two zsh history files
#!/bin/bash
# Inspired on https://david-kerwick.github.io/2017-01-04-combining-zsh-history-files/
set -e
history1=$1
history2=$2
merged=$3
echo "Merging history files: $history1 + $history2"
test ! -f $history1 && echo "File $history1 not found" && exit 1