33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# File 'bin/i2cssh', line 33
def set_options(config_hash, login_override=nil)
if config_hash["columns"] and config_hash["rows"] then
puts "CONFIG ERROR: rows and columns can't be used a the same time"
exit 1
end
[:broadcast, :profile, :rank, :iterm2, :login_override, :columns, :rows, :sleep, :direction].each do |p|
@i2_options[p] = config_hash[p.to_s].nil? ? @i2_options[p] : config_hash[p.to_s]
end
@i2_options[:login_override] = login_override if login_override
@i2_options[:direction] ||= :column
@i2_options[:direction] = @i2_options[:direction].to_sym
@ssh_environment.merge!(config_hash["environment"].inject({}){|m, v| m.merge(v)}) if config_hash["environment"]
end
|