Fix incorrect syntax that prevents to open the stable version of iTerm.

This commit is contained in:
Alexei Yuzhakov 2016-05-28 08:22:46 +06:00
Родитель b5636fbc8e
Коммит d6daabb233
1 изменённых файлов: 16 добавлений и 27 удалений

Просмотреть файл

@ -15,33 +15,22 @@ EOF`
function open_iterm () {
osascript > /dev/null <<EOF
tell application "iTerm"
if version < 2.9 then
activate
try
tell current window
create tab with default profile
tell the current session of current window
write text "bash -c \"$CMD\""
end tell
end tell
on error
try
tell the first terminal
launch session "Default Session"
tell the last session
write text "bash -c \"$CMD\""
end tell
end tell
on error
tell (make new terminal)
launch session "Default Session"
tell the last session
write text "bash -c \"$CMD\""
end tell
end tell
end try
end try
end if
activate
try
tell the first terminal
launch session "Default Session"
tell the last session
write text "bash -c \"$CMD\""
end tell
end tell
on error
tell (make new terminal)
launch session "Default Session"
tell the last session
write text "bash -c \"$CMD\""
end tell
end tell
end try
end tell
EOF
}