Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 35 lines (27 sloc) 1.002 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
# -*- ruby -*-

puts ">>> Adding 'lib' to load path..."
$LOAD_PATH.unshift( "lib", "ext" )

#puts ">>> Turning on $VERBOSE and $DEBUG..."
# $VERBOSE = $DEBUG = true

require './utils'
include UtilityFunctions

def colored( prompt, *args )
return ansiCode( *(args.flatten) ) + prompt + ansiCode( 'reset' )
end


# Modify prompt to do highlighting
# IRB.conf[:PROMPT][:LINKPARSER] = { # name of prompt mode
# :PROMPT_I => colored( "%N(%m):%03n:%i>", %w{bold white on_blue} ) + " ",
# :PROMPT_S => colored( "%N(%m):%03n:%i%l", %w{white on_blue} ) + " ",
# :PROMPT_C => colored( "%N(%m):%03n:%i*", %w{white on_blue} ) + " ",
# :RETURN => " ==> %s\n\n" # format to return value
# }
# IRB.conf[:PROMPT_MODE] = :LINKPARSER

# Try to require the 'linkparser' library
begin
puts "Requiring 'linkparser' module..."
require 'linkparser'
rescue => e
$stderr.puts "Ack! LinkParser module failed to load: #{e.message}\n\t" +
e.backtrace.join( "\n\t" )
end

$dict = LinkParser::Dictionary.new
Something went wrong with that request. Please try again.