Class: Tweemux::Action::At
- Inherits:
-
Tweemux::Action
- Object
- Tweemux::Action
- Tweemux::Action::At
- Defined in:
- lib/tweemux/action/at.rb
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from Tweemux::Action
#call, colorize_tmux_command, explain, #explained_run, explained_run, #explained_run_as, explained_run_as, highlight_command, highlight_explanation, #initialize, load_all!, pseudo_restarts, system_or_raise, tmux_S, #tmux_S
Constructor Details
This class inherits a constructor from Tweemux::Action
Instance Method Details
#run(args) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/tweemux/action/at.rb', line 2 def run args host, port = args cmd = 'ssh', host if port cmd.push '-p'+port port_parens = " (on port #{port})" end forced_path_for_osx_people = 'PATH=/usr/local/bin:/usr/bin' explained_run cmd + [ '-t', forced_path_for_osx_people, 'tmux', '-2uS', Tweemux::SOCK, 'attach', ], "Connect to #{host}#{port_parens}, demand a pty, then attach to session" end |