From c0901c2364ca4e57008e3d8ea54fd311dc35796d Mon Sep 17 00:00:00 2001 From: wadabum <23560633+wadabum@users.noreply.github.com> Date: Mon, 7 Jul 2025 14:57:44 +0200 Subject: [PATCH] Update shell-integration.md for powershell-5 --- TerminalDocs/tutorials/shell-integration.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/TerminalDocs/tutorials/shell-integration.md b/TerminalDocs/tutorials/shell-integration.md index 9f060124..276a3026 100644 --- a/TerminalDocs/tutorials/shell-integration.md +++ b/TerminalDocs/tutorials/shell-integration.md @@ -123,9 +123,9 @@ function prompt { if ($Global:__LastHistoryId -ne -1) { if ($LastHistoryEntry.Id -eq $Global:__LastHistoryId) { # Don't provide a command line or exit code if there was no history entry (eg. ctrl+c, enter on no command) - $out += "`e]133;D`a" + $out += "$([char]0x1b)]133;D$([char]07)" } else { - $out += "`e]133;D;$gle`a" + $out += "$([char]0x1b)]133;D;$gle$([char]07)" } } @@ -133,16 +133,16 @@ function prompt { $loc = $($executionContext.SessionState.Path.CurrentLocation); # Prompt started - $out += "`e]133;A$([char]07)"; + $out += "$([char]0x1b)]133;A$([char]07)"; # CWD - $out += "`e]9;9;`"$loc`"$([char]07)"; + $out += "$([char]0x1b)]9;9;`"$loc`"$([char]07)"; # (your prompt here) $out += "PWSH $loc$('>' * ($nestedPromptLevel + 1)) "; # Prompt ended, Command started - $out += "`e]133;B$([char]07)"; + $out += "$([char]0x1b)]133;B$([char]07)"; $Global:__LastHistoryId = $LastHistoryEntry.Id