Posts

Showing posts with the label pry

Exit pry session by alias command

Image
Clash Royale CLAN TAG #URR8PPP Exit pry session by alias command I wanna exit pry session by q instead of exit! q exit! Both are not working for me. Pry.commands.alias_command 'q', 'exit!' Pry.commands.rename_command 'q', 'exit!' 2 Answers 2 This works for me: Pry.commands.alias_command :q, "!!!" Grych's answer works great for me. Just wanted to point out that the alias_command method takes a third argument, which allows you to add a description for the alias: alias_command Pry.commands.alias_command :q, :exit, 'a helpful and poetic description for exiting from pry' Pry.commands.alias_command :q, :exit, 'a helpful and poetic description for exiting from pry' By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie poli...