lib/renote/cli/application.rb in renote-0.0.7 vs lib/renote/cli/application.rb in renote-0.1.0

- old
+ new

@@ -2,13 +2,19 @@ module Renote module Cli class Application < Thor - desc 'thru INFILE OUTFILE', 'Pass-through note taking records keyboard input to <OUTFILE> while synchronously displaying contents of <INFILE>.' - def thru(infile,outfile) - puts "IN #{infile}" - puts "OUT #{outfile}" + desc 'into <FILE>', 'Shell appends keyboard input to <FILE> until ESCAPE key is pressed.' + def into(target_file_path) + @shell = Renote::Models::Shell.new + open(target_file_path, 'a') { |handle| + @shell.open handle + while @shell.alive? + @shell.run + end + } + puts '' end end end end \ No newline at end of file