class Byebug::DeleteDisplayCommand

:nodoc:

def execute

def execute
  unless pos = @match[1]
    if confirm("Clear all expressions? (y/n) ")
      for d in @state.display
        d[0] = false
      end
    end
  else
    pos = get_int(pos, "Undisplay")
    return unless pos
    if @state.display[pos-1]
      @state.display[pos-1][0] = nil
    else
      errmsg "Display expression %d is not defined.\n", pos
    end
  end
end

def help(cmd)

def help(cmd)
  %{
    undisp[lay][ nnn]
    Cancel some expressions to be displayed when program stops.
    Arguments are the code numbers of the expressions to stop displaying.
    No argument means cancel all automatic-display expressions.
    "delete display" has the same effect as this command.
    Do "info display" to see current list of code numbers.
  }
end

def help_command

def help_command
  'undisplay'
end

def regexp

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