Is there a way to open a new tab in a running instance of windows terminal from CLI and make it point to a specific folder?
Everytime I run wt.exe -d c:\my-folder
it opens a new window.
Using the new tab button and dropdown menu If you'd like to open a new pane of your default profile, you can hold the alt key and click the new tab button.
To create and use a new PowerShell TabOn the File menu, click New PowerShell Tab. The new PowerShell tab always opens as the active window. PowerShell tabs are incrementally numbered in the order that they are opened.
If someone needs the commands to create a new tab (and not open a new window) from a context menu item are: (if you are already in the directory):
wt -w 0 nt
(and if you click on the directory):
wt -w 0 nt -d %1
(to open in the current directory):
wt -w 0 nt -d %CD%
You can add these commands in the respective registry of each item (or in a new one)
Source: the GitHub discussion in the other answer.
if you run that in cmd or a script, it launches a new instance if none already running, or adds a tab if there is a running instance.
Now, we have this option in Windows Terminal's Settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With