#!/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