bin/shellplay in shellplay-0.1.7 vs bin/shellplay in shellplay-0.1.8

- old
+ new

@@ -5,10 +5,12 @@ lib = File.expand_path('../../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +SHELL = ENV['SHELL'] + require 'shellplay/session' @session = Shellplay::Session.new @session.import(ARGV[0]) @@ -23,24 +25,23 @@ puts " h,? show help" puts " s list screens" puts " s# jump to screen #" puts " <enter> jump to next screen" puts " p jump to previous screen" - puts " <command> execute a subcommand in a bash -l -c" + puts " <command> execute a subcommand in a `$SHELL -c`" puts " x,q quit" puts end # generic display method # def display(screen) if screen.clearscreen - if ENV['TERM_PROGRAM'] = 'iTerm.app' + if ENV['TERM_PROGRAM'] == 'iTerm.app' print "\e]50;ClearScrollback\a" else - `clear` - print "\e[c" + print "\033c" end end if screen.displaycommand if screen.customprompt print screen.customprompt @@ -118,10 +119,10 @@ show($1) when '' shownext else begin - Open3.popen3(command.strip) do |i, o, e, t| + Open3.popen3(SHELL, "-c", command.strip) do |i, o, e, t| o.read.split("\n").each do |line| puts line sleep @sleeptime end e.read.split("\n").each do |line|