tmuxinator 0.6.4 → 0.6.5
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/.gitignore +1 -0
- data/CHANGELOG.md +11 -0
- data/CONTRIBUTING.md +13 -0
- data/LICENSE +1 -1
- data/README.md +99 -77
- data/bin/mux +8 -2
- data/bin/tmuxinator +8 -2
- data/completion/tmuxinator.bash +1 -1
- data/lib/tmuxinator/assets/sample.yml +18 -28
- data/lib/tmuxinator/cli.rb +5 -5
- data/lib/tmuxinator/config.rb +1 -1
- data/lib/tmuxinator/version.rb +1 -1
- data/spec/fixtures/sample.deprecations.yml +0 -1
- data/spec/lib/tmuxinator/config_spec.rb +2 -2
- 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: 6d9d7fb728f65009f6058f0810d48d28bbea8d78
|
4
|
+
data.tar.gz: 428a7e368197fdad498e10ba1af3fd63d4bdabd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8ac28cc11f7a1ec80ec1a832d67d7a786e98d13396dbef493b6e5ea003a48822c4a55a23dac74d7a204875232013ec10d279a6872079673ae9170da76e1f328
|
7
|
+
data.tar.gz: 7889d60c7f2071f6c267bec80c7d13e6bc734bc991e154c530c3b230a742452b1674110ad1cee6e455ec02ac1ca98565fbcef1dad9f70e42be370a7ab9a0f507
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
## 0.6.5
|
2
|
+
- Change deprecation continue message from any key to just the enter key
|
3
|
+
- Dramatically clean up the readme to be clearer for new users
|
4
|
+
- Update the contributing guide with references to the GitHub styleguide and add examples of how to leave good commit messages
|
5
|
+
- Use Erubis to render the project sample and fix a bad binding reference
|
6
|
+
- Update the sample project to be much simpler
|
7
|
+
- Fix not working delete command #142
|
8
|
+
- Fix an error in the bash completion script
|
9
|
+
- Fix an issue where the wrong project path was being returned
|
10
|
+
- Fix an issue where command aliases were being ignored
|
11
|
+
|
1
12
|
## 0.6.4
|
2
13
|
- Fixes broken backwards compatibility of multiple pre commands #129
|
3
14
|
- Fixes tmuxinator ignoring project root when started from within a tmux session #132
|
data/CONTRIBUTING.md
CHANGED
@@ -19,6 +19,8 @@
|
|
19
19
|
If you've gone the extra mile and have a patch that fixes the issue, you
|
20
20
|
should submit a Pull Request!
|
21
21
|
|
22
|
+
* Please follow the [GitHub Styleguide](https://github.com/styleguide/ruby) for
|
23
|
+
Ruby in both implementation and tests!
|
22
24
|
* Fork the repo on Github.
|
23
25
|
* Create a topic branch from where you want to base your work.
|
24
26
|
* Add a test for your change. Only refactoring and documentation changes
|
@@ -26,4 +28,15 @@ should submit a Pull Request!
|
|
26
28
|
we need a test!
|
27
29
|
* Run _all_ the tests to assure nothine else was broken. We only take pull requests with passing tests.
|
28
30
|
* Check for unnecessary whitespace with `git diff --check` before committing.
|
31
|
+
* Structure your commit messages like this:
|
32
|
+
|
33
|
+
```
|
34
|
+
Summarize clearly in one line what the commit is about
|
35
|
+
|
36
|
+
Describe the problem the commit solves or the use
|
37
|
+
case for a new feature. Justify why you chose
|
38
|
+
the particular solution.
|
39
|
+
```
|
40
|
+
|
41
|
+
* Use "fix", "add", "change" instead of "fixed", "added", "changed" in your commit messages.
|
29
42
|
* Push to your fork and submit a pull request.
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -4,183 +4,205 @@
|
|
4
4
|
|
5
5
|
Create and manage tmux sessions easily.
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-

|
7
|
+

|
10
8
|
|
11
9
|
## Installation
|
12
10
|
|
13
|
-
```
|
14
|
-
|
11
|
+
```
|
12
|
+
gem install tmuxinator
|
15
13
|
```
|
16
14
|
|
17
15
|
## Editor and Shell
|
18
16
|
|
19
|
-
tmuxinator uses your shell's default editor for opening files.
|
17
|
+
tmuxinator uses your shell's default editor for opening files. If you're not
|
20
18
|
sure what that is type:
|
21
19
|
|
22
20
|
``` bash
|
23
|
-
|
21
|
+
echo $EDITOR
|
24
22
|
```
|
25
23
|
|
26
|
-
For me that produces "vim" If you want to change your default editor
|
24
|
+
For me that produces "vim" If you want to change your default editor simply
|
27
25
|
put a line in ~/.bashrc that changes it. Mine looks like this:
|
28
26
|
|
29
|
-
```
|
27
|
+
```
|
30
28
|
export EDITOR='vim'
|
31
29
|
```
|
32
30
|
|
31
|
+
## tmux
|
32
|
+
|
33
|
+
The recommended version of tmux to use is 1.8. You're mileage may vary for
|
34
|
+
earlier versions. Refer to the FAQ for any odd behaviour.
|
35
|
+
|
36
|
+
### base-index
|
37
|
+
|
38
|
+
If you use a `base-index` other than the default, please be sure to also set the `pane-base-index`
|
39
|
+
|
40
|
+
```
|
41
|
+
set-window-option -g pane-base-index 1
|
42
|
+
```
|
43
|
+
|
33
44
|
## Completion
|
34
45
|
|
35
|
-
Download the appropriate completion file from the repo.
|
46
|
+
Download the appropriate completion file from the repo and `source` the file.
|
47
|
+
The following are example where the completion file has been downloaded into
|
48
|
+
`~/.bin`.
|
36
49
|
|
37
50
|
### bash
|
38
51
|
|
39
52
|
Add the following to your `~/.bashrc`:
|
40
53
|
|
41
|
-
source
|
54
|
+
source ~/.bin/tmuxinator.bash
|
42
55
|
|
43
56
|
### zsh
|
44
57
|
|
45
58
|
Add the following to your `~/.zshrc`:
|
46
59
|
|
47
|
-
source
|
60
|
+
source ~/.bin/tmuxinator.zsh
|
48
61
|
|
49
62
|
## Usage
|
50
63
|
|
64
|
+
A working knowledge of tmux is assumed. You should understand what window and
|
65
|
+
panes are in tmux. If not please consult the [man pages](http://manpages.ubuntu.com/manpages/precise/en/man1/tmux.1.html#contenttoc6) for tmux.
|
66
|
+
|
51
67
|
### Create a project
|
52
68
|
|
53
69
|
Create or edit your projects with:
|
54
70
|
|
55
|
-
```
|
56
|
-
|
71
|
+
```
|
72
|
+
tmuxinator new [project]
|
57
73
|
```
|
58
74
|
|
59
75
|
For editing you can also use `tmuxinator open [project]`. `new` is aliased to
|
60
76
|
`o`,`open` and `n`. Your default editor (`$EDITOR`) is used to open the file.
|
61
77
|
If this is a new project you will see this default config:
|
62
78
|
|
63
|
-
```
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
79
|
+
```yaml
|
80
|
+
# ~/.tmuxinator/sample.yml
|
81
|
+
|
82
|
+
name: sample
|
83
|
+
root: ~/
|
84
|
+
|
85
|
+
# Optional. tmux socket
|
86
|
+
# socket_name: foo
|
87
|
+
|
88
|
+
# Runs before everything. Use it to start daemons etc.
|
89
|
+
# pre: sudo /etc/rc.d/mysqld start
|
90
|
+
|
91
|
+
# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions.
|
92
|
+
# pre_window: rbenv shell 2.0.0-p247
|
93
|
+
|
94
|
+
# Pass command line options to tmux. Useful for specifying a different tmux.conf.
|
95
|
+
# tmux_options: -f ~/.tmux.mac.conf
|
96
|
+
|
70
97
|
windows:
|
71
98
|
- editor:
|
72
99
|
layout: main-vertical
|
73
100
|
panes:
|
74
101
|
- vim
|
75
|
-
-
|
76
|
-
|
77
|
-
- shell: git pull
|
78
|
-
- database: rails db
|
79
|
-
- server: rails s
|
102
|
+
- guard
|
103
|
+
- server: bundle exec rails s
|
80
104
|
- logs: tail -f logs/development.log
|
81
|
-
- console: rails c
|
82
|
-
- capistrano:
|
83
|
-
- server: ssh me@myhost
|
84
105
|
```
|
85
106
|
|
86
|
-
|
87
|
-
If you want to have your own default config, place it into
|
88
|
-
`$HOME/.tmuxinator/default.yml`
|
107
|
+
## Windows
|
89
108
|
|
90
|
-
The
|
91
|
-
|
92
|
-
|
109
|
+
The windows option allows the specfication of any number of tmux windows. Each window is denoted by a YAML array entry, followed by a name
|
110
|
+
and command to be run.
|
111
|
+
|
112
|
+
```
|
113
|
+
windows:
|
114
|
+
- editor: vim
|
115
|
+
```
|
93
116
|
|
94
|
-
## Panes
|
117
|
+
## Panes
|
95
118
|
|
96
|
-
|
119
|
+
Panes are optional and are children of window entries, but unlike windows, they do not need a name. In the following example, the `editor` window has 2 panes, one running vim, the other guard.
|
97
120
|
|
98
|
-
```
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
121
|
+
```yaml
|
122
|
+
windows:
|
123
|
+
- editor:
|
124
|
+
layout: main-vertical
|
125
|
+
panes:
|
126
|
+
- vim
|
127
|
+
- guard
|
105
128
|
```
|
106
129
|
|
107
130
|
The layout setting gets handed down to tmux directly, so you can choose from
|
108
|
-
one of [the five standard
|
109
|
-
layouts](http://manpages.ubuntu.com/manpages/precise/en/man1/tmux.1.html#contenttoc6)
|
131
|
+
one of [the five standard layouts](http://manpages.ubuntu.com/manpages/precise/en/man1/tmux.1.html#contenttoc6)
|
110
132
|
or [specify your own](http://stackoverflow.com/a/9976282/183537).
|
111
133
|
|
112
|
-
##
|
134
|
+
## Interpreter Managers & Environment Variables
|
113
135
|
|
114
|
-
|
136
|
+
To use tmuxinator with rbenv, RVM, NVM etc, use the `pre_window` option.
|
115
137
|
|
116
|
-
```
|
117
|
-
|
138
|
+
```
|
139
|
+
pre_window: rbenv shell 2.0.0-p247
|
118
140
|
```
|
119
141
|
|
120
|
-
|
142
|
+
These command(s) will run before any subsequent commands in all panes and windows.
|
121
143
|
|
122
|
-
You can also use this shorthand alias for tmuxinator
|
123
144
|
|
124
|
-
|
125
|
-
|
145
|
+
## Starting a session
|
146
|
+
|
147
|
+
This will fire up tmux with all the tabs and panes you configured.
|
148
|
+
|
149
|
+
```
|
150
|
+
tmuxinator start [project]
|
126
151
|
```
|
127
152
|
|
128
|
-
##
|
153
|
+
## Shorthand
|
129
154
|
|
130
|
-
|
155
|
+
An shorthand alias for tmuxinator can also be used.
|
131
156
|
|
132
157
|
```
|
133
|
-
|
158
|
+
mux [command]
|
134
159
|
```
|
135
160
|
|
136
|
-
These commands will run before any pane or window.
|
137
|
-
|
138
161
|
## Other Commands
|
139
162
|
|
140
163
|
Copy an existing project. Aliased to `c` and `cp`
|
141
|
-
```
|
142
|
-
|
164
|
+
```
|
165
|
+
tmuxinator copy [existing] [new]
|
143
166
|
```
|
144
167
|
|
145
168
|
List all the projects you have configured. Aliased to `l` and `ls`
|
146
|
-
|
147
|
-
|
148
|
-
$ tmuxinator list
|
169
|
+
```
|
170
|
+
tmuxinator list
|
149
171
|
```
|
150
172
|
|
151
173
|
Remove a project. Aliased to `rm`
|
152
|
-
```
|
153
|
-
|
174
|
+
```
|
175
|
+
tmuxinator delete [project]
|
154
176
|
```
|
155
177
|
|
156
178
|
Remove all tmuxinator configs, aliases and scripts. Aliased to `i`
|
157
|
-
```
|
158
|
-
|
179
|
+
```
|
180
|
+
tmuxinator implode
|
159
181
|
```
|
160
182
|
|
161
183
|
Examines your environment and identifies problems with your configuration
|
162
|
-
```
|
163
|
-
|
184
|
+
```
|
185
|
+
tmuxinator doctor
|
164
186
|
```
|
165
187
|
|
166
188
|
Shows tmuxinator's help. Aliased to `h`
|
167
|
-
```
|
168
|
-
|
189
|
+
```
|
190
|
+
tmuxinator help
|
169
191
|
```
|
170
192
|
|
171
193
|
Shows the shell commands that get executed for a project
|
172
|
-
```
|
173
|
-
|
194
|
+
```
|
195
|
+
tmuxinator debug [project]
|
174
196
|
```
|
175
197
|
|
176
198
|
Shows tmuxinator's version.
|
177
|
-
```
|
178
|
-
|
199
|
+
```
|
200
|
+
tmuxinator version
|
179
201
|
```
|
180
202
|
|
181
203
|
## FAQ
|
182
204
|
|
183
|
-
### Window names are not
|
205
|
+
### Window names are not displaying properly?
|
184
206
|
|
185
207
|
Add `export DISABLE_AUTO_TITLE=true` to your `.zshrc` or `.bashrc`
|
186
208
|
|
data/bin/mux
CHANGED
@@ -4,8 +4,14 @@ $: << File.expand_path("../../lib/", __FILE__)
|
|
4
4
|
require "thor"
|
5
5
|
require "tmuxinator"
|
6
6
|
|
7
|
-
if ARGV.length == 1
|
8
|
-
|
7
|
+
if ARGV.length == 1
|
8
|
+
name = ARGV[0]
|
9
|
+
|
10
|
+
if Tmuxinator::Config.exists?(name)
|
11
|
+
Tmuxinator::Cli.new.start(name)
|
12
|
+
else
|
13
|
+
Tmuxinator::Cli.start
|
14
|
+
end
|
9
15
|
else
|
10
16
|
Tmuxinator::Cli.start
|
11
17
|
end
|
data/bin/tmuxinator
CHANGED
@@ -4,8 +4,14 @@ $: << File.expand_path("../../lib/", __FILE__)
|
|
4
4
|
require "thor"
|
5
5
|
require "tmuxinator"
|
6
6
|
|
7
|
-
if ARGV.length == 1
|
8
|
-
|
7
|
+
if ARGV.length == 1
|
8
|
+
name = ARGV[0]
|
9
|
+
|
10
|
+
if Tmuxinator::Config.exists?(name)
|
11
|
+
Tmuxinator::Cli.new.start(name)
|
12
|
+
else
|
13
|
+
Tmuxinator::Cli.start
|
14
|
+
end
|
9
15
|
else
|
10
16
|
Tmuxinator::Cli.start
|
11
17
|
end
|
data/completion/tmuxinator.bash
CHANGED
@@ -1,35 +1,25 @@
|
|
1
|
-
# ~/.tmuxinator/<%=
|
2
|
-
|
1
|
+
# ~/.tmuxinator/<%= name %>.yml
|
2
|
+
|
3
|
+
name: <%= name %>
|
4
|
+
root: ~/
|
5
|
+
|
6
|
+
# Optional tmux socket
|
7
|
+
# socket_name: foo
|
8
|
+
|
9
|
+
# Runs before everything. Use it to start daemons etc.
|
10
|
+
# pre: sudo /etc/rc.d/mysqld start
|
11
|
+
|
12
|
+
# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions.
|
13
|
+
# pre_window: rbenv shell 2.0.0-p247
|
14
|
+
|
15
|
+
# Pass command line options to tmux. Useful for specifying a different tmux.conf.
|
16
|
+
# tmux_options: -f ~/.tmux.mac.conf
|
3
17
|
|
4
|
-
name: sample
|
5
|
-
root: ~/test
|
6
|
-
socket_name: foo # Remove to use default socket
|
7
|
-
pre: sudo /etc/rc.d/mysqld start # Runs before everything
|
8
|
-
pre_window: rbenv shell 2.0.0-p247 # Runs in each tab and pane
|
9
|
-
tmux_options: -v -2 # Pass arguments to tmux
|
10
18
|
windows:
|
11
19
|
- editor:
|
12
|
-
pre:
|
13
|
-
- echo "I get run in each pane, before each pane command!"
|
14
|
-
-
|
15
20
|
layout: main-vertical
|
16
21
|
panes:
|
17
22
|
- vim
|
18
|
-
-
|
19
|
-
- top
|
20
|
-
- shell: git pull
|
21
|
-
- guard:
|
22
|
-
layout: tiled
|
23
|
-
pre:
|
24
|
-
- echo "I get run in each pane."
|
25
|
-
- echo "Before each pane command!"
|
26
|
-
panes:
|
27
|
-
-
|
28
|
-
- #empty, will just run plain bash
|
29
|
-
-
|
30
|
-
- database: bundle exec rails db
|
23
|
+
- guard
|
31
24
|
- server: bundle exec rails s
|
32
|
-
- logs: tail -f
|
33
|
-
- console: bundle exec rails c
|
34
|
-
- capistrano:
|
35
|
-
- server: ssh user@example.com
|
25
|
+
- logs: tail -f logs/development.log
|
data/lib/tmuxinator/cli.rb
CHANGED
@@ -36,7 +36,7 @@ module Tmuxinator
|
|
36
36
|
|
37
37
|
unless Tmuxinator::Config.exists?(name)
|
38
38
|
template = Tmuxinator::Config.default? ? Tmuxinator::Config.default : Tmuxinator::Config.sample
|
39
|
-
erb =
|
39
|
+
erb = Erubis::Eruby.new(File.read(template)).result(binding)
|
40
40
|
File.open(config, "w") { |f| f.write(erb) }
|
41
41
|
end
|
42
42
|
|
@@ -52,7 +52,7 @@ module Tmuxinator
|
|
52
52
|
if project.deprecations.any?
|
53
53
|
project.deprecations.each { |deprecation| say deprecation, :red }
|
54
54
|
puts
|
55
|
-
print "Press
|
55
|
+
print "Press ENTER to continue."
|
56
56
|
STDIN.getc
|
57
57
|
end
|
58
58
|
|
@@ -92,9 +92,9 @@ module Tmuxinator
|
|
92
92
|
map "rm" => :delete
|
93
93
|
|
94
94
|
def delete(project)
|
95
|
-
|
95
|
+
if Tmuxinator::Config.exists?(project)
|
96
|
+
config = "#{Tmuxinator::Config.root}/#{project}.yml"
|
96
97
|
|
97
|
-
if Tmuxinator::Config.exists?(config)
|
98
98
|
if yes?("Are you sure you want to delete #{project}?", :red)
|
99
99
|
FileUtils.rm(config)
|
100
100
|
say "Deleted #{project}"
|
@@ -104,7 +104,7 @@ module Tmuxinator
|
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
107
|
-
desc "implode", "
|
107
|
+
desc "implode", "Deletes all tmuxinator projects"
|
108
108
|
map "i" => :implode
|
109
109
|
|
110
110
|
def implode
|
data/lib/tmuxinator/config.rb
CHANGED
@@ -36,7 +36,7 @@ module Tmuxinator
|
|
36
36
|
|
37
37
|
def project(name)
|
38
38
|
projects = Dir.glob("#{root}/**/*.yml")
|
39
|
-
project_file = projects.detect { |project| project =~
|
39
|
+
project_file = projects.detect { |project| project =~ /^#{name}.yml$/ }
|
40
40
|
project_file || "#{root}/#{name}.yml"
|
41
41
|
end
|
42
42
|
|
data/lib/tmuxinator/version.rb
CHANGED
@@ -114,13 +114,13 @@ describe Tmuxinator::Config do
|
|
114
114
|
Tmuxinator::Config.stub(:root => path)
|
115
115
|
end
|
116
116
|
|
117
|
-
context
|
117
|
+
context "with project yml" do
|
118
118
|
it "gets the project as path to the yml file" do
|
119
119
|
expect(Tmuxinator::Config.project("sample")).to eq "#{root}/sample.yml"
|
120
120
|
end
|
121
121
|
end
|
122
122
|
|
123
|
-
context
|
123
|
+
context "without project yml" do
|
124
124
|
it "gets the project as path to the yml file" do
|
125
125
|
expect(Tmuxinator::Config.project("new-project")).to eq "#{root}/new-project.yml"
|
126
126
|
end
|
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.5
|
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-08-
|
11
|
+
date: 2013-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|