Sha256: a6da29e295506c2b7b1cc1f7547cc2a1c94db8476aa3c931a7f04e115f9531f3

Contents?: true

Size: 540 Bytes

Versions: 23

Compression:

Stored size: 540 Bytes

Contents

#!/usr/bin/env ruby
require 'tempfile'
require 'readline'
include Readline

$:.unshift '.', '..', 'lib', File.join('..','lib')
require 'session'

idl = Session::IDL.new

n = 0
loop do
  command = readline("#{ n }: IDL_WRAP > ", true) 
  if command =~ /^\s*\!*history\!*\s*$/
    open('idl_wrap.history','w'){|f| f.puts idl.history}
    next
  end
  exit if command =~ /^\s*exit\s*$/io

  out, err = idl.execute command
  out ||= ''
  err ||= ''
  printf "STDOUT:\n%s\nSTDERR:\n%s\n", out.gsub(%r/^/,"\t"), err.gsub(%r/^/,"\t")
  n += 1
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
session-3.2.0 sample/session_idl.rb
session-3.1.2 sample/session_idl.rb
session-3.1.1 sample/session_idl.rb
redcar-0.5.1 plugins/runnables/vendor/session/sample/session_idl.rb
redcar-0.5 plugins/runnables/vendor/session/sample/session_idl.rb
redcar-0.5.6dev plugins/runnables/vendor/session/sample/session_idl.rb
redcar-0.5.5dev plugins/runnables/vendor/session/sample/session_idl.rb
redcar-0.5.4dev plugins/runnables/vendor/session/sample/session_idl.rb
redcar-0.5.3dev plugins/runnables/vendor/session/sample/session_idl.rb
redcar-0.5.2dev plugins/runnables/vendor/session/sample/session_idl.rb
redcar-0.5.1dev plugins/runnables/vendor/session/sample/session_idl.rb
redcar-0.4.1 plugins/runnables/vendor/session/sample/session_idl.rb
redcar-0.4 plugins/runnables/vendor/session/sample/session_idl.rb
redcar-0.3.10.1dev plugins/runnables/vendor/session/sample/session_idl.rb
redcar-0.3.10.0dev plugins/runnables/vendor/session/sample/session_idl.rb
redcar-0.3.9 plugins/runnables/vendor/session-2.4.0/sample/session_idl.rb
redcar-0.3.9.0dev plugins/runnables/vendor/session-2.4.0/sample/session_idl.rb
redcar-0.3.8.4 plugins/runnables/vendor/session-2.4.0/sample/session_idl.rb
redcar-0.3.8.3 plugins/runnables/vendor/session-2.4.0/sample/session_idl.rb
redcar-0.3.8.2 plugins/runnables/vendor/session-2.4.0/sample/session_idl.rb