Module: EacRubyUtils::Envs::SshEnv::Terminal

Extended by:
ActiveSupport::Concern
Defined in:
lib/eac_ruby_utils/envs/ssh_env/terminal.rb

Instance Method Summary collapse

Instance Method Details

#ssh_command_line_terminal_args(value) ⇒ Object



21
22
23
24
25
26
27
28
29
30
# File 'lib/eac_ruby_utils/envs/ssh_env/terminal.rb', line 21

def ssh_command_line_terminal_args(value)
  self.class.lists.terminal_option.value_validate!(value)
  case value
  when TERMINAL_OPTION_AUTO then ENV['TERM'].present? ? %w[-t] : []
  when TERMINAL_OPTION_DISABLE then ['-T']
  when TERMINAL_OPTION_ENABLE then ['-t']
  when TERMINAL_OPTION_FORCE then ['-tt']
  else raise "Invalid conditional branch: #{value}"
  end
end