class Byebug::AddDisplayCommand


every time the debugger stops.
Implements the functionality of adding custom expressions to be displayed

def description

def description
  prettify <<-EOD
    disp[lay] <expression>
    Add <expression> into display expression list.
  EOD
end

def display_expression(exp)

def display_expression(exp)
  print pr('display.result',
           n: @state.display.size,
           exp: exp,
           result: bb_warning_eval(exp).inspect)
end

def execute

def execute
  exp = @match[1]
  @state.display.push [true, exp]
  display_expression(exp)
end

def names

def names
  %w(display)
end

def regexp

def regexp
  /^\s* disp(?:lay)? \s+ (.+) \s*$/x
end