alt-enter Terminal.app binding opens restored windows plus one extra after Cmd+Q #2159
Unanswered
LenzGardfild
asked this question in
feature-ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Issue with Terminal.app Binding
I noticed an issue with the current Apple Terminal binding example that uses:
This works fine when
Terminal.appis already running. However, ifTerminal.appis quit withCmd+Qwhile it has open windows, macOS restores those windows on the next launch. Thendo scriptcreates one additional window.Example:
Terminal.appwith one window.Terminal.appusingCmd+Q.Terminal.appopens two windows: one restored window + one new window fromdo script.If
Terminal.apphad two open windows beforeCmd+Q, the binding opens three windows, and so on.Proposed Workaround
A workaround that fixed it for me is to use
open -F -a Terminalwhen Terminal is not running, and only usedo scriptwhen Terminal is already running:Expected Behavior:
Would it make sense to add this as an alternative
Terminal.appexample in the docs?All reactions