emjayoh
12/23/2019 - 5:16 AM

Bash history to Zsh history

Bash history to Zsh history

// 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);
});