-
PowerShell (pwsh or Windows PowerShell) – add this to your profile:
function prompt { $loc = $executionContext.SessionState.Path.CurrentLocation $out = "" if ($loc.Provider.Name -eq "FileSystem") { $out += "$([char]27)]9;9;`"$($loc.ProviderPath)`"$([char]27)\"
}