lib/hitcher/command_runner.rb in Hitcher-0.1.0 vs lib/hitcher/command_runner.rb in Hitcher-0.1.1

- old
+ new

@@ -1,19 +1,22 @@ require 'toolrack' require 'tempfile' +require_relative 'user_prompt' + module Hitcher module CommandRunner include Antrapol::ToolRack::ConditionUtils + include Hitcher::UserPrompt # functions to assist in running a command line app class TerminalNotDefined < StandardError; end def run_in_new_terminal(cmd, &block) term = Hitcher::Global.instance.config.terminal if not_empty?(term) - puts cmd + notice "Command to run in new terminal app: #{cmd}" #tf = Tempfile.new #File.open(tf,"w") do |f| # f.write "#!/bin/sh" # f.write cmd # f.write "read -p \"Any key\""