Skip to content

Instantly share code, notes, and snippets.



Created Apr 20, 2017
What would you like to do?
require 'yaml'
r = {}'dot.zsh-history') do |f|
r = f.each_line.inject([]) do |a, l|
a << { "cmd" => l[15..-1].to_s.scrub.strip, "when" => l[1..11].to_i }
end'fish_history', 'w'){|f| f.write r.to_yaml(options = { line_width: -1 })}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.