Sha256: 23cdd7cb5e2a449c03dcced40942827d381195d5a751f9686974801329f70307

Contents?: true

Size: 533 Bytes

Versions: 23

Compression:

Stored size: 533 Bytes

Contents

#!/usr/bin/env ruby
require 'tempfile'

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

shell = Session::Shell.new :history => false

shell.execute('ls -ltar') do |out, err|
  if out
    puts "OUT:\n#{ out }"
  elsif err
    puts "ERR:\n#{ err }"
  end
end
puts shell.history

shell.outproc = lambda{|out| puts "OUT:\n#{ out }"}
shell.errproc = lambda{|err| puts "ERR:\n#{ err }"}
#shell.execute('ls -1')
#shell.execute('ls no-exit')
shell.execute('while test 1; do echo `date` && ls no-exist; sleep 1; done')

Version data entries

23 entries across 23 versions & 2 rubygems

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