Created
April 4, 2017 17:01
-
-
Save 5t111111/907d3157478999b1a4c8965a72b49db1 to your computer and use it in GitHub Desktop.
Convert zsh history to fish history fomat
This file contains hidden or 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
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