sesh 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/sesh +9 -7
  3. data/lib/sesh/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f875d6884e48fd74d94b5874863ec94dfd556b0
4
- data.tar.gz: d335a739f08b80202674a8f498ebd77df104d0e0
3
+ metadata.gz: 50d0337c695c990ec335062762013468a25119a3
4
+ data.tar.gz: 61b01a4d0b26b2800f823a18bdf92492610c6670
5
5
  SHA512:
6
- metadata.gz: 43d497088162f613abafb305bf4c2f2b4d84118b3860c67e5c9e314105e6e7a8e239e100e3fd70e4b7d4915ce7bb1a5818ae4e03da288a202973473827cd450a
7
- data.tar.gz: 91cba2d50854c5bed3ac149ff3af1cf7e7b45c982157fe55ac0193e28f7c3637ef28e1272ff1a7fa1b47a452a4a4fad94613a0af11f147e1e9f526c8181c8005
6
+ metadata.gz: ad89b3a4554eafea4dfee6afb22f38ef431a0e1c5d489b2f7360e06790dddbf793ad3b6ab86e58fb55b1eca663503f2a585794d0ecdebeb639882494663e0f71
7
+ data.tar.gz: 7bb6c2853b64a6986aaf713efca677fe188296f04d437c16235cc6022d9c0f4c00206f1f4e49c15ff1dd2333c5d482d72bc3c7de46722187bedb3306f9aa1cc9
data/bin/sesh CHANGED
@@ -86,13 +86,14 @@ def issue_server_stop_command!
86
86
  `pkill -f "#{project_name_matcher}"`
87
87
  end
88
88
 
89
- def connection_command(local=false)
89
+ def connection_command(local=false, addr=nil)
90
+ addr ||= @local_ssh_addr
90
91
  local_command = "tmux -S #{@socket} a"
91
92
  return local_command if local
92
- "ssh #{@local_ssh_addr} -t '#{local_command}'"
93
+ "ssh #{addr} -t '#{local_command}'"
93
94
  end
94
95
 
95
- def enter_slave_mode_command(local=false)
96
+ def enter_slave_mode_command(local=false, addr=nil)
96
97
  @term_app ||= get_term_app
97
98
  case @term_app
98
99
  when 'iTerm'
@@ -105,11 +106,11 @@ def enter_slave_mode_command(local=false)
105
106
  -e '#{tell_term_process} to keystroke \"n\" using command down' \
106
107
  -e 'delay 1' \
107
108
  -e "#{tell_term_app.gsub('"', '\\"')} to tell session -1 of current \
108
- terminal to write text \\"#{connection_command(local)}\\"" \
109
+ terminal to write text \\"#{connection_command(local, addr)}\\"" \
109
110
  -e '#{tell_term_process} to keystroke return using command down'
110
111
  BASH
111
112
  when 'Terminal'
112
- format_command connection_command(local)
113
+ format_command connection_command(local, addr)
113
114
  end
114
115
  end
115
116
 
@@ -192,11 +193,12 @@ if @command
192
193
  fatal "There are no Sesh projects currently running."
193
194
  end
194
195
  when 'connect'
196
+ addr = @remote_address
195
197
  if (is_local=@remote_address.nil?)
196
- @remote_address = @local_ssh_addr
198
+ addr = @local_ssh_addr
197
199
  fatal("Sesh project '#{@project_name}' is not running!") unless already_running?
198
200
  end
199
- command = enter_slave_mode_command(is_local)
201
+ command = enter_slave_mode_command(is_local, addr)
200
202
  puts `#{command}`.strip
201
203
  when 'enslave'
202
204
  fatal("Sesh project '#{@project_name}' is not running!") unless already_running?
data/lib/sesh/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sesh
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sesh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - MacKinley Smith