fix accessing current terminal

use `current terminal` instead of `first terminal` to access current terminal
This commit is contained in:
Ivan 2014-09-30 16:11:49 +02:00
parent 9c01996306
commit 897aaa25d7

View File

@ -157,7 +157,7 @@ class ItermWindow
# Initializes the terminal window # Initializes the terminal window
def run_commands(window_type, &block) def run_commands(window_type, &block)
window_types = {:new => '(make new terminal)', :current => 'first terminal'} window_types = {:new => '(make new terminal)', :current => 'current terminal'}
raise ArgumentError, "ItermWindow#run_commands should be passed :new or :current." unless window_types.keys.include? window_type raise ArgumentError, "ItermWindow#run_commands should be passed :new or :current." unless window_types.keys.include? window_type
output "tell application 'iTerm'" output "tell application 'iTerm'"
output "activate" output "activate"