From 43651af4b9e269aaa741c34238e35c8acdad8155 Mon Sep 17 00:00:00 2001 From: Micky Brunetti Date: Sun, 23 Apr 2023 13:42:51 +0200 Subject: [PATCH] docs(pwsh): use a more convenient method to update the window title (#5125) docs: fix PowerShell example to update the window title --- docs/advanced-config/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/advanced-config/README.md b/docs/advanced-config/README.md index afd47ce1..13f30c0c 100644 --- a/docs/advanced-config/README.md +++ b/docs/advanced-config/README.md @@ -245,7 +245,7 @@ You can also set a similar output with PowerShell by creating a function named ` ```powershell # edit $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" } Invoke-Expression (&starship init powershell)