tmuxinator 0.1.1 → 0.1.3
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.
- data/README.md +4 -8
- data/TODO +6 -4
- data/VERSION +1 -1
- data/lib/tmuxinator/cli.rb +41 -24
- data/tmuxinator.gemspec +6 -4
- metadata +3 -3
data/README.md
CHANGED
@@ -52,8 +52,7 @@ If a tab contains multiple commands, they will be 'joined' together with '&&'.
|
|
52
52
|
If you want to have your own default config, place it into $HOME/.tmuxinator/default.yml
|
53
53
|
|
54
54
|
|
55
|
-
Starting a project
|
56
|
-
------------------
|
55
|
+
## Starting a project
|
57
56
|
|
58
57
|
$ start_project_name
|
59
58
|
|
@@ -64,14 +63,12 @@ This will fire up tmux with all the tabs you configured.
|
|
64
63
|
After you create a project, you will have to open a new shell window. This is because tmuxinator adds an alias to bash to open tmux with the project config.
|
65
64
|
|
66
65
|
|
67
|
-
Example
|
68
|
-
-------
|
66
|
+
## Example
|
69
67
|
|
70
68
|

|
71
69
|
|
72
70
|
|
73
|
-
Other Commands
|
74
|
-
--------------
|
71
|
+
## Other Commands
|
75
72
|
|
76
73
|
$ tmuxinator copy existing_project new_project
|
77
74
|
|
@@ -96,8 +93,7 @@ Remove a project
|
|
96
93
|
Remove all tmuxinator configs, aliases and scripts.
|
97
94
|
|
98
95
|
|
99
|
-
Questions? Comments? Feature Request?
|
100
|
-
-------------------------------------
|
96
|
+
## Questions? Comments? Feature Request?
|
101
97
|
|
102
98
|
I would love to hear your feedback on this project! Send me a message!
|
103
99
|
|
data/TODO
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
9. cli respond to -v -h
|
2
|
-
10. add method missing for cli
|
3
1
|
6. be sure to set the $SHELL and $EDITOR and path to aliases
|
2
|
+
11. improve readme file
|
3
|
+
|
4
4
|
7. have a doctor like home brew to test $SHELL and $EDITOR and path to aliases and tmux installation
|
5
5
|
8. push it to rubygems
|
6
|
-
|
6
|
+
|
7
7
|
|
8
8
|
4. support panes
|
9
9
|
5. install theme
|
@@ -20,4 +20,6 @@ x. add tests
|
|
20
20
|
|
21
21
|
DONE
|
22
22
|
1. write a better sample
|
23
|
-
2. test reattaching already attached
|
23
|
+
2. test reattaching already attached
|
24
|
+
9. cli respond to -v -h
|
25
|
+
10. add method missing for cli
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/lib/tmuxinator/cli.rb
CHANGED
@@ -2,10 +2,10 @@ require 'fileutils'
|
|
2
2
|
|
3
3
|
module Tmuxinator
|
4
4
|
class Cli
|
5
|
-
|
5
|
+
|
6
6
|
class << self
|
7
7
|
include Tmuxinator::Helper
|
8
|
-
|
8
|
+
|
9
9
|
def start(*args)
|
10
10
|
if args.empty?
|
11
11
|
self.usage
|
@@ -18,9 +18,9 @@ module Tmuxinator
|
|
18
18
|
def usage
|
19
19
|
puts <<"DOC"
|
20
20
|
Usage: tmuxinator ACTION [Arg]
|
21
|
-
|
21
|
+
|
22
22
|
ACTOINS:
|
23
|
-
open [project_name]
|
23
|
+
open [project_name]
|
24
24
|
create a new project file and open it in your editor
|
25
25
|
copy [source_project] [new_project]
|
26
26
|
copy source_project project file to a new project called new_project
|
@@ -30,12 +30,18 @@ module Tmuxinator
|
|
30
30
|
deletes all existing projects!
|
31
31
|
list [-v]
|
32
32
|
list all existing projects
|
33
|
+
help
|
34
|
+
shows this help document
|
35
|
+
version
|
36
|
+
|
33
37
|
DOC
|
34
|
-
|
35
38
|
end
|
36
|
-
|
39
|
+
alias :help :usage
|
40
|
+
alias :h :usage
|
41
|
+
|
37
42
|
# Open a config file, it's created if it doesn't exist already.
|
38
43
|
def open(*args)
|
44
|
+
exit!("You must specify a name for the new project") unless args.size > 0
|
39
45
|
puts "warning: passing multiple arguments to open will be ignored" if args.size > 1
|
40
46
|
@name = args.shift
|
41
47
|
FileUtils.mkdir_p(root_dir+"scripts")
|
@@ -48,17 +54,18 @@ DOC
|
|
48
54
|
system("$EDITOR #{config_path}")
|
49
55
|
update_scripts
|
50
56
|
end
|
51
|
-
|
57
|
+
alias :o :open
|
58
|
+
|
52
59
|
def copy(*args)
|
53
60
|
@copy = args.shift
|
54
61
|
@name = args.shift
|
55
62
|
@config_to_copy = "#{root_dir}#{@copy}.yml"
|
56
|
-
|
63
|
+
|
57
64
|
exit!("Project #{@copy} doesn't exist!") unless File.exists?(@config_to_copy)
|
58
65
|
exit!("You must specify a name for the new project") unless @name
|
59
|
-
|
66
|
+
|
60
67
|
file_path = "#{root_dir}#{@name}.yml"
|
61
|
-
|
68
|
+
|
62
69
|
if File.exists?(file_path)
|
63
70
|
confirm!("#{@name} already exists, would you like to overwrite it? (type yes or no):") do
|
64
71
|
FileUtils.rm(file_path)
|
@@ -67,12 +74,13 @@ DOC
|
|
67
74
|
end
|
68
75
|
open(@name)
|
69
76
|
end
|
70
|
-
|
77
|
+
alias :c :copy
|
78
|
+
|
71
79
|
def delete(*args)
|
72
80
|
puts "warning: passing multiple arguments to delete will be ignored" if args.size > 1
|
73
81
|
filename = args.shift
|
74
82
|
file_path = "#{root_dir}#{filename}.yml"
|
75
|
-
|
83
|
+
|
76
84
|
if File.exists?(file_path)
|
77
85
|
confirm!("Are you sure you want to delete #{filename}? (type yes or no):") do
|
78
86
|
FileUtils.rm(file_path)
|
@@ -81,9 +89,9 @@ DOC
|
|
81
89
|
else
|
82
90
|
exit! "That file doesn't exist."
|
83
91
|
end
|
84
|
-
|
85
92
|
end
|
86
|
-
|
93
|
+
alias :d :delete
|
94
|
+
|
87
95
|
def implode(*args)
|
88
96
|
exit!("delete_all doesn't accapt any arguments!") unless args.empty?
|
89
97
|
confirm!("Are you sure you want to delete all tmuxinator configs? (type yes or no):") do
|
@@ -91,6 +99,7 @@ DOC
|
|
91
99
|
puts "Deleted #{root_dir}"
|
92
100
|
end
|
93
101
|
end
|
102
|
+
alias :i :implode
|
94
103
|
|
95
104
|
def list(*args)
|
96
105
|
verbose = args.include?("-v")
|
@@ -101,38 +110,46 @@ DOC
|
|
101
110
|
puts " #{path}"
|
102
111
|
end
|
103
112
|
end
|
113
|
+
alias :l :list
|
114
|
+
alias :ls :list
|
115
|
+
|
116
|
+
def version
|
117
|
+
system("cat #{File.dirname(__FILE__) + '/../../VERSION'}")
|
118
|
+
puts
|
119
|
+
end
|
120
|
+
alias :v :version
|
104
121
|
|
105
122
|
def update_scripts
|
106
123
|
Dir["#{root_dir}*.tmux"].each {|p| FileUtils.rm(p) }
|
107
124
|
aliases = []
|
108
|
-
Dir["#{root_dir}*.yml"].each do |path|
|
125
|
+
Dir["#{root_dir}*.yml"].each do |path|
|
109
126
|
path = File.basename(path, '.yml')
|
110
127
|
aliases << Tmuxinator::ConfigWriter.new(path).write!
|
111
128
|
end
|
112
129
|
Tmuxinator::ConfigWriter.write_aliases(aliases)
|
113
130
|
end
|
114
|
-
|
115
|
-
def method_missing(method, *args, &block)
|
116
|
-
puts "There's no command called #{method} in tmuxinator"
|
117
|
-
usage
|
131
|
+
|
132
|
+
def method_missing(method, *args, &block)
|
133
|
+
puts "There's no command called #{method} in tmuxinator"
|
134
|
+
usage
|
118
135
|
end
|
119
136
|
|
120
137
|
private #==============================
|
121
|
-
|
138
|
+
|
122
139
|
def root_dir
|
123
140
|
"#{ENV["HOME"]}/.tmuxinator/"
|
124
141
|
end
|
125
|
-
|
142
|
+
|
126
143
|
def sample_config
|
127
144
|
"#{File.dirname(__FILE__)}/assets/sample.yml"
|
128
145
|
end
|
129
|
-
|
146
|
+
|
130
147
|
def user_config
|
131
148
|
@config_to_copy || "#{ENV["HOME"]}/.tmuxinator/default.yml"
|
132
149
|
end
|
133
|
-
|
150
|
+
|
134
151
|
end
|
135
|
-
|
152
|
+
|
136
153
|
end
|
137
154
|
end
|
138
155
|
|
data/tmuxinator.gemspec
CHANGED
@@ -5,18 +5,19 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{tmuxinator}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Allen Bargi"]
|
12
|
-
s.date = %q{2010-12-
|
12
|
+
s.date = %q{2010-12-11}
|
13
13
|
s.default_executable = %q{tmuxinator}
|
14
14
|
s.description = %q{Create and manage complex tmux sessions easily.}
|
15
15
|
s.email = %q{allen.bargi@gmail.com}
|
16
16
|
s.executables = ["tmuxinator"]
|
17
17
|
s.extra_rdoc_files = [
|
18
18
|
"LICENSE.txt",
|
19
|
-
"README.md"
|
19
|
+
"README.md",
|
20
|
+
"TODO"
|
20
21
|
]
|
21
22
|
s.files = [
|
22
23
|
".document",
|
@@ -35,7 +36,8 @@ Gem::Specification.new do |s|
|
|
35
36
|
"lib/tmuxinator/config_writer.rb",
|
36
37
|
"lib/tmuxinator/helper.rb",
|
37
38
|
"spec/spec_helper.rb",
|
38
|
-
"spec/tmuxinator_spec.rb"
|
39
|
+
"spec/tmuxinator_spec.rb",
|
40
|
+
"tmuxinator.gemspec"
|
39
41
|
]
|
40
42
|
s.homepage = %q{http://github.com/aziz/tmuxinator}
|
41
43
|
s.licenses = ["MIT"]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tmuxinator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Allen Bargi
|