Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Script
- history_file = File.read(File.expand_path("~/.zsh_history"))
- history_file = history_file.split(": ")
- history_file.collect! { |item| item=item.split(";")[1].split(" ")[0]}
- puts history_file
- #error
- frequently_used_commands.rb:9:in `block in <main>': undefined method `split' for nil:NilClass (NoMethodError)
- from frequently_used_commands.rb:9:in `collect!'
- from frequently_used_commands.rb:9:in `<main>'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement