root/branches/FAERIEMUD_CONSORTIUM/.irbrc

Revision 1, 1.0 KB (checked in by deveiant, 6 years ago)

Initial revision

Line 
1# -*- ruby -*-
2
3puts ">>> Adding 'lib' to load path..."
4$LOAD_PATH.unshift( "lib" )
5
6#puts ">>> Turning on $VERBOSE and $DEBUG..."
7# $VERBOSE = $DEBUG = true
8
9require './utils'
10include UtilityFunctions
11
12def colored( prompt, *args )
13    return ansiCode( *(args.flatten) ) + prompt + ansiCode( 'reset' )
14end
15
16
17# Modify prompt to do highlighting
18IRB.conf[:PROMPT][:MUES] = { # name of prompt mode
19    :PROMPT_I => colored( "%N(%m):%03n:%i>", %w{bold white on_blue} ) + " ",
20    :PROMPT_S => colored( "%N(%m):%03n:%i%l", %w{white on_blue} ) + " ",
21    :PROMPT_C => colored( "%N(%m):%03n:%i*", %w{white on_blue} ) + " ",
22    :RETURN => "    ==> %s\n\n"      # format to return value
23}
24IRB.conf[:PROMPT_MODE] = :MUES
25
26# Try to require the 'mues' library
27begin
28    puts "Requiring 'linguistics' module..."
29    require 'linguistics'
30    puts "Calling Linguistics::use( :en )"
31    Linguistics::use( :en )
32rescue => e
33    $stderr.puts "Ack! Linguistics module failed to load: #{e.message}\n\t" +
34        e.backtrace.join( "\n\t" )
35end
Note: See TracBrowser for help on using the browser.