Advertisement
Guest User

Untitled

a guest
Jul 26th, 2012
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #Script
  2. history_file = File.read(File.expand_path("~/.zsh_history"))
  3. history_file = history_file.split(": ")
  4. history_file.collect! { |item| item=item.split(";")[1].split(" ")[0]}
  5. puts history_file
  6.  
  7. #error
  8. frequently_used_commands.rb:9:in `block in <main>': undefined method `split' for nil:NilClass (NoMethodError)
  9. from frequently_used_commands.rb:9:in `collect!'
  10. from frequently_used_commands.rb:9:in `<main>'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement