sesh 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/sesh +9 -7
- data/lib/sesh/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50d0337c695c990ec335062762013468a25119a3
|
4
|
+
data.tar.gz: 61b01a4d0b26b2800f823a18bdf92492610c6670
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 #{
|
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
|
-
|
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