Skip to content

Instantly share code, notes, and snippets.

@ycarmel
Last active December 23, 2019 05:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save ycarmel/9660351 to your computer and use it in GitHub Desktop.
Save ycarmel/9660351 to your computer and use it in GitHub Desktop.
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);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment