12345678910111213141516171819202122 |
- # User driven .irbrc file for working in interactive ruby sessions, ie. a Ruby REPL
- #
- #
- require 'irb/completion'
- require 'date'
- require 'irb/ext/save-history'
- IRB.conf[:PROMPT_MODE] = :SIMPLE
- IRB.conf[:SAVE_HISTORY] = 1000
- IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb_history"
- def pbcopy(input)
- str = input.to_s
- IO.popen('pbcopy', 'w') { |f| f << str }
- str
- end
- def pbpaste
- `pbpaste`
- end
|