This file contains hidden or 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
#!/bin/bash | |
if git rev-parse --verify "$1" | |
then | |
git reset HEAD^ --hard | |
git checkout "$1" | |
git cherry-pick "HEAD@{2}" | |
fi |
This file contains hidden or 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
Pry.config.commands.command "edit-line", "Edits the current line in your editor" do | |
require 'tempfile' unless defined? Tempfile | |
to_edit = (eval_string =~ /^\s*$/ ? target.eval('inp[-1] || ""') : eval_string) | |
temp_file = Tempfile.new('edit-line') | |
temp_file.puts to_edit | |
temp_file.close |
This file contains hidden or 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
pry(main)> 2 | |
=> 2 | |
pry(main)> | |
pry(main)> edit-line | |
pry(main)> _ | |
=> 3 |
This file contains hidden or 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
pry(main)> 1 | |
=> 1 | |
pry(main)> edit-line | |
1: puts( | |
pry(main)* 2) | |
2 | |
=> nil |
This file contains hidden or 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
>> A.new | |
NoMethodError: undefined method `inspect' for #<A:0x26cec40> | |
from /home/conrad/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb.rb:310:in `output_value' | |
from /home/conrad/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb.rb:159:in `eval_input' | |
from /home/conrad/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb.rb:271:in `signal_status' | |
from /home/conrad/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb.rb:155:in `eval_input' | |
from /home/conrad/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb/ruby-lex.rb:244:in `each_top_level_statement' | |
from /home/conrad/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb/ruby-lex.rb:230:in `loop' | |
from /home/conrad/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb/ruby-lex.rb:230:in `each_top_level_statement' | |
from /home/conrad/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb/ruby-lex.rb:229:in `catch' |
This file contains hidden or 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
(in /0/ruby/pry) | |
** Invoke pry (first_time) | |
** Execute pry | |
pry(main)> require 'ampex' | |
=> true | |
pry(main)> X | |
warning: .pretty_inspect returned Metavariable not String | |
=> #<Metavariable:0x13f621c> |
This file contains hidden or 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
(in /0/ruby/pry) | |
** Invoke pry (first_time) | |
** Execute pry | |
pry(main)> require 'ampex' | |
=> true | |
pry(main)> X | |
warning: .pretty_inspect returned Metavariable not String | |
=> #<Metavariable:0x13f621c> | |
pry(main)> Object.new | |
=> #<Object:0x26ff750> |
This file contains hidden or 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
Nesting status: | |
-- | |
0. main (Pry top level) | |
1. 1 | |
2. 2 | |
3. 3 | |
2. 2 |
This file contains hidden or 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
Pry.config.commands.command "edit-line", "Edits the current line in your editor" do | |
require 'tempfile' unless defined? Tempfile | |
to_edit = (eval_string =~ /^\s*$/ ? Readline::HISTORY[-2] : eval_string) | |
temp_file = Tempfile.new('edit-line') | |
temp_file.puts to_edit | |
temp_file.close | |
# HACK 1. this is a helper in the default command set. |
This file contains hidden or 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
Pry::DefaultCommands::Documentation | |
show-doc | |
- should output a method's documentation/home/conrad/.rvm/gems/jruby-1.6.3/gems/method_source-0.6.0/lib/method_source/source_location.rb:23 warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag | |
[FAILED] | |
- should output a method's documentation if inside method without needing to use method name/home/conrad/.rvm/gems/jruby-1.6.3/gems/method_source-0.6.0/lib/method_source/source_location.rb:23 warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag | |
/home/conrad/.rvm/gems/jruby-1.6.3/gems/method_source-0.6.0/lib/method_source/source_location.rb:23 warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag | |
/home/conrad/.rvm/gems/jruby-1.6.3/gems/method_source-0.6.0/lib/method_source/source_location.rb:23 warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag | |
/home/conrad/.rvm/gems/jruby-1.6.3/gems/method_source-0.6.0/lib/method_source/source_ |