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.
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.
Upstream issue: https://github.com/electron/electron/issues/4418
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
Most helpful comment
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.
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.