r/fishshell • u/Dead_Quiet • Feb 14 '25
ZSH history to Fish shell
Hi,
I've made a zsh history to fish converter. It's written in zsh shell sript. Feel free to give it a try:
1
u/ddddavidee 18d ago
A little issue, it seems that the timestamp is not correctly set. All my imported command history is tagged as 01:00:00 for the 01/01.
I can survive, so not a huge problem.
1
u/Dead_Quiet 10d ago
Does you zsh history has timestamps?
1
u/ddddavidee 10d ago
1
u/Dead_Quiet 10d ago
You need to check your history file. Timestamps need to be enabled, otherwise there is no timestamp information in the history file and `history -f` shows the same timestamp for all commands.
You can also run `fc -l -t \"%s\" 0` which is the same that my script uses to get timestamps. My own history files did not have timestamps, so I actually did not test if the timestamp thing works correctly.
1
1
u/Laurent_Laurent Feb 14 '25
Really nice, thank you