Skip to content

Instantly share code, notes, and snippets.

@ditsuke
Last active July 9, 2021 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ditsuke/59900ed30f2fad871c71f551ceab3b8a to your computer and use it in GitHub Desktop.
Save ditsuke/59900ed30f2fad871c71f551ceab3b8a to your computer and use it in GitHub Desktop.
[Powershell Function] Open Windows Terminal Tab in Working Directory Without Opening a New Window
<#
.SYNOPSIS
Open Windows Terminal in current working directory, without opening a new window.
#>
Function wtpwd() {
Param (
# A valid Windows Terminal profile
[Parameter(Mandatory=$false, Position=0, ParameterSetName='profile')]
[Alias('p')]
[string] $profile = "Windows Powershell"
)
wt -w 0 nt -d (pwd).path -p $profile
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment