This is a simple shell script to ease the migration from ZSH to Fish shell. It converts the ZSH history to Fish.
This is a shell rewrite of rsalmei/zsh-history-to-fish.
Just zsh
, sed
and awk
.
If you have git
available, you can clone the repository:
git clone https://github.com/thenktor/zsh-history-to-fish.git
Without git
you can just download the file:
curl -L https://raw.githubusercontent.com/thenktor/zsh-history-to-fish/refs/heads/main/zsh-fish.sh -o zsh-fish.sh
chmod +x zsh-fish.sh
# ./zsh-fish.sh -h
Usage: ./zsh-fish.sh [-d] [-i <input_file>] [-o <output_file>]
-d : dry-run (don't write output file)
-i <input_file> : path to ZSH history file, default: $HISTFILE or ~/.zhistory
-o <output_file>: path to Fish history file, default: ~/.local/share/fish/fish_history
Note: Usual file names for the ZSH history file are ~/.zhistory
or ~/.zsh_history
.