class DEBUGGER__::Session

def config_command arg

def config_command arg
  case arg
  when nil
    CONFIG_SET.each do |k, _|
      config_show k
    end
  when /\Aunset\s+(.+)\z/
    if CONFIG_SET[key = $1.to_sym]
      CONFIG[key] = nil
    end
    config_show key
  when /\A(\w+)\s*=\s*(.+)\z/
    config_set $1, $2
  when /\A\s*set\s+(\w+)\s+(.+)\z/
    config_set $1, $2
  when /\A(\w+)\s*<<\s*(.+)\z/
    config_set $1, $2, append: true
  when /\A\s*append\s+(\w+)\s+(.+)\z/
    config_set $1, $2, append: true
  when /\A(\w+)\z/
    config_show $1
  else
    @ui.puts "Can not parse parameters: #{arg}"
  end
end