ruby / debug

Debugging functionality for Ruby
BSD 2-Clause "Simplified" License
1.1k stars 125 forks source link

Add a shorter alias for the whereami command #1086

Open odinhb opened 4 months ago

odinhb commented 4 months ago

Your proposal Add an alias for whereami called w. Or something else short.

Additional context Since the list command is stateful (continuing to print source code below if you run it multiple times), I find myself using whereami instead. But I wish it had a short alias (like list has l). I've already mistyped whereami as both wherami and once I even forgot the last bit and simply typed where, both of which crash with a NoMethodError.

Reading through https://github.com/ruby/debug/issues/639 it seems the idea of allowing users to alias @ whereami would be added but since it hasn't been done I think it would be better to just add it to the defaults.

@ would be similiar to pry so maybe that makes it easier for some people to switch?

st0012 commented 4 months ago

👋 IRB has both whereami and the @ alias for it. You can use binding.irb as breakpoints and then activate the irb:rdbg integration to access debug commands, then you get features from both tools.