tmuxinator 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +4 -4
- data/lib/tmuxinator/assets/template.erb +7 -3
- data/lib/tmuxinator/project.rb +11 -3
- data/lib/tmuxinator/version.rb +1 -1
- data/spec/lib/tmuxinator/project_spec.rb +24 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d39dfeb0a8545d2a350baa90a8e10d955fca6cce
|
4
|
+
data.tar.gz: 6a65bf9c56691ca61b97fdf8a83273b5e77237e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da7b46dcb158ab71ac91c40f944b22a657ccb20091a5c8895db1d79a087416f1c81967693e371b883fad2f3fc880885fbc5b561d042422a136b888d0e52f2d2d
|
7
|
+
data.tar.gz: 41ffd48199849fb16c7b777bd451b8e36446379858236bbac9a3b40a9442c029ab6bb6dd1a76c3d686fbc04ff2f7cfa4d804a667a8162d11a779c7d55d6711ac
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 0.6.3
|
2
|
+
- Remove stray pry #128
|
3
|
+
- Allow starting a tmuxinator project while inside a tmux session #130
|
4
|
+
- Set the tmux layout after pane creation to avoid pane too small errors #131
|
5
|
+
- Check for both pane-base-index and base-index #126
|
6
|
+
|
1
7
|
## 0.6.2
|
2
8
|
- Also pass command line options to the `base_index` lookup.
|
3
9
|
- Fixed bug #116.
|
data/README.md
CHANGED
@@ -36,7 +36,7 @@ Download the appropriate completion file from the repo.
|
|
36
36
|
|
37
37
|
Add the following to your `~/.bashrc`:
|
38
38
|
|
39
|
-
source `which tmuxinator.
|
39
|
+
source `which tmuxinator.bash`
|
40
40
|
|
41
41
|
### zsh
|
42
42
|
|
@@ -112,7 +112,7 @@ or [specify your own](http://stackoverflow.com/a/9976282/183537).
|
|
112
112
|
This will fire up tmux with all the tabs and panes you configured.
|
113
113
|
|
114
114
|
``` bash
|
115
|
-
$
|
115
|
+
$ tmuxinator start [project]
|
116
116
|
```
|
117
117
|
|
118
118
|
## Shorthand
|
@@ -125,10 +125,10 @@ $ mux [command]
|
|
125
125
|
|
126
126
|
## Interpreter Managers & Environment Variables
|
127
127
|
|
128
|
-
To use tmuxinator with rbenv, RVM, NVM etc, use the `
|
128
|
+
To use tmuxinator with rbenv, RVM, NVM etc, use the `pre_window` option.
|
129
129
|
|
130
130
|
```
|
131
|
-
|
131
|
+
pre_window: rbenv shell 2.0.0-p247
|
132
132
|
```
|
133
133
|
|
134
134
|
These commands will run before any pane or window.
|
@@ -8,7 +8,7 @@ if [ "$?" -eq 1 ]; then
|
|
8
8
|
<%= pre %>
|
9
9
|
|
10
10
|
# Create the session and the first window.
|
11
|
-
<%= tmux %> new-session -d -s <%= name %> -n <%= windows.first.name %>
|
11
|
+
TMUX= <%= tmux %> new-session -d -s <%= name %> -n <%= windows.first.name %>
|
12
12
|
|
13
13
|
# Set the default path.
|
14
14
|
<%= tmux %> set-option -t <%= name %> default-path <%= root -%> 1>/dev/null
|
@@ -33,10 +33,10 @@ if [ "$?" -eq 1 ]; then
|
|
33
33
|
<%- unless pane.last? -%>
|
34
34
|
<%= pane.tmux_split_command %>
|
35
35
|
<%- end -%>
|
36
|
+
<%= window.tmux_layout_command %>
|
36
37
|
<%- end -%>
|
37
38
|
|
38
39
|
|
39
|
-
<%= window.tmux_layout_command %>
|
40
40
|
<%= window.tmux_select_first_pane %>
|
41
41
|
<%- end -%>
|
42
42
|
<%- end -%>
|
@@ -44,4 +44,8 @@ if [ "$?" -eq 1 ]; then
|
|
44
44
|
<%= tmux %> select-window -t <%= base_index %>
|
45
45
|
fi
|
46
46
|
|
47
|
-
|
47
|
+
if [ -z "$TMUX" ]; then
|
48
|
+
<%= tmux %> -u attach-session -t <%= name %>
|
49
|
+
else
|
50
|
+
<%= tmux %> -u switch-client -t <%= name %>
|
51
|
+
fi
|
data/lib/tmuxinator/project.rb
CHANGED
@@ -83,16 +83,16 @@ module Tmuxinator
|
|
83
83
|
|
84
84
|
def tmux_options
|
85
85
|
if cli_args?
|
86
|
-
" #{yaml["cli_args"].strip}"
|
86
|
+
" #{yaml["cli_args"].to_s.strip}"
|
87
87
|
elsif tmux_options?
|
88
|
-
" #{yaml["tmux_options"].strip}"
|
88
|
+
" #{yaml["tmux_options"].to_s.strip}"
|
89
89
|
else
|
90
90
|
""
|
91
91
|
end
|
92
92
|
end
|
93
93
|
|
94
94
|
def base_index
|
95
|
-
|
95
|
+
get_pane_base_index.present? ? get_pane_base_index.to_i : get_base_index.to_i
|
96
96
|
end
|
97
97
|
|
98
98
|
def tmux_options?
|
@@ -138,5 +138,13 @@ module Tmuxinator
|
|
138
138
|
deprecations << "DEPRECATION: The cli_args option has been replaced by the tmux_options option and will not be supported in 0.8.0." if yaml["cli_args"].present?
|
139
139
|
deprecations
|
140
140
|
end
|
141
|
+
|
142
|
+
def get_pane_base_index
|
143
|
+
`#{tmux} start-server\\; show-option -g | grep pane-base-index`.split(/\s/).last
|
144
|
+
end
|
145
|
+
|
146
|
+
def get_base_index
|
147
|
+
`#{tmux} start-server\\; show-option -g | grep base-index`.split(/\s/).last
|
148
|
+
end
|
141
149
|
end
|
142
150
|
end
|
data/lib/tmuxinator/version.rb
CHANGED
@@ -135,6 +135,30 @@ describe Tmuxinator::Project do
|
|
135
135
|
end
|
136
136
|
end
|
137
137
|
|
138
|
+
describe "#base_index" do
|
139
|
+
context "pane base index present" do
|
140
|
+
before do
|
141
|
+
project.stub(:get_pane_base_index => "1")
|
142
|
+
project.stub(:get_base_index => "1")
|
143
|
+
end
|
144
|
+
|
145
|
+
it "gets the pane base index" do
|
146
|
+
expect(project.base_index).to eq 1
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
context "pane base index no present" do
|
151
|
+
before do
|
152
|
+
project.stub(:get_pane_base_index => nil)
|
153
|
+
project.stub(:get_base_index => "0")
|
154
|
+
end
|
155
|
+
|
156
|
+
it "gets the base index" do
|
157
|
+
expect(project.base_index).to eq 0
|
158
|
+
end
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
138
162
|
describe "#window" do
|
139
163
|
it "gets the window and index for tmux" do
|
140
164
|
expect(project.window(1)).to eq "sample:1"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tmuxinator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Allen Bargi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|