class Byebug::ShowCommand


Show byebug settings.

def description

def description
  <<-EOD.gsub(/^ {8}/, '')
    show <setting> <value>
    Generic command for showing byebug settings. You can change them with
    the "set" command.
  EOD
end

def execute

def execute
  key = @match[:setting]
  return puts(self.class.help) if key.nil?
  full_key = Setting.find(key)
  return errmsg("Unknown setting :#{key}") unless full_key
  puts Setting.settings[full_key.to_sym].to_s
end

def help(subcmds = [])

def help(subcmds = [])
  Setting.help('show', subcmds.first)
end

def names

def names
  %w(show)
end

def regexp

def regexp
  /^\s* show (?:\s+(?<setting>\w+))? \s*$/x
end