Skip to content

Instantly share code, notes, and snippets.

@LuanVSO
Last active September 29, 2021 09:40
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LuanVSO/6f2b94cf3bd90f184722676c43ccc1c6 to your computer and use it in GitHub Desktop.
Save LuanVSO/6f2b94cf3bd90f184722676c43ccc1c6 to your computer and use it in GitHub Desktop.
#you have to put this in $profile or $profile.currentuserallhosts
$esc = [char]27
if($env:WT_SESSION){
$prevprompt = $Function:prompt
function prompt {
if ($pwd.provider.name -eq "FileSystem") {
$p = $pwd.ProviderPath
Write-host "$esc]9;9;`"$p`"$esc\" -NoNewline
}
return $prevprompt.invoke()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment