lib/ec2ssh/cli.rb in ec2ssh-2.0.6 vs lib/ec2ssh/cli.rb in ec2ssh-2.0.7

- old
+ new

@@ -81,13 +81,26 @@ puts hl.color(str, col) end end def merge_sections(config) - section_str = hosts.map { |h| <<-END }.join + ssh_options = dotfile['ssh_options'] + + section_str = hosts.map { |h| + section = <<-END Host #{h[:host]} HostName #{h[:dns_name]} - END + END + + unless ssh_options.nil? + ssh_options.each {|line| + section << " #{line}\n" + } + end + + section + }.join + config.sections[options.aws_key] ||= SshConfig::Section.new( options.aws_key, section_str )