mirror of
https://github.com/docker/docs.git
synced 2026-03-27 14:28:47 +07:00
Fix incorrect syntax that prevents to open the stable version of iTerm.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user