Hyper: Support for AppleScript

Created on 11 Jan 2019  路  4Comments  路  Source: vercel/hyper

Under macOS one can execute the following applescript:

tell application "Terminal" to do script "echo hello"

To open another Terminal window with the provided command.

It would be great if Hyper had similar scriptability capabilities.

Most helpful comment

Hyper is a terminal emulator, a shell process

No, it isn't. It's a GUI application that runs a shell process within it. Supporting AppleScript is very common amongst Mac apps aimed at power users and/or developers.

Correct me if I'm wrong but I don't believe the regular Mac terminal supports this functionality in any way.

Completely wrong. @fabiospampinato literally posted example code for doing exactly this with the regular Mac terminal. iTerm2.app also has very good support for scripting via AppleScript.

All 4 comments

Hyper is a terminal emulator, a shell process. How do you suppose it would support AppleScript? Correct me if I'm wrong but I don't believe the regular Mac terminal supports this functionality in any way.

Hyper is a terminal emulator, a shell process

No, it isn't. It's a GUI application that runs a shell process within it. Supporting AppleScript is very common amongst Mac apps aimed at power users and/or developers.

Correct me if I'm wrong but I don't believe the regular Mac terminal supports this functionality in any way.

Completely wrong. @fabiospampinato literally posted example code for doing exactly this with the regular Mac terminal. iTerm2.app also has very good support for scripting via AppleScript.

do shell script "open -a Hyper /usr/local/microsoft/powershell/7-lts/pwsh"

it doesn't have to directly support Hyper, this command in an automator script will open hyper and run pwsh

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amilajack picture amilajack  路  48Comments

rauchg picture rauchg  路  67Comments

silvenon picture silvenon  路  94Comments

BrysonR picture BrysonR  路  91Comments

b0rski picture b0rski  路  66Comments