Forked from ycarmel/bash-history-to-zsh-history.js
Created
December 23, 2019 05:16
-
-
Save emjayoh/5908e3eb07f22259aa8c1a7cfda5e3d7 to your computer and use it in GitHub Desktop.
Bash history to Zsh history
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is how I used it: | |
// $ node bash-history-to-zsh-history.js >> ~/.zsh_history | |
var fs = require("fs"); | |
var a = fs.readFileSync(".bash_history"); | |
var time = Date.now(); | |
a.toString().split("\n").forEach(function(line){ | |
console.log(": "+ (time++) + ":0;"+line); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment