<commit_before># Copyright (C) 2010 <NAME> <<EMAIL>>
require 'rubygems'; require 'require_relative'
require_relative 'base/cmd'
class Trepan::Command::ExitCommand < Trepan::Command

  unless defined?(HELP)
    ALIASES      = %w(quit q q! quit! exit!)
    HELP = 
      'exit [exitcode] - hard exit of the debugged program.  

The program being debugged is exited via exit!() which does not run
the Kernel at_exit finalizers. If a return code is given, that is the
return code passed to exit() - presumably the return code that will be
passed back to the OS. If no exit code is given, 0 is used.

See also "kill".'

    CATEGORY     = 'support'
    MAX_ARGS     = 2  # Need at most this many
    NAME         = File.basename(__FILE__, '.rb')
    SHORT_HELP  = 'Exit program via "exit!"'
  end

  # FIXME: Combine 'quit' and 'exit'. The only difference is
  # whether exit! or exit is used.

  # This method runs the command
  def run(args) # :nodoc
    unconditional = 
      if args.size > 1 && args[1] == 'unconditionally'
        args.shift
        true
      elsif args[0][-1..-1] == '!'
        true
      else
        false
      end
    unless unconditional || confirm('Really quit?', false)
      msg('Quit not confirmed.')
      return
    end
    exitrc = (args.size > 1) ? exitrc = Integer(args[1]) rescue 0 : 0
    # No graceful way to stop threads...
    # A little harsh, but for now let's go with this.
    exit! exitrc
  end
end

if __FILE__ == $0
  require_relative '../mock'
  name = File.basename(__FILE__, '.rb')<commit_msg>Update help for exit<commit_after># Copyright (C) 2010 <NAME> <<EMAIL>>
require 'rubygems'; require 'require_relative'
require_relative 'base/cmd'
class Trepan::Command::ExitCommand < Trepan::Command

  unless defined?(HELP)
    ALIASES      = %w(quit q q! quit! exit!)
    HELP = 
      'exit [exitcode] - hard exit of the debugged program.  

The program being debugged is exited via exit!() which does not run
the Kernel at_exit finalizers. If a return code is given, that is the
return code passed to exit() - presumably the return code that will be
passed back to the OS. If no exit code is given, 0 is used.

If you are in interactive mode, you are prompted to confirm
quitting. However if you do not want to be prompted, add ! the end.
(vim/vi/ed users can use alias q!).

See also "kill".'

    CATEGORY     = 'support'
    MAX_ARGS     = 2  # Need at most this many
    NAME         = File.basename(__FILE__, '.rb')
    SHORT_HELP  = 'Exit program via "exit!()"'
  end

  # FIXME: Combine 'quit' and 'exit'. The only difference is
  # whether exit! or exit is used.

  # This method runs the command
  def run(args) # :nodoc
    unconditional = 
      if args.size > 1 && args[1] == 'unconditionally'
        args.shift
        true
      elsif args[0][-1..-1] == '!'
        true
      else
        false
      end
    unless unconditional || confirm('Really quit?', false)
      msg('Quit not confirmed.')
      return
    end
    exitrc = (args.size > 1) ? exitrc = Integer(args[1]) rescue 0 : 0
    # No graceful way to stop threads...
    # A little harsh, but for now let's go with this.
    exit! exitrc
  end
end

if __FILE__ == $0
  require_relative '../mock'
  name = File.basename(__FILE__, '.rb')
{'fraction_non_alphanumeric': 0.10644171779141104, 'fraction_numerical': 0.0098159509202454, 'mean_word_length': 2.676437429537768, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2455582', 'n_tokens_mistral': 1068, 'n_tokens_neox': 1006, 'n_words': 406}