bin/teamocil in teamocil-0.1.7 vs bin/teamocil in teamocil-0.1.8
- old
+ new
@@ -21,10 +21,14 @@
"
opts.on("--here", "Set up the first window in the current window") do
options[:here] = true
end
+ opts.on("--edit", "Edit the YAML layout file instead of using it") do
+ options[:edit] = true
+ end
+
opts.on("--layout [LAYOUT]", "Use a specific layout file, instead of ~/.teamocil/<layout>.yml") do |layout|
options[:layout] = layout
end
end
@@ -36,7 +40,11 @@
file = File.join("#{ENV["HOME"]}/.teamocil", "#{ARGV[0]}.yml")
end
bail "There is no file \"#{file}\"" unless File.exists?(file)
-layout = Teamocil::Layout.new(file, options)
-layout.to_tmux
+if options[:edit]
+ system("$EDITOR \"#{file}\"")
+else
+ layout = Teamocil::Layout.new(file, options)
+ layout.to_tmux
+end