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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/just-tmux.rb +9 -10
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13816c0431dbb5dc67e88aade297eb54c9c608b8
|
4
|
+
data.tar.gz: 09a64d8106ce2c0a17e23e35f972d98c16b34b8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
metadata.gz.sig
CHANGED
Binary file
|