teamocil 0.1.7 → 0.1.8

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.mkd CHANGED
@@ -14,6 +14,7 @@ Teamocil is a tool used to automatically create sessions, windows and splits in
14
14
 
15
15
  * `--here` opens the session from the current window, it doesn’t create an empty first window.
16
16
  * `--layout` takes a custom file path to a YAML layout file.
17
+ * `--edit` opens the layout file (whether or not `--layout` is used) with `$EDITOR`.
17
18
 
18
19
  ## Layout example
19
20
 
data/bin/teamocil CHANGED
@@ -23,6 +23,10 @@ Options:
23
23
  options[:here] = true
24
24
  end
25
25
 
26
+ opts.on("--edit", "Edit the YAML layout file instead of using it") do
27
+ options[:edit] = true
28
+ end
29
+
26
30
  opts.on("--layout [LAYOUT]", "Use a specific layout file, instead of ~/.teamocil/<layout>.yml") do |layout|
27
31
  options[:layout] = layout
28
32
  end
@@ -38,5 +42,9 @@ end
38
42
 
39
43
  bail "There is no file \"#{file}\"" unless File.exists?(file)
40
44
 
41
- layout = Teamocil::Layout.new(file, options)
42
- layout.to_tmux
45
+ if options[:edit]
46
+ system("$EDITOR \"#{file}\"")
47
+ else
48
+ layout = Teamocil::Layout.new(file, options)
49
+ layout.to_tmux
50
+ end
@@ -19,7 +19,7 @@ module Teamocil
19
19
  if @layout["session"].nil?
20
20
  windows = @layout["windows"]
21
21
  else
22
- output << "tmux rename-session #{@layout["session"]["name"]}"
22
+ output << "tmux rename-session #{@layout["session"]["name"]}" if @layout["session"]["name"]
23
23
  windows = @layout["session"]["windows"]
24
24
  end
25
25
 
data/lib/teamocil.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Teamocil
2
- VERSION = '0.1.7'
2
+ VERSION = '0.1.8'
3
3
  autoload :Layout, "teamocil/layout"
4
4
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teamocil
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 7
10
- version: 0.1.7
9
+ - 8
10
+ version: 0.1.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - "R\xC3\xA9mi Pr\xC3\xA9vost"
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-19 00:00:00 -04:00
18
+ date: 2011-07-20 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies: []
21
21