Commit 7d8a0318 authored by Scott Lembcke's avatar Scott Lembcke Committed by Scott Lembcke

Added plug-ins/irbconsole.rb.

2006-07-28  Scott Lembcke <lemb0029@gnome.org>

        * Added plug-ins/irbconsole.rb.

        * plug-ins/Makefile.am: Added irbconsole.rb to the plugins list.
parent d3901a53
2006-07-28 Scott Lembcke <lemb0029@gnome.org>
* Added plug-ins/irbconsole.rb.
* plug-ins/Makefile.am: Added irbconsole.rb to the plugins list.
2006-07-28 Kevin Cozens <kcozens@cvs.gnome.org>
* configure.in: Changed minor version to an odd number (unstable
......
......@@ -4,7 +4,8 @@ pluginexecdir = $(GIMP_PLUGINDIR)
scripts = \
coolmetal-logo.rb \
sphere.rb
sphere.rb \
irbconsole.rb
test_scripts = \
test.rb
......
require 'gimp'
RubyFu.register(
'ruby-fu-console', #procedure name
'Starts an irb session in a console.', #blurb
nil, #help
nil, #author
nil, #copyright
nil, #date
'<Toolbox>/Xtns/Languages/Ruby-Fu/IRB Console', #menupath
nil, #image types
nil, #params
nil #results
) do
require 'irb'
require 'gimp_oo'
include Gimp
include PDB::Access
console = File.join(ENV['RUBYLIB'], 'ruby-fu-console')
$stdin = $stdout = open("|#{console}", 'w+')
ARGV.clear
IRB.setup(nil)
irb = IRB::Irb.new(nil, IRB::StdioInputMethod.new)
IRB.conf[:MAIN_CONTEXT] = irb.context
IRB.conf[:AUTO_INDENT] = true
IRB.conf[:USE_READLINE] = false
catch(:IRB_EXIT) do
irb.eval_input
end
nil
end
RubyFu.main
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment