Skip to content

Instantly share code, notes, and snippets.

🔳
ghost in the shell

Mischievous Meerkat jarun

🔳
ghost in the shell
View GitHub Profile
@jarun
jarun / migrate-fish-history-to-zsh.py
Created Jan 15, 2020 — forked from mateuspontes/migrate-fish-history-to-zsh.py
Migrate fish history to zsh shell (python 2.7)
View migrate-fish-history-to-zsh.py
import os
import re
def fish_to_zsh(cmd):
return (cmd.replace('; and ', '&&')
.replace('; or ', '||'))
with open(os.path.expanduser('~/.zsh_history.test'), 'a') as o:
with open(os.path.expanduser('~/.local/share/fish/fish_history')) as f:
for line in f:
You can’t perform that action at this time.