bin/shellrecord in shellplay-0.0.11 vs bin/shellrecord in shellplay-0.0.12
- old
+ new
@@ -91,11 +91,11 @@
'stderr' => '',
'timespent' => 0
})
else
start_time = Time.now
- Open3.popen3(command) do |i, o, e, t|
+ Open3.popen3("bash","-l", "-c", command) do |i, o, e, t|
screen = Shellplay::Screen.new
out = o.read
err = e.read
end_time = Time.now
elapsed = end_time - start_time
@@ -114,9 +114,12 @@
puts line
end
err.split("\n").each do |line|
puts Paint[line, :red]
end
+ end
+ if /^cd (.*)$/.match command
+ Dir.chdir($1)
end
end
session.next
end
end