diff options
| author | Miquel Sabaté Solà <msabate@suse.com> | 2019-08-22 18:30:24 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <msabate@suse.com> | 2019-08-22 18:30:24 +0200 |
| commit | 4ead9be4468d8d58c027bf6e6616e3b4d6e727eb (patch) | |
| tree | 18ab19fd5213c9d302b165eafa46a6f1f8902e75 /.irbrc | |
| parent | 04f4a7df197ce327f36b666869a1ca2f09934e58 (diff) | |
| download | dotfiles-4ead9be4468d8d58c027bf6e6616e3b4d6e727eb.tar.gz dotfiles-4ead9be4468d8d58c027bf6e6616e3b4d6e727eb.zip | |
Complete re-structuring so it's easier to install
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to '.irbrc')
| -rw-r--r-- | .irbrc | 46 |
1 files changed, 46 insertions, 0 deletions
@@ -0,0 +1,46 @@ +#!/usr/bin/env ruby +# +# Author: Miquel Sabaté +# http://github.com/mssola/dotfiles + + +require 'irb/completion' +require 'irb/ext/save-history' +require 'rubygems' +require 'pp' +require 'wirble' + + +# Colorize! +Wirble.init +Wirble.colorize + +# Simple prompt +IRB.conf[:PROMPT_MODE] = :SIMPLE + +# History +IRB.conf[:SAVE_HISTORY] = 100 +IRB.conf[:HISTORY_FILE] = File.expand_path('~/.irb_history') + +# Auto-indentation +IRB.conf[:AUTO_INDENT] = true + +# Use readline +IRB.conf[:USE_READLINE] = true + +# List object methods +def local_methods(obj = self) + (obj.methods - obj.class.superclass.instance_methods).sort +end + +# Reload this .irbrc +def reload! + load __FILE__ +end + +# Beautify ls +def ls + %x{ls}.split("\n") +end + +alias p pp |
