class Byebug::ConditionCommand
def execute
def execute return puts(help) unless @match[1] breakpoints = Byebug.breakpoints.sort_by(&:id) return errmsg(pr("condition.errors.no_breakpoints")) if breakpoints.empty? pos, err = get_int(@match[1], "Condition", 1) return errmsg(err) if err breakpoint = breakpoints.find { |b| b.id == pos } return errmsg(pr("break.errors.no_breakpoint")) unless breakpoint return errmsg(pr("break.errors.not_changed", expr: @match[2])) unless syntax_valid?(@match[2]) breakpoint.expr = @match[2] end