Skip to content

Instantly share code, notes, and snippets.

@ngquerol
Last active June 11, 2024 21:18
Show Gist options
  • Save ngquerol/7cfbb69a4a7f701a818fdce387108f52 to your computer and use it in GitHub Desktop.
Save ngquerol/7cfbb69a4a7f701a818fdce387108f52 to your computer and use it in GitHub Desktop.
Cleanup fish history imported from zsh
#!/bin/sh
perl \
-0777 \
-pe \
-i.old \
"${HOME}/.local/share/fish/fish_history" \
's/- cmd: : (\d{10}):\d+;(.+)\n when: (\d{10})/- cmd: $2\n when: $1/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment