class Byebug::QuitCommand


Exit from byebug.

def description

def description
  prettify <<-EOD
    q[uit] [!|unconditionally] Exits from byebug.
    Normally we prompt before exiting. However if the parameter
    "unconditionally" is given or command is suffixed with !, we exit
    without asking further questions.
  EOD
end

def execute

def execute
  return unless @match[1] || confirm(pr('quit.confirmations.really'))
  @state.interface.autosave
  @state.interface.close
  exit! # exit -> exit!: No graceful way to stop...
end

def names

def names
  %w(quit)
end

def regexp

def regexp
  /^\s* q(?:uit)? \s* (?:(!|\s+unconditionally))? \s*$/x
end