Sha256: ef35bc1676b1c73d4f5be6c21538c923d5e3cfbbe99f6a0823318612dc6fcb13

Contents?: true

Size: 841 Bytes

Versions: 2

Compression:

Stored size: 841 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require 'bundler/setup'
require 'net/ssh/cli'

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.

# (If you use this, don't forget to add pry to your Gemfile!)
# require "pry"
# Pry.start

require 'irb'

def reload!
  load __FILE__
end

$CLI = nil
begin
  $CLI = Net::SSH::CLI::Channel.new(host: 'localhost', user: ENV['USER'], default_prompt: '@')
  $CLI.open_channel
  puts "\nPUTS #{$CLI.read}"
  sleep 0.3
  puts "\nPUTS #{$CLI.read}"
  puts "\nPUTS #{$CLI.write "\n"}"
  puts "\nPUTS TILL #{$CLI.read_till}"
  puts "try $CLI.cmd"
  puts File.read(__FILE__)
rescue StandardError => error
  puts error.class
  puts error.message
  puts error.backtrace
ensure
  IRB.start(__FILE__)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
net-ssh-cli-0.2.0 bin/localhost
net-ssh-cli-0.1.0 bin/localhost