How to close Terminal app current instance and launch a new instance #15422
Replies: 2 comments 1 reply
-
The Terminal should "hot reload" it's settings. If you change the |
Beta Was this translation helpful? Give feedback.
-
Thanks @zadjii-msft Yes it is hot reloading for me. I guess, creating a new tab is not that much of a trouble. But I was looking for closing the current instance and launching a new one so that I start with new Starting dir and admin mode and does not have to keep an unnecessary tab/window open and user does not have to manually click to open a new tab. Shouldn't Stop-Process work though? Something I am doing wrong there? |
Beta Was this translation helpful? Give feedback.
-
I have following scenario -
I am adding a new Terminal profile and setting it as default using a Powershell script.
This script is running in current instance of Terminal app.
When this script is completed, I want to close the current instance of Terminal and launch a new instance so that new default profile gets loaded.
How can I do it?
I tried with exit in the script - it is not closing the Terminal.
I tried with Stop-Process $PID - it is not closing Terminal even though it is killing Powershell process.
Any idea how can I do this?
Beta Was this translation helpful? Give feedback.
All reactions