Module: Tmuxinator::Util

Includes:
Thor::Actions
Included in:
Cli, Project, Project, Window
Defined in:
lib/tmuxinator/util.rb

Instance Method Summary collapse

Instance Method Details

#current_session_nameObject



16
17
18
# File 'lib/tmuxinator/util.rb', line 16

def current_session_name
  `[[ -n "${TMUX+set}" ]] && tmux display-message -p "#S"`.strip
end

#exit!(msg) ⇒ Object



7
8
9
10
# File 'lib/tmuxinator/util.rb', line 7

def exit!(msg)
  puts msg
  Kernel.exit(1)
end

#yes_no(condition) ⇒ Object



12
13
14
# File 'lib/tmuxinator/util.rb', line 12

def yes_no(condition)
  condition ? say("Yes", :green) : say("No", :red)
end