sesh 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/sesh/cli.rb +1 -0
- data/lib/sesh/tmux_control.rb +4 -3
- 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: 6b5f1db52bde7aeb52c772263c225b37bc313853
|
4
|
+
data.tar.gz: fc33dfa2ff73a5222da0adebabf3b853a1831769
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23390a6b2979915e6c802cfd4a2e6b3f98047e57ab08bbbc5d62b9f9d576a3651d421937d9d3051d3feb7978f6101a352440bd1c1397f4bd2380762d0a59d56c
|
7
|
+
data.tar.gz: eff0a26db44e6ed23c023a8d3f8c428c932f8ef9ae6b9f9442aeda95e6704cdcadab2ee32bfd5ba41c4471e1c0eac49182389a754b8c786d8eeecb3c5f779401
|
data/Gemfile.lock
CHANGED
data/lib/sesh/cli.rb
CHANGED
data/lib/sesh/tmux_control.rb
CHANGED
@@ -18,7 +18,7 @@ module Sesh
|
|
18
18
|
# `ps aux | grep "#{project_name_matcher}"`.strip.length > 0 end
|
19
19
|
|
20
20
|
def project_name_matcher
|
21
|
-
"[t]mux
|
21
|
+
"[t]mux.*#{Regexp.escape(@project)}.*"
|
22
22
|
end
|
23
23
|
# pn = @project.gsub '-', '\-'
|
24
24
|
# "[t]mux.*[#{pn[0]}]#{pn[1..-1]}" end
|
@@ -26,14 +26,15 @@ module Sesh
|
|
26
26
|
def issue_start_command!
|
27
27
|
# Add bundle exec to the sesh begin command for dev purposes.
|
28
28
|
cmd = Sesh.format_command <<-BASH
|
29
|
-
tmux -S "#{@options[:socket_file]}" new-session -d "eval \\"\$SHELL -l -c 'rvm use default; sesh begin'\\"" 2>&1
|
29
|
+
tmux -S "#{@options[:socket_file]}" new-session -d "eval \\"\$SHELL -l -c 'rvm use default; sesh begin #{@project}'\\"" 2>&1
|
30
30
|
BASH
|
31
31
|
output = `#{cmd}`.strip
|
32
32
|
return true if $? && output.length == 0
|
33
33
|
Logger.warn "Tmux failed to start with the following error: #{output}"; false
|
34
34
|
end
|
35
35
|
|
36
|
-
def issue_stop_command!;
|
36
|
+
def issue_stop_command!;
|
37
|
+
`pkill -f "[t]mux .*#{Regexp.escape(@project)}"` end
|
37
38
|
|
38
39
|
def connection_command; "tmux -S #{@options[:socket_file]} a" end
|
39
40
|
|
data/lib/sesh/version.rb
CHANGED