Advertisement
Guest User

Untitled

a guest
Dec 29th, 2018
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.39 KB | None | 0 0
  1. Pry::Commands.create_command "ll" do
  2.   description "Loads a file. If no arg is passed, will reload the last file"
  3.  
  4.   def process
  5.    
  6.     if (args.length == 0)
  7.       if $PRY_MY_LAST_LL.nil?
  8.         output.puts "No last file, aborting"
  9.       else
  10.         load $PRY_MY_LAST_LL
  11.       end
  12.     else
  13.       $PRY_MY_LAST_LL = args.join(" ")
  14.       load $PRY_MY_LAST_LL
  15.     end
  16.   end
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement