just-tmux 0.1.5 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b2663dc0514879fe37b324203123547057bdf4e5
4
- data.tar.gz: 94fd740ffe85d4ec5a2579a95ddf24a41b872f3a
3
+ metadata.gz: 13816c0431dbb5dc67e88aade297eb54c9c608b8
4
+ data.tar.gz: 09a64d8106ce2c0a17e23e35f972d98c16b34b8e
5
5
  SHA512:
6
- metadata.gz: 79ed2046f2782afeac9dc59eb3641cc3b8a90c3da1010015c4cd1f45a8e257e6ef2ea59c4e548d2ce7bf0429d5c81c98b4c04e288fd8a2ee2878f19bda450c3f
7
- data.tar.gz: 84b2a09a31677e50e52d8ec4d168e52d29b9ec2c3676a591baee36089b623ee3c8ec74aa6d339da0e60b20c0efd1c569fbbf050aff54ec41c2a33944157927cc
6
+ metadata.gz: cd3abb8142dfb270922be641f927915ea8ac0c426abb6331a9763fd8eb433835d2b3f36800a17a0ebbb511a5bd3ca53d8e86946b1828306df5a2385acebbfa6a
7
+ data.tar.gz: 74f0a4ed196e9f3ff2cdbf3464bb2d344f2ae8282a6417a6b0b97775608918f3b9ac3afbeb47780574683377666f1ab3cbee85c655b3574b089c2e6496e225f4
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/just-tmux.rb CHANGED
@@ -8,7 +8,7 @@ class JustTmux
8
8
 
9
9
  attr_reader :to_s
10
10
 
11
-
11
+
12
12
  # example raw dynarex file:
13
13
  #
14
14
  # config=<<EOF
@@ -34,7 +34,6 @@ class JustTmux
34
34
  x[:dir] = default_dir if x[:dir].empty?
35
35
  x
36
36
  end
37
-
38
37
 
39
38
  @to_s = new_session(session_name, h[0][:name], shell,
40
39
  "cd #{h[0][:dir]} && " + h[0][:command]) + h[1..-1].map \
@@ -45,15 +44,15 @@ class JustTmux
45
44
 
46
45
  private
47
46
 
48
- def new_window(window_name, shell, command)
49
- "tmux new-window -n %s %s\ntmux send-keys '%s' Enter\n" %
50
- [window_name, shell, command]
51
- end
52
-
53
47
  def new_session(session_name, window_name, shell, command)
54
- r = "tmux new-session -d -s %s -n %s '%s'\n" %
55
- [session_name, window_name, shell]
56
- r + "tmux send-keys '%s' Enter\n" % [command]
48
+ "tmux new-session -d -s %s -n %s '%s'\n%s" %
49
+ [session_name, window_name, shell, send_keys(command)]
57
50
  end
51
+
52
+ def new_window(window_name, shell, command)
53
+ "tmux new-window -n %s %s\n%s" % [window_name, shell, send_keys(command)]
54
+ end
55
+
56
+ def send_keys(command) "tmux send-keys '%s' Enter\n" % command end
58
57
 
59
58
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: just-tmux
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file