Skip to content

Instantly share code, notes, and snippets.

@5t111111
Created April 4, 2017 17:01
Show Gist options
  • Save 5t111111/907d3157478999b1a4c8965a72b49db1 to your computer and use it in GitHub Desktop.
Save 5t111111/907d3157478999b1a4c8965a72b49db1 to your computer and use it in GitHub Desktop.
Convert zsh history to fish history fomat
fc -lni 1 | ruby -rtime -r yaml -e 'puts STDIN.inject([]) { |a, l| a << { "cmd" => l[16..-1].strip, "when" => Time.parse(l[0..15]).to_i } }.to_yaml(options = {:line_width => -1})' > ~/.local/share/fish/histfile-from-zsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment