Sha256: 0fa0efdd52df7d8aa7c98cb6b0721c19091d8080c524dc52fff8943701b05c64

Contents?: true

Size: 702 Bytes

Versions: 3

Compression:

Stored size: 702 Bytes

Contents

# -*- coding: utf-8 -*-
# Copyright (C) 2011 Rocky Bernstein <rockyb@rubyforge.net>
require_relative '../base/subsubcmd'
require_relative '../base/subsubmgr'

class Trepan::Subcommand::ShowHighlight < Trepan::ShowBoolSubcommand
  unless defined?(HELP)
    Trepanning::Subcommand.set_name_prefix(__FILE__, self)
    HELP         = 'Show whether we use terminal highlighting'
    MIN_ABBREV   = 'high'.size
  end

  def run(args)
    val = :term == @proc.settings[:highlight] 
    onoff = show_onoff(val)
    msg("%s is %s." % [@name, onoff])
  end
end

if __FILE__ == $0
  require_relative '../../mock'
  cmd = MockDebugger::sub_setup(Trepan::Subcommand::ShowHighlight, false)
  cmd.run(cmd.prefix)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
trepanning-0.1.6 processor/command/show_subcmd/highlight.rb
trepanning-0.1.4 processor/command/show_subcmd/highlight.rb
trepanning-0.1.3 processor/command/show_subcmd/highlight.rb