April 06, 2020
Photo by Lewis Ngugi from Pexels
We can specify the default directory Windows Terminal
can open in.
Ctrl + ,
. This will open your config file.It should look like this. The first option in list is Powershell
config.
{
"profiles":
{
"list":
[
{
// Make changes here to the powershell.exe profile
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
"commandline": "powershell.exe",
"hidden": false,
"startingDirectory": null
},
]
}
"startingDirectory": null
option for each profile.Now if you go to any folder and type wt
in address bar. This should open Windows Terminal in your current folder. If you want to open it in specific folder,you can specify the path instead of null
.
You can't copy text from Windows Terminal by selecting text and right click.
"copyOnSelect": true
at the root of your config file.Ex:
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"copyOnSelect": true,
}
Now if you select text in terminal and right click. The selected text would be copied to your clipboard.
By default Windows Terminal will open powershell
in first tab. You can change that using defaultProfile
property in config.
"defaultProfile":
property to the value of guid
from list of profiles.Ex:
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"copyOnSelect": true,
"profiles":
{
"defaults":
{
// Put settings here that you want to apply to all profiles
},
"list":
[
{
// Make changes here to the powershell.exe profile
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
"commandline": "powershell.exe",
"hidden": false,
"startingDirectory": null
},
{
// Make changes here to the cmd.exe profile
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"name": "cmd",
"commandline": "cmd.exe",
"hidden": false,
"startingDirectory": null
},
]
}
}