Last active
December 17, 2015 12:29
-
-
Save mkelley33/5610528 to your computer and use it in GitHub Desktop.
My .pryrc
This file contains 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
# encoding: UTF-8 | |
Pry.config.editor = "vim" | |
Pry.config.pager = false | |
Pry.config.commands.alias_command "lM", "ls -M" | |
if defined?(Encoding) then | |
Encoding.default_external = 'utf-8' | |
Encoding.default_internal = 'utf-8' | |
else | |
$KCODE = 'utf-8' | |
end | |
# Pry.config.command_prefix = "%" | |
Pry.config.prompt = [ | |
proc {|target_self, nest_level, pry| | |
nested = (nest_level.zero?) ? '' : ":#{nest_level}" | |
"[#{pry.input_array.size}] #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}(#{Pry.view_clip(target_self)})#{nested}> " | |
}, | |
proc {|target_self, nest_level, pry| | |
nested = (nest_level.zero?) ? '' : ":#{nest_level}" | |
"[#{pry.input_array.size}] #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}(#{Pry.view_clip(target_self)})#{nested}* " | |
} | |
] | |
begin | |
require 'pry-clipboard' | |
# aliases | |
Pry.commands.alias_command 'ch', 'copy-history' | |
Pry.commands.alias_command 'cr', 'copy-result' | |
rescue LoadError | |
# Missing goodies, bummer | |
end | |
begin | |
require 'awesome_print' | |
require 'tapp' | |
rescue LoadError | |
# Missing goodies, bummer | |
end | |
begin | |
require 'pry-debugger' | |
Pry.commands.alias_command 'c', 'continue' | |
Pry.commands.alias_command 's', 'step' | |
Pry.commands.alias_command 'n', 'next' | |
Pry.commands.alias_command 'f', 'finish' | |
Pry.commands.alias_command 'b', 'break' | |
rescue LoadError | |
# Missing goodies, bummer | |
end | |
begin | |
require 'hirb' | |
require 'hirb-unicode' | |
rescue LoadError | |
# Missing goodies, bummer | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rename to .pryrc and put in your $HOME directory