Skip to content

Commit

Permalink
Hide debugger hint after the input is submitted
Browse files Browse the repository at this point in the history
If `output_modifier_proc`'s `complete` arg is true, it means the input is
submitted. In that case, debugger hint doesn't provide value to users
and adds noise to the output. So we hide it in such case.
  • Loading branch information
st0012 committed Nov 26, 2023
1 parent 2a0eacc commit c7e1360
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/irb/debug.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def DEBUGGER__.capture_frames(*args)
cmd = output.split(/\s/, 2).first

if DEBUGGER__.commands.key?(cmd)
output = output.sub(/\n$/, " # debug command\n")
output = output.sub(/\n$/, " # debug command\n") unless complete
end
end

Expand Down

0 comments on commit c7e1360

Please sign in to comment.