Created
October 3, 2013 08:12
-
-
Save jugyo/6806782 to your computer and use it in GitHub Desktop.
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
# Usage: cat .zhistory | ruby zsh_history_to_bash_history.rb >> .bash_history | |
history = ARGF.read.force_encoding('ascii-8bit') | |
history.split("\n").each do |line| | |
begin | |
puts line.split(';')[-1].strip | |
rescue | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment