Class: FortMux::Cli

Inherits:
Thor
  • Object
show all
Defined in:
bin/fortmux

Instance Method Summary collapse

Instance Method Details

#listObject



35
36
37
38
39
40
41
42
# File 'bin/fortmux', line 35

def list
  config_files = FortMux::config_files
  if config_files.length == 0
    puts "No config files."
  else
    config_files.sort.each {|c| puts c}
  end
end

#load(config_name = nil) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'bin/fortmux', line 19

def load(config_name=nil)
  if config_name
    FortMux::Log::logger "fortmux load #{config_name} execute=#{options.execute?} log=#{options.log?}"
    FortMux::Log::off unless options.log?
    begin
      FortMux::load config_name, :execute => options.execute?
    rescue => ex
      puts ex.message
      FortMux::Log::logger ex.message
    end
  else
    help
  end
end

#statusObject



45
46
47
48
49
# File 'bin/fortmux', line 45

def status
  tmux_status = FortMux::Status.new
  puts "tmux status"
  PP.pp tmux_status.sessions
end