Created
December 4, 2011 11:01
-
-
Save banister/1429902 to your computer and use it in GitHub Desktop.
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
Pry.commands.command "alias" do |name, action| | |
Pry.commands.command name do |*args| | |
run action, *args | |
end | |
end | |
# => #<struct Pry::CommandSet::Command | |
# name="alias", | |
# description="No description.", | |
# options= | |
# {:requires_gem=>[], | |
# :keep_retval=>false, | |
# :argument_required=>false, | |
# :interpolate=>true, | |
# :shellwords=>true, | |
# :listing=>"alias", | |
# :use_prefix=>true}, | |
# block=#<Proc:0x0000010106e9b8@(pry):1>> | |
[4] (pry) main: 0> alias hello "ls -M" | |
[5] (pry) main: 0> hello Pry | |
Pry#methods: backtrace backtrace= binding_stack binding_stack= commands commands= custom_completions custom_completions= exception_handler exception_handler= hooks hooks= incomplete_user_input_exception? inject_local inject_special_locals input input= input_array input_stack input_stack= last_dir last_dir= last_exception last_exception= last_file last_file= last_result last_result= last_result_is_exception? memory_size memory_size= output output= output_array pop_prompt print print= process_command prompt prompt= push_prompt r re readline refresh rep repl repl_epilogue repl_prologue retrieve_line run_command select_prompt set_last_exception set_last_result should_print? show_result special_locals update_input_history valid_expression? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment