Sha256: a41625b54275a5c03ea030ebf21cabf0eb8e8f401acf09e48eaa9fc6736f5ea1

Contents?: true

Size: 667 Bytes

Versions: 2

Compression:

Stored size: 667 Bytes

Contents

#!/usr/bin/env ruby

require "textbringer"

include Textbringer
include Commands

def load_user_config
  config_file = File.expand_path("~/.textbringer.rb")
  begin
    load(config_file)
  rescue LoadError
  end
end

$VERBOSE = nil

Controller.current = Controller.new
Window.start do
  message("Type C-x C-c to exit Textbringer")
  begin
    load_user_config
    ruby_mode
    if ARGV.size > 0
      ARGV.each do |arg|
        find_file(arg)
      end
    end
  rescue Exception => e
    handle_exception(e)
  end
  Window.redisplay
  trap(:CONT) do
    Window.redraw
  end
  loop do
    Controller.current.command_loop(TOP_LEVEL_TAG)
    Window.redisplay
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
textbringer-0.1.1 exe/textbringer
textbringer-0.1.0 exe/tb