Sha256: 04f88b6bb15b720d9bfdd4bc8d245c625b8d68651fb894ce768228862808b04d
Contents?: true
Size: 677 Bytes
Versions: 2
Compression:
Stored size: 677 Bytes
Contents
#!/usr/bin/env ruby require 'hss' My_Handler = HSS::Handler.new ENV['HSS_CONFIG'] if ARGV == ['version'] puts HSS::Version exit elsif ARGV == ['help'] or ARGV.empty? puts 'How to use:' puts '(what you type) -> (where it takes you)' My_Handler.patterns.each { |pattern| puts pattern['example'] } exit end Short_Host = ARGV.delete_at( ARGV.find_index { |x| x[0, 1] != '-' } || 0 ) Args = ARGV.inject('') { |memo, obj| memo += " '" + obj.gsub(/([$"])/, '\1') + "'" } Command = (ENV.include? 'HSS_DEBUG') ? 'echo ssh' : 'ssh' Long_Host = My_Handler.handle Short_Host $stdout.syswrite "\033]0;#{Short_Host}\007" exec "#{Command} #{Long_Host} #{Args}"
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hss-0.2.2 | bin/hss |
hss-0.2.0 | bin/hss |