0

No matter what app I am in, I would like to do a keyboard shortcut which allows me to enter a terminal command and run it, and the output will be written to wherever my cursor is, if it is in a text field.

What is the best way to do this?

3
  • Have you tried pbcopy? Run your Terminal command and pipe the output to your clipboard: ls -la | pbcopy. But, you can't run Terminal from within any app. If the app doesn't support it, you can't do it. What exactly are you trying to accomplish?
    – Allan
    Commented Jan 23, 2023 at 21:09
  • @allan A shortcut might work, actually.
    – nohillside
    Commented Jan 23, 2023 at 21:35
  • I'll up vote that answer @nohillside because it fits what the OP's asking for. I just think there is more to what's being asked.
    – Allan
    Commented Jan 23, 2023 at 21:58

1 Answer 1

1

You can use Shortcuts.app to create a shortcut like

enter image description here

and assign it to a key combination.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .