From c8ea52003a60103ecd0edf206a2b257b5982f73b Mon Sep 17 00:00:00 2001 From: "MS/MERCADO, JOESALYN D" <31046801+JoesaDmercado@users.noreply.github.com> Date: Fri, 11 Oct 2019 20:18:31 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"Fix=20=E2=80=9CRun=20in=20Terminal?= =?UTF-8?q?=E2=80=9D=20for=20macOS=20High=20Sierra"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Commands/Open directory in Terminal.plist | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Commands/Open directory in Terminal.plist b/Commands/Open directory in Terminal.plist index a7ce075..b2a6ff7 100644 --- a/Commands/Open directory in Terminal.plist +++ b/Commands/Open directory in Terminal.plist @@ -32,7 +32,7 @@ def terminal_script_new_tab(dir) return <<-APPLESCRIPT tell application "Terminal" activate - set originalContent to contents of tab in window 1 + set numberOfTabs to count tabs in window 1 tell application "System Events" repeat while "Terminal" is not name of (process 1 where frontmost is true) delay 0.1 @@ -40,9 +40,9 @@ def terminal_script_new_tab(dir) tell process "Terminal" to keystroke "t" using command down end tell set startedAt to current date - repeat while (contents of tab in window 1) is originalContent + repeat while (count tabs in window 1) is numberOfTabs delay 0.1 - if (current date) - startedAt > 2 then + if (current date) - startedAt > 2 then error "Could not open new tab" end if end repeat