Skip to content

Instantly share code, notes, and snippets.

@avocadowastaken
avocadowastaken / zsh_to_fish.py
Last active March 17, 2022 20:21 — forked from dvdbng/zsh_to_fish.py
Migrate zsh history to fish
import os
import re
def zsh_to_fish(cmd):
return (cmd.replace('&&', '; and ')
.replace('||', '; or '))
def is_valid_fish(cmd):
# Install Fish
brew install fish
# Enter fish and setup brew to path
fish
fish_add_path /opt/homebrew/bin
# Register fish as a shell
sudo echo $(which fish) >> /etc/shells
<!doctype html>
<html>
<head>
<style>
@keyframes hue { 100% { filter: hue-rotate(360deg); } }
body {
margin: 0;
width: 100vw;