def join
      commands = []

      @history.each do |command|
        program = command[0]
        arguments = command[1..-1].map { |word| shellescape(word.to_s) }

        commands << [program, *arguments].join(' ')
      end

      return commands.join(' && ')
    end
def join
      commands = []

      @history.each do |command|
        program = command[0]
        arguments = command[1..-1].map { |word| shellescape(word.to_s) }

        commands << [program, *arguments].join(' ')
      end

      return commands.join(' && ')
    end
Joins the command history together with ` && `, to form a
 single command.

 @return [String]
   A single command string.