lib/hss in hss-0.1.4 vs lib/hss in hss-0.1.5
- old
+ new
@@ -27,11 +27,11 @@
puts 'No config file found'
exit 1
end
Conf = open(possible_paths[0]) { |file| YAML.load(file.read) }
-Input = ARGV.pop
+Input = ARGV.shift
Args = ARGV.join(' ')
if Input.nil? or Input == 'help'
puts 'How to use:'
puts '(what you type) -> (where it takes you)'
@@ -39,10 +39,10 @@
else
Conf['patterns'].each do |pattern|
next unless Input.match(pattern['short'])
long_form = eval '"' + pattern['long'] + '"'
#long_form = ERB.new('<%= "' + pattern['long'] + '" %>').result
- exec "ssh #{Args} #{long_form}"
+ exec "ssh #{long_form} #{Args}"
end
end
puts "Couldn't find a matching host for: #{Input}"
exit 1